{
  "id": 371324,
  "title": "KerasCV + NoROI Baseline",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/371324",
  "author_name": "Awsaf",
  "post_date": "2022-12-09T08:44:33.502000",
  "votes": 11,
  "comment_count": 0,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fab8342a27c6c35cc592af1667f2d28c8%2Flogo.png?generation=1670575259766962&amp;alt=media\"></p>\n<p>This work extends my <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370689\" target=\"_blank\">previous</a> work but uses NoROI (whole image) and <a href=\"https://github.com/keras-team/keras-cv/\" target=\"_blank\"><strong>KerasCV</strong></a> (augmentation). KerasCV is a cool tool, it kinda reminds of Albumentation. Unlike my previous work these notebooks uses <strong>square</strong> image for training. From initial experiments, it seems <strong>rectangle + roi</strong> performs better than <strong>square + noroi</strong> images. But it comes with a cost of <strong>processing time</strong>. Need to fine-tune for this work for better comparison.</p>\n<p>Similarly to previous work, notebook supports <code>remote-tpu</code>, <code>local-tpu</code>, <code>multi-gpu</code>, and <code>single-gpu</code> training.  It also tracks training and stores grad-cam images in <a href=\"https://wandb.ai/awsaf49/rsna-bcd-public\" target=\"_blank\"><strong>Weights &amp; Biases</strong></a></p>\n<h2>Notebooks</h2>\n<ul>\n<li>train: <a href=\"https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-train/\" target=\"_blank\">RSNA-BCD: NoROI KerasCV [TF][Train]</a></li>\n<li>infer: <a href=\"https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-infer/\" target=\"_blank\">RSNA-BCD: NoROI KerasCV [TF][Infer]</a></li>\n</ul>\n<h2>Before KerasCV Aug.</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Feb0c4273221dce28126fa239eb65cac2%2Fbefore-kerascv.png?generation=1670575642614816&amp;alt=media\" alt=\"\"></p>\n<h2>After KerasCV Aug.</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fc9dfcf6e4db706d91d89d102dcc8c79f%2Fafter-kerascv.png?generation=1670575666182059&amp;alt=media\" alt=\"\"></p>\n<h2>WandB</h2>\n<p>You can  track all my experiments <a href=\"https://wandb.ai/awsaf49/rsna-bcd-public\" target=\"_blank\">here</a><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F918e2c409dc4e7ea7dbd346afe886df2%2Fwandb-kerascv.PNG?generation=1670575935756383&amp;alt=media\" alt=\"\"></p>\n<h2>Grad-CAM</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F69df6baa51eb2a9d5dbdf9ecb15ee653%2Fkerascv-gradcam.png?generation=1670575962505799&amp;alt=media\"></p>\n<blockquote>\n  <p><strong>Note</strong>: KerasCV requires <code>tf&gt;=2.9</code> hence can't use it during inference. Some augmentations such as <code>zoom</code>, <code>translation</code>, <code>rotation</code> throws error, perhaps due to implicit dimension in <code>tf.data.Dataset</code></p>\n</blockquote>",
  "messages": [
    {
      "id": 2059806,
      "postDate": "2022-12-09T08:44:33.503Z",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fab8342a27c6c35cc592af1667f2d28c8%2Flogo.png?generation=1670575259766962&amp;alt=media\"></p>\n<p>This work extends my <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370689\" target=\"_blank\">previous</a> work but uses NoROI (whole image) and <a href=\"https://github.com/keras-team/keras-cv/\" target=\"_blank\"><strong>KerasCV</strong></a> (augmentation). KerasCV is a cool tool, it kinda reminds of Albumentation. Unlike my previous work these notebooks uses <strong>square</strong> image for training. From initial experiments, it seems <strong>rectangle + roi</strong> performs better than <strong>square + noroi</strong> images. But it comes with a cost of <strong>processing time</strong>. Need to fine-tune for this work for better comparison.</p>\n<p>Similarly to previous work, notebook supports <code>remote-tpu</code>, <code>local-tpu</code>, <code>multi-gpu</code>, and <code>single-gpu</code> training.  It also tracks training and stores grad-cam images in <a href=\"https://wandb.ai/awsaf49/rsna-bcd-public\" target=\"_blank\"><strong>Weights &amp; Biases</strong></a></p>\n<h2>Notebooks</h2>\n<ul>\n<li>train: <a href=\"https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-train/\" target=\"_blank\">RSNA-BCD: NoROI KerasCV [TF][Train]</a></li>\n<li>infer: <a href=\"https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-infer/\" target=\"_blank\">RSNA-BCD: NoROI KerasCV [TF][Infer]</a></li>\n</ul>\n<h2>Before KerasCV Aug.</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Feb0c4273221dce28126fa239eb65cac2%2Fbefore-kerascv.png?generation=1670575642614816&amp;alt=media\" alt=\"\"></p>\n<h2>After KerasCV Aug.</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fc9dfcf6e4db706d91d89d102dcc8c79f%2Fafter-kerascv.png?generation=1670575666182059&amp;alt=media\" alt=\"\"></p>\n<h2>WandB</h2>\n<p>You can  track all my experiments <a href=\"https://wandb.ai/awsaf49/rsna-bcd-public\" target=\"_blank\">here</a><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F918e2c409dc4e7ea7dbd346afe886df2%2Fwandb-kerascv.PNG?generation=1670575935756383&amp;alt=media\" alt=\"\"></p>\n<h2>Grad-CAM</h2>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F69df6baa51eb2a9d5dbdf9ecb15ee653%2Fkerascv-gradcam.png?generation=1670575962505799&amp;alt=media\"></p>\n<blockquote>\n  <p><strong>Note</strong>: KerasCV requires <code>tf&gt;=2.9</code> hence can't use it during inference. Some augmentations such as <code>zoom</code>, <code>translation</code>, <code>rotation</code> throws error, perhaps due to implicit dimension in <code>tf.data.Dataset</code></p>\n</blockquote>",
      "rawMarkdown": "<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fab8342a27c6c35cc592af1667f2d28c8%2Flogo.png?generation=1670575259766962&alt=media\" width=\"300\">\n\nThis work extends my [previous](https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370689) work but uses NoROI (whole image) and [**KerasCV**](https://github.com/keras-team/keras-cv/) (augmentation). KerasCV is a cool tool, it kinda reminds of Albumentation. Unlike my previous work these notebooks uses **square** image for training. From initial experiments, it seems **rectangle + roi** performs better than **square + noroi** images. But it comes with a cost of **processing time**. Need to fine-tune for this work for better comparison.\n\nSimilarly to previous work, notebook supports `remote-tpu`, `local-tpu`, `multi-gpu`, and `single-gpu` training.  It also tracks training and stores grad-cam images in [**Weights & Biases**](https://wandb.ai/awsaf49/rsna-bcd-public)\n\n\n## Notebooks\n* train: [RSNA-BCD: NoROI KerasCV [TF][Train]](https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-train/)\n* infer: [RSNA-BCD: NoROI KerasCV [TF][Infer]](https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-infer/)\n\n## Before KerasCV Aug.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Feb0c4273221dce28126fa239eb65cac2%2Fbefore-kerascv.png?generation=1670575642614816&alt=media)\n\n## After KerasCV Aug.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fc9dfcf6e4db706d91d89d102dcc8c79f%2Fafter-kerascv.png?generation=1670575666182059&alt=media)\n\n## WandB\nYou can  track all my experiments [here](https://wandb.ai/awsaf49/rsna-bcd-public)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F918e2c409dc4e7ea7dbd346afe886df2%2Fwandb-kerascv.PNG?generation=1670575935756383&alt=media)\n\n## Grad-CAM\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F69df6baa51eb2a9d5dbdf9ecb15ee653%2Fkerascv-gradcam.png?generation=1670575962505799&alt=media\" width=\"600\">\n\n> **Note**: KerasCV requires `tf>=2.9` hence can't use it during inference. Some augmentations such as `zoom`, `translation`, `rotation` throws error, perhaps due to implicit dimension in `tf.data.Dataset`",
      "votes": 11
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2059806": "<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fab8342a27c6c35cc592af1667f2d28c8%2Flogo.png?generation=1670575259766962&alt=media\" width=\"300\">\n\nThis work extends my [previous](https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370689) work but uses NoROI (whole image) and [**KerasCV**](https://github.com/keras-team/keras-cv/) (augmentation). KerasCV is a cool tool, it kinda reminds of Albumentation. Unlike my previous work these notebooks uses **square** image for training. From initial experiments, it seems **rectangle + roi** performs better than **square + noroi** images. But it comes with a cost of **processing time**. Need to fine-tune for this work for better comparison.\n\nSimilarly to previous work, notebook supports `remote-tpu`, `local-tpu`, `multi-gpu`, and `single-gpu` training.  It also tracks training and stores grad-cam images in [**Weights & Biases**](https://wandb.ai/awsaf49/rsna-bcd-public)\n\n\n## Notebooks\n* train: [RSNA-BCD: NoROI KerasCV [TF][Train]](https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-train/)\n* infer: [RSNA-BCD: NoROI KerasCV [TF][Infer]](https://www.kaggle.com/awsaf49/rsna-bcd-noroi-kerascv-tf-infer/)\n\n## Before KerasCV Aug.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Feb0c4273221dce28126fa239eb65cac2%2Fbefore-kerascv.png?generation=1670575642614816&alt=media)\n\n## After KerasCV Aug.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2Fc9dfcf6e4db706d91d89d102dcc8c79f%2Fafter-kerascv.png?generation=1670575666182059&alt=media)\n\n## WandB\nYou can  track all my experiments [here](https://wandb.ai/awsaf49/rsna-bcd-public)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F918e2c409dc4e7ea7dbd346afe886df2%2Fwandb-kerascv.PNG?generation=1670575935756383&alt=media)\n\n## Grad-CAM\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3574256%2F69df6baa51eb2a9d5dbdf9ecb15ee653%2Fkerascv-gradcam.png?generation=1670575962505799&alt=media\" width=\"600\">\n\n> **Note**: KerasCV requires `tf>=2.9` hence can't use it during inference. Some augmentations such as `zoom`, `translation`, `rotation` throws error, perhaps due to implicit dimension in `tf.data.Dataset`"
  }
}