{
  "id": 200697,
  "title": "[LB 0.802] Simple End-To-End Keras Pipeline",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/200697",
  "author_name": "Kishan Joshi",
  "post_date": "2020-12-01T13:34:06.406000",
  "votes": 4,
  "comment_count": 0,
  "views": 0,
  "content": "<p><a href=\"https://www.kaggle.com/joshi98kishan/hubmap-keras-pipeline-training-inference\" target=\"_blank\">[HuBMAP] Keras-Pipeline (Training+Inference)</a></p>\n<p>In this notebook, we will see end-to-end Keras pipeline from data preprocessing to inference (Submission).</p>\n<p>The notebook goes like this (Version 12 of NB):</p>\n<ul>\n<li>Installed <code>segmentation_models</code> library offline.</li>\n<li>Created a simple but robust data pipeline using <code>tf.data</code> api.<ul>\n<li>Data preprocessing: Used iafoss's 256x256 images and normalized to [0-1] range.</li>\n<li>Augmentations</li></ul></li>\n<li>Created a model using <code>segmentation_models</code> library: U-Net with pretrained ResNet34 encoder.<ul>\n<li>This library returns a keras model, hence it is easy to train it with <code>fit()</code> method and do <br>\npredictions with <code>predict()</code> method.</li></ul></li>\n<li>Training - Group K Fold</li>\n<li>Loss: Binary Crossentropy</li>\n<li>Optimizer: Adam</li>\n<li>Used <a href=\"https://www.kaggle.com/leighplt\" target=\"_blank\">@leighplt</a>'s <a href=\"https://www.kaggle.com/leighplt/pytorch-fcn-resnet50\" target=\"_blank\">inference code</a> for PyTorch model and modified it for Keras. Averaged the predictions of fold models.</li>\n<li>Got <strong>0.802 LB</strong> score.</li>\n</ul>\n<p>Upcoming versions will include:</p>\n<ul>\n<li>Augmentations [Added]</li>\n<li>K-Fold validation [Added]</li>\n<li>Use of different sized images.</li>\n<li>Better model</li>\n</ul>\n<p>Stay tuned 🙂</p>",
  "messages": [
    {
      "id": 1098172,
      "postDate": "2020-12-01T13:34:06.407Z",
      "content": "<p><a href=\"https://www.kaggle.com/joshi98kishan/hubmap-keras-pipeline-training-inference\" target=\"_blank\">[HuBMAP] Keras-Pipeline (Training+Inference)</a></p>\n<p>In this notebook, we will see end-to-end Keras pipeline from data preprocessing to inference (Submission).</p>\n<p>The notebook goes like this (Version 12 of NB):</p>\n<ul>\n<li>Installed <code>segmentation_models</code> library offline.</li>\n<li>Created a simple but robust data pipeline using <code>tf.data</code> api.<ul>\n<li>Data preprocessing: Used iafoss's 256x256 images and normalized to [0-1] range.</li>\n<li>Augmentations</li></ul></li>\n<li>Created a model using <code>segmentation_models</code> library: U-Net with pretrained ResNet34 encoder.<ul>\n<li>This library returns a keras model, hence it is easy to train it with <code>fit()</code> method and do <br>\npredictions with <code>predict()</code> method.</li></ul></li>\n<li>Training - Group K Fold</li>\n<li>Loss: Binary Crossentropy</li>\n<li>Optimizer: Adam</li>\n<li>Used <a href=\"https://www.kaggle.com/leighplt\" target=\"_blank\">@leighplt</a>'s <a href=\"https://www.kaggle.com/leighplt/pytorch-fcn-resnet50\" target=\"_blank\">inference code</a> for PyTorch model and modified it for Keras. Averaged the predictions of fold models.</li>\n<li>Got <strong>0.802 LB</strong> score.</li>\n</ul>\n<p>Upcoming versions will include:</p>\n<ul>\n<li>Augmentations [Added]</li>\n<li>K-Fold validation [Added]</li>\n<li>Use of different sized images.</li>\n<li>Better model</li>\n</ul>\n<p>Stay tuned 🙂</p>",
      "rawMarkdown": "[[HuBMAP] Keras-Pipeline (Training+Inference)](https://www.kaggle.com/joshi98kishan/hubmap-keras-pipeline-training-inference)\n\nIn this notebook, we will see end-to-end Keras pipeline from data preprocessing to inference (Submission).\n\nThe notebook goes like this (Version 12 of NB):\n- Installed `segmentation_models` library offline.\n- Created a simple but robust data pipeline using `tf.data` api.\n     -  Data preprocessing: Used iafoss's 256x256 images and normalized to [0-1] range.\n     -  Augmentations\n- Created a model using `segmentation_models` library: U-Net with pretrained ResNet34 encoder.\n     - This library returns a keras model, hence it is easy to train it with `fit()` method and do \n        predictions with `predict()` method.\n- Training - Group K Fold\n- Loss: Binary Crossentropy\n- Optimizer: Adam\n- Used @leighplt's [inference code](https://www.kaggle.com/leighplt/pytorch-fcn-resnet50) for PyTorch model and modified it for Keras. Averaged the predictions of fold models.\n- Got **0.802 LB** score.\n\nUpcoming versions will include:\n- Augmentations [Added]\n- K-Fold validation [Added]\n- Use of different sized images.\n- Better model\n\nStay tuned 🙂",
      "votes": 4
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1098172": "[[HuBMAP] Keras-Pipeline (Training+Inference)](https://www.kaggle.com/joshi98kishan/hubmap-keras-pipeline-training-inference)\n\nIn this notebook, we will see end-to-end Keras pipeline from data preprocessing to inference (Submission).\n\nThe notebook goes like this (Version 12 of NB):\n- Installed `segmentation_models` library offline.\n- Created a simple but robust data pipeline using `tf.data` api.\n     -  Data preprocessing: Used iafoss's 256x256 images and normalized to [0-1] range.\n     -  Augmentations\n- Created a model using `segmentation_models` library: U-Net with pretrained ResNet34 encoder.\n     - This library returns a keras model, hence it is easy to train it with `fit()` method and do \n        predictions with `predict()` method.\n- Training - Group K Fold\n- Loss: Binary Crossentropy\n- Optimizer: Adam\n- Used @leighplt's [inference code](https://www.kaggle.com/leighplt/pytorch-fcn-resnet50) for PyTorch model and modified it for Keras. Averaged the predictions of fold models.\n- Got **0.802 LB** score.\n\nUpcoming versions will include:\n- Augmentations [Added]\n- K-Fold validation [Added]\n- Use of different sized images.\n- Better model\n\nStay tuned 🙂"
  }
}