{
  "id": 200626,
  "title": "[LB 0.842] baseline solution & some tips",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/200626",
  "author_name": "phalanx",
  "post_date": "2020-12-01T07:21:00.322000",
  "votes": 95,
  "comment_count": 18,
  "views": 0,
  "content": "<p>share my solution overview, it is just baseline solution</p>\n<pre><code>dataset\n  - no external data\n  - image resolution: 256x256\nmodel\n  - vanilla unet\n  - encoder: seresnext50(imagenet pretrained)\ntrain\n  - 4-fold\n  - augmentation: flip, random shift, random rotate\n  - loss: bce\n  - epochs: 60\n  - optimizer: Adam\n  - scheduler: cosine annealing\nCV: 0.8887, LB: 0.842\n</code></pre>\n<h3>tips</h3>\n<p>similar competition</p>\n<ul>\n<li><a href=\"https://monusac-2020.grand-challenge.org/Home/\" target=\"_blank\">MoNuSAC 2020</a></li>\n<li><a href=\"https://www.kaggle.com/c/data-science-bowl-2018\" target=\"_blank\">data science bowl 2018</a></li>\n<li><a href=\"https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation\" target=\"_blank\">SIIM-ACR Pneumothorax Segmentation</a></li>\n<li><a href=\"https://www.kaggle.com/c/prostate-cancer-grade-assessment\" target=\"_blank\">prostate-cancer-grade-assessment</a></li>\n</ul>\n<p>segmentation approach</p>\n<ul>\n<li>model architecture<ul>\n<li><a href=\"https://arxiv.org/abs/1909.11065\" target=\"_blank\">object contextual representation</a> (eccv'20)</li>\n<li><a href=\"https://arxiv.org/abs/2004.08222\" target=\"_blank\">context adaptive convolution</a> (eccv'20)</li>\n<li><a href=\"https://arxiv.org/abs/2002.10120\" target=\"_blank\">semantic flow</a> (eccv'20)</li>\n<li><a href=\"https://arxiv.org/abs/2007.04269\" target=\"_blank\">SegFix</a> (eccv'20)</li>\n<li><a href=\"https://openaccess.thecvf.com/content_CVPR_2020/papers/Cheng_CascadePSP_Toward_Class-Agnostic_and_Very_High-Resolution_Segmentation_via_Global_and_CVPR_2020_paper.pdf\" target=\"_blank\">CascadePSP</a> (cvpr'20)</li>\n<li><a href=\"https://openaccess.thecvf.com/content_CVPR_2020/papers/Kirillov_PointRend_Image_Segmentation_As_Rendering_CVPR_2020_paper.pdf\" target=\"_blank\">pointrend</a> (cvpr'20)</li>\n<li><a href=\"https://openaccess.thecvf.com/content_CVPR_2020/papers/Yu_Context_Prior_for_Scene_Segmentation_CVPR_2020_paper.pdf\" target=\"_blank\">context prior</a> (cvpr'20)</li>\n<li><a href=\"https://arxiv.org/abs/2005.10821\" target=\"_blank\">hierachical multi scale attention</a> (arxiv'20)</li></ul></li>\n<li>loss function<ul>\n<li><a href=\"https://arxiv.org/abs/1512.07797\" target=\"_blank\">lovasz hinge</a></li>\n<li>bce loss</li>\n<li>dice loss</li>\n<li>focal loss</li>\n<li><a href=\"https://arxiv.org/abs/2010.07930\" target=\"_blank\">auto seg-loss</a></li>\n<li><a href=\"https://arxiv.org/abs/2011.01462\" target=\"_blank\">distribution-aware margin calibration</a></li></ul></li>\n<li>optimizer<ul>\n<li>Adam</li>\n<li><a href=\"https://arxiv.org/abs/1908.03265\" target=\"_blank\">Radam</a></li>\n<li><a href=\"https://juntang-zhuang.github.io/adabelief/\" target=\"_blank\">AdaBelief</a></li></ul></li>\n</ul>",
  "messages": [
    {
      "id": 1097684,
      "postDate": "2020-12-01T07:21:00.323Z",
      "content": "<p>share my solution overview, it is just baseline solution</p>\n<pre><code>dataset\n  - no external data\n  - image resolution: 256x256\nmodel\n  - vanilla unet\n  - encoder: seresnext50(imagenet pretrained)\ntrain\n  - 4-fold\n  - augmentation: flip, random shift, random rotate\n  - loss: bce\n  - epochs: 60\n  - optimizer: Adam\n  - scheduler: cosine annealing\nCV: 0.8887, LB: 0.842\n</code></pre>\n<h3>tips</h3>\n<p>similar competition</p>\n<ul>\n<li><a href=\"https://monusac-2020.grand-challenge.org/Home/\" target=\"_blank\">MoNuSAC 2020</a></li>\n<li><a href=\"https://www.kaggle.com/c/data-science-bowl-2018\" target=\"_blank\">data science bowl 2018</a></li>\n<li><a href=\"https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation\" target=\"_blank\">SIIM-ACR Pneumothorax Segmentation</a></li>\n<li><a href=\"https://www.kaggle.com/c/prostate-cancer-grade-assessment\" target=\"_blank\">prostate-cancer-grade-assessment</a></li>\n</ul>\n<p>segmentation approach</p>\n<ul>\n<li>model architecture<ul>\n<li><a href=\"https://arxiv.org/abs/1909.11065\" target=\"_blank\">object contextual representation</a> (eccv'20)</li>\n<li><a href=\"https://arxiv.org/abs/2004.08222\" target=\"_blank\">context adaptive convolution</a> (eccv'20)</li>\n<li><a href=\"https://arxiv.org/abs/2002.10120\" target=\"_blank\">semantic flow</a> (eccv'20)</li>\n<li><a href=\"https://arxiv.org/abs/2007.04269\" target=\"_blank\">SegFix</a> (eccv'20)</li>\n<li><a href=\"https://openaccess.thecvf.com/content_CVPR_2020/papers/Cheng_CascadePSP_Toward_Class-Agnostic_and_Very_High-Resolution_Segmentation_via_Global_and_CVPR_2020_paper.pdf\" target=\"_blank\">CascadePSP</a> (cvpr'20)</li>\n<li><a href=\"https://openaccess.thecvf.com/content_CVPR_2020/papers/Kirillov_PointRend_Image_Segmentation_As_Rendering_CVPR_2020_paper.pdf\" target=\"_blank\">pointrend</a> (cvpr'20)</li>\n<li><a href=\"https://openaccess.thecvf.com/content_CVPR_2020/papers/Yu_Context_Prior_for_Scene_Segmentation_CVPR_2020_paper.pdf\" target=\"_blank\">context prior</a> (cvpr'20)</li>\n<li><a href=\"https://arxiv.org/abs/2005.10821\" target=\"_blank\">hierachical multi scale attention</a> (arxiv'20)</li></ul></li>\n<li>loss function<ul>\n<li><a href=\"https://arxiv.org/abs/1512.07797\" target=\"_blank\">lovasz hinge</a></li>\n<li>bce loss</li>\n<li>dice loss</li>\n<li>focal loss</li>\n<li><a href=\"https://arxiv.org/abs/2010.07930\" target=\"_blank\">auto seg-loss</a></li>\n<li><a href=\"https://arxiv.org/abs/2011.01462\" target=\"_blank\">distribution-aware margin calibration</a></li></ul></li>\n<li>optimizer<ul>\n<li>Adam</li>\n<li><a href=\"https://arxiv.org/abs/1908.03265\" target=\"_blank\">Radam</a></li>\n<li><a href=\"https://juntang-zhuang.github.io/adabelief/\" target=\"_blank\">AdaBelief</a></li></ul></li>\n</ul>",
      "rawMarkdown": "share my solution overview, it is just baseline solution\n```\ndataset\n  - no external data\n  - image resolution: 256x256\nmodel\n  - vanilla unet\n  - encoder: seresnext50(imagenet pretrained)\ntrain\n  - 4-fold\n  - augmentation: flip, random shift, random rotate\n  - loss: bce\n  - epochs: 60\n  - optimizer: Adam\n  - scheduler: cosine annealing\nCV: 0.8887, LB: 0.842\n```\n### tips\nsimilar competition\n- [MoNuSAC 2020](https://monusac-2020.grand-challenge.org/Home/)\n- [data science bowl 2018](https://www.kaggle.com/c/data-science-bowl-2018)\n- [SIIM-ACR Pneumothorax Segmentation](https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation)\n- [prostate-cancer-grade-assessment](https://www.kaggle.com/c/prostate-cancer-grade-assessment)\n\nsegmentation approach\n  - model architecture\n    - [object contextual representation](https://arxiv.org/abs/1909.11065) (eccv'20)\n    - [context adaptive convolution](https://arxiv.org/abs/2004.08222) (eccv'20)\n    - [semantic flow](https://arxiv.org/abs/2002.10120) (eccv'20)\n    - [SegFix](https://arxiv.org/abs/2007.04269) (eccv'20)\n    - [CascadePSP](https://openaccess.thecvf.com/content_CVPR_2020/papers/Cheng_CascadePSP_Toward_Class-Agnostic_and_Very_High-Resolution_Segmentation_via_Global_and_CVPR_2020_paper.pdf) (cvpr'20)\n    - [pointrend](https://openaccess.thecvf.com/content_CVPR_2020/papers/Kirillov_PointRend_Image_Segmentation_As_Rendering_CVPR_2020_paper.pdf) (cvpr'20)\n    - [context prior](https://openaccess.thecvf.com/content_CVPR_2020/papers/Yu_Context_Prior_for_Scene_Segmentation_CVPR_2020_paper.pdf) (cvpr'20)\n    - [hierachical multi scale attention](https://arxiv.org/abs/2005.10821) (arxiv'20)\n  - loss function\n    - [lovasz hinge](https://arxiv.org/abs/1512.07797)\n    - bce loss\n    - dice loss\n    - focal loss\n    - [auto seg-loss](https://arxiv.org/abs/2010.07930)\n    - [distribution-aware margin calibration](https://arxiv.org/abs/2011.01462)\n  - optimizer\n    - Adam\n    - [Radam](https://arxiv.org/abs/1908.03265)\n    - [AdaBelief](https://juntang-zhuang.github.io/adabelief/)",
      "votes": 95
    },
    {
      "id": 1101262,
      "postDate": "2020-12-03T18:55:40.703Z",
      "content": "<p>fyi, resnet34-unet can get to lb 8.40.<br>\nthis is single fold (trained with all images) with 3x tta (original hflip and vflip)<br>\nthere is no post-processing yet (i.e. results is submitted with some noise of small objects due to boundary problem)</p>\n<p>trained with 0.25 scale, on 320x320 tiles<br>\nloss is BCE<br>\noptimizer is Lookahead+RAdam, hand adjusted learning rate  1e-3, 1e-4 to 1e-5</p>\n<p>because it is resnet34, inference time is 11 min on titianX pascal gpu for all 5 test images</p>\n<pre><code>inference tile:\n    tile_size = 600  \n    tile_average_step = 192  \n\n\n b9a3865fc  324 / 325    2 min 05 sec   (id, num of tiles, time)\n b2dc8411c     88 / 89     2 min 55 sec\n 26dc41664  339 / 340   5 min 09 sec\n c68fe75ea  387 / 388    7 min 48 sec\n afa5e8098  451 / 452   10 min 46 sec\n</code></pre>",
      "rawMarkdown": "fyi, resnet34-unet can get to lb 8.40.\nthis is single fold (trained with all images) with 3x tta (original hflip and vflip)\nthere is no post-processing yet (i.e. results is submitted with some noise of small objects due to boundary problem)\n\ntrained with 0.25 scale, on 320x320 tiles\nloss is BCE\noptimizer is Lookahead+RAdam, hand adjusted learning rate  1e-3, 1e-4 to 1e-5\n\nbecause it is resnet34, inference time is 11 min on titianX pascal gpu for all 5 test images\n\n```\ninference tile:\n    tile_size = 600  \n    tile_average_step = 192  \n\n\n b9a3865fc  324 / 325    2 min 05 sec   (id, num of tiles, time)\n b2dc8411c     88 / 89     2 min 55 sec\n 26dc41664  339 / 340   5 min 09 sec\n c68fe75ea  387 / 388    7 min 48 sec\n afa5e8098  451 / 452   10 min 46 sec\n```",
      "votes": 10,
      "replies": [
        {
          "id": 1101356,
          "postDate": "2020-12-03T20:40:53.467Z",
          "content": "<p>Improves Lookahead+RAdam your score compared with i.e. Adam? Our single fold scores (only tried 2 folds) are 0.844 with Adam.</p>",
          "rawMarkdown": "Improves Lookahead+RAdam your score compared with i.e. Adam? Our single fold scores (only tried 2 folds) are 0.844 with Adam.",
          "votes": 2
        },
        {
          "id": 1101739,
          "postDate": "2020-12-04T07:32:26.763Z",
          "content": "<p><a href=\"https://www.kaggle.com/tugstugi\" target=\"_blank\">@tugstugi</a> </p>\n<p>i don't think it is due to the optimizer.<br>\ni think your augmentation or your windowing (e.g crop size and step) is much better.</p>\n<p>thanks for the information! </p>",
          "rawMarkdown": "@tugstugi \n\ni don't think it is due to the optimizer.\ni think your augmentation or your windowing (e.g crop size and step) is much better.\n\nthanks for the information! ",
          "votes": 1
        },
        {
          "id": 1101953,
          "postDate": "2020-12-04T12:53:07.040Z",
          "content": "<p><a href=\"https://www.kaggle.com/tugstugi\" target=\"_blank\">@tugstugi</a> </p>\n<p>i confirm the following change my LB from 0.837 to 0.845 for resnet34-unet</p>\n<pre><code>LB 0.837 : batch size =16 / size=320x320\nLB 0.845 : batch size =32 / size=256x256\n\nsingle fold (one image for validation, rest for training)\nall using optimizer = Lookahead+RAdam\n</code></pre>",
          "rawMarkdown": "@tugstugi \n\ni confirm the following change my LB from 0.837 to 0.845 for resnet34-unet\n\n```\nLB 0.837 : batch size =16 / size=320x320\nLB 0.845 : batch size =32 / size=256x256\n\nsingle fold (one image for validation, rest for training)\nall using optimizer = Lookahead+RAdam\n``` ",
          "votes": 5
        },
        {
          "id": 1132337,
          "postDate": "2020-12-30T10:19:40.370Z",
          "content": "<p>Hi, i have two questions:</p>\n<ol>\n<li>do you train the unet34 with both encoder and decoder, or just decoder? of course, fine-tuning with the pre-trained model with ImageNet. </li>\n<li>why your inference tile size(600x600) is different from the training tile size(256x256)?<br>\nThanks!</li>\n</ol>",
          "rawMarkdown": "Hi, i have two questions:\n1. do you train the unet34 with both encoder and decoder, or just decoder? of course, fine-tuning with the pre-trained model with ImageNet. \n2. why your inference tile size(600x600) is different from the training tile size(256x256)?\nThanks!"
        }
      ]
    },
    {
      "id": 1099633,
      "postDate": "2020-12-02T13:48:57.653Z",
      "content": "<p><a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a> hi, nice work, your baseline got a great LB, my model cv is 0.898, but the lb is 0.839.<br>\nI want to ask a questions: how did you preprocess the data before the training?</p>",
      "rawMarkdown": "@phalanx hi, nice work, your baseline got a great LB, my model cv is 0.898, but the lb is 0.839.\nI want to ask a questions: how did you preprocess the data before the training?",
      "replies": [
        {
          "id": 1100632,
          "postDate": "2020-12-03T07:54:09.373Z",
          "content": "<p>resize and crop image by sliding window</p>",
          "rawMarkdown": "resize and crop image by sliding window"
        }
      ]
    },
    {
      "id": 1125739,
      "postDate": "2020-12-25T02:54:38.220Z",
      "content": "<p>hi, I just obtain 0.830 on the public test data.<br>\nI think the reason may be the training data.<br>\ncould you share the patch numbers of train images and the detailed strategy to generate image patchs?\\</p>\n<p>Thanks</p>",
      "rawMarkdown": "hi, I just obtain 0.830 on the public test data.\nI think the reason may be the training data.\ncould you share the patch numbers of train images and the detailed strategy to generate image patchs?\\\n\nThanks\n"
    },
    {
      "id": 1104614,
      "postDate": "2020-12-07T05:57:07.847Z",
      "content": "<p>Nice tips! Did you generate 256x256 dataset by yourself, or use some public available resources?</p>",
      "rawMarkdown": "Nice tips! Did you generate 256x256 dataset by yourself, or use some public available resources?"
    },
    {
      "id": 1104240,
      "postDate": "2020-12-06T18:29:40.307Z",
      "content": "<p>How you have done train/split? Using tiles or first splitting by images?</p>",
      "rawMarkdown": "How you have done train/split? Using tiles or first splitting by images?"
    },
    {
      "id": 1098862,
      "postDate": "2020-12-01T22:59:42.373Z",
      "content": "<p>How do you make the inference+committing, I am using rasterio but it is extremly slow</p>",
      "rawMarkdown": "How do you make the inference+committing, I am using rasterio but it is extremly slow",
      "replies": [
        {
          "id": 1100623,
          "postDate": "2020-12-03T07:48:02.830Z",
          "content": "<p>sliding window, overlap region is 40</p>",
          "rawMarkdown": "sliding window, overlap region is 40",
          "votes": 2
        },
        {
          "id": 1132339,
          "postDate": "2020-12-30T10:23:48.367Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>, how do you crop the image, cropped on the original .tiff image or resized/scaled small original image? </p>",
          "rawMarkdown": "Hi @phalanx, how do you crop the image, cropped on the original .tiff image or resized/scaled small original image? "
        }
      ]
    },
    {
      "id": 1098462,
      "postDate": "2020-12-01T16:52:00.133Z",
      "content": "<p>nice, how much is the single fold score?</p>",
      "rawMarkdown": "nice, how much is the single fold score?",
      "replies": [
        {
          "id": 1099129,
          "postDate": "2020-12-02T05:25:37.460Z",
          "content": "<p>train_test_split: 0.8, 0.2<br>\nCV: 0.880, LB: 0.839</p>",
          "rawMarkdown": "train_test_split: 0.8, 0.2\nCV: 0.880, LB: 0.839",
          "votes": 1
        },
        {
          "id": 1132344,
          "postDate": "2020-12-30T10:26:36.023Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>, do you split the dataset by patient id, or just randomly split the 256x256 images?</p>",
          "rawMarkdown": "Hi @phalanx, do you split the dataset by patient id, or just randomly split the 256x256 images?"
        }
      ]
    },
    {
      "id": 1106644,
      "postDate": "2020-12-09T02:19:03.717Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1101019,
      "postDate": "2020-12-03T15:06:59.647Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1101262,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2020-12-03T18:55:40.703000",
      "content": "<p>fyi, resnet34-unet can get to lb 8.40.<br>\nthis is single fold (trained with all images) with 3x tta (original hflip and vflip)<br>\nthere is no post-processing yet (i.e. results is submitted with some noise of small objects due to boundary problem)</p>\n<p>trained with 0.25 scale, on 320x320 tiles<br>\nloss is BCE<br>\noptimizer is Lookahead+RAdam, hand adjusted learning rate  1e-3, 1e-4 to 1e-5</p>\n<p>because it is resnet34, inference time is 11 min on titianX pascal gpu for all 5 test images</p>\n<pre><code>inference tile:\n    tile_size = 600  \n    tile_average_step = 192  \n\n\n b9a3865fc  324 / 325    2 min 05 sec   (id, num of tiles, time)\n b2dc8411c     88 / 89     2 min 55 sec\n 26dc41664  339 / 340   5 min 09 sec\n c68fe75ea  387 / 388    7 min 48 sec\n afa5e8098  451 / 452   10 min 46 sec\n</code></pre>",
      "votes": 10,
      "replies": [
        {
          "id": 1101356,
          "author_name": "tugstugi",
          "author_url": "",
          "post_date": "2020-12-03T20:40:53.467000",
          "content": "<p>Improves Lookahead+RAdam your score compared with i.e. Adam? Our single fold scores (only tried 2 folds) are 0.844 with Adam.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1101739,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2020-12-04T07:32:26.763000",
          "content": "<p><a href=\"https://www.kaggle.com/tugstugi\" target=\"_blank\">@tugstugi</a> </p>\n<p>i don't think it is due to the optimizer.<br>\ni think your augmentation or your windowing (e.g crop size and step) is much better.</p>\n<p>thanks for the information! </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1101953,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2020-12-04T12:53:07.040000",
          "content": "<p><a href=\"https://www.kaggle.com/tugstugi\" target=\"_blank\">@tugstugi</a> </p>\n<p>i confirm the following change my LB from 0.837 to 0.845 for resnet34-unet</p>\n<pre><code>LB 0.837 : batch size =16 / size=320x320\nLB 0.845 : batch size =32 / size=256x256\n\nsingle fold (one image for validation, rest for training)\nall using optimizer = Lookahead+RAdam\n</code></pre>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 1132337,
          "author_name": "aikeyz",
          "author_url": "",
          "post_date": "2020-12-30T10:19:40.370000",
          "content": "<p>Hi, i have two questions:</p>\n<ol>\n<li>do you train the unet34 with both encoder and decoder, or just decoder? of course, fine-tuning with the pre-trained model with ImageNet. </li>\n<li>why your inference tile size(600x600) is different from the training tile size(256x256)?<br>\nThanks!</li>\n</ol>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1099633,
      "author_name": "Gary",
      "author_url": "",
      "post_date": "2020-12-02T13:48:57.653000",
      "content": "<p><a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a> hi, nice work, your baseline got a great LB, my model cv is 0.898, but the lb is 0.839.<br>\nI want to ask a questions: how did you preprocess the data before the training?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1100632,
          "author_name": "phalanx",
          "author_url": "",
          "post_date": "2020-12-03T07:54:09.373000",
          "content": "<p>resize and crop image by sliding window</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1125739,
      "author_name": "circlewe",
      "author_url": "",
      "post_date": "2020-12-25T02:54:38.220000",
      "content": "<p>hi, I just obtain 0.830 on the public test data.<br>\nI think the reason may be the training data.<br>\ncould you share the patch numbers of train images and the detailed strategy to generate image patchs?\\</p>\n<p>Thanks</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1104614,
      "author_name": "Jackie",
      "author_url": "",
      "post_date": "2020-12-07T05:57:07.847000",
      "content": "<p>Nice tips! Did you generate 256x256 dataset by yourself, or use some public available resources?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1104240,
      "author_name": "Marcelo Sánchez Ortega",
      "author_url": "",
      "post_date": "2020-12-06T18:29:40.307000",
      "content": "<p>How you have done train/split? Using tiles or first splitting by images?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1098862,
      "author_name": "Marcelo Sánchez Ortega",
      "author_url": "",
      "post_date": "2020-12-01T22:59:42.373000",
      "content": "<p>How do you make the inference+committing, I am using rasterio but it is extremly slow</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1100623,
          "author_name": "phalanx",
          "author_url": "",
          "post_date": "2020-12-03T07:48:02.830000",
          "content": "<p>sliding window, overlap region is 40</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1132339,
          "author_name": "aikeyz",
          "author_url": "",
          "post_date": "2020-12-30T10:23:48.367000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>, how do you crop the image, cropped on the original .tiff image or resized/scaled small original image? </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1098462,
      "author_name": "tugstugi",
      "author_url": "",
      "post_date": "2020-12-01T16:52:00.133000",
      "content": "<p>nice, how much is the single fold score?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1099129,
          "author_name": "phalanx",
          "author_url": "",
          "post_date": "2020-12-02T05:25:37.460000",
          "content": "<p>train_test_split: 0.8, 0.2<br>\nCV: 0.880, LB: 0.839</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1132344,
          "author_name": "aikeyz",
          "author_url": "",
          "post_date": "2020-12-30T10:26:36.023000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>, do you split the dataset by patient id, or just randomly split the 256x256 images?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1106644,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-12-09T02:19:03.717000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1101019,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-12-03T15:06:59.647000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1097684": "share my solution overview, it is just baseline solution\n```\ndataset\n  - no external data\n  - image resolution: 256x256\nmodel\n  - vanilla unet\n  - encoder: seresnext50(imagenet pretrained)\ntrain\n  - 4-fold\n  - augmentation: flip, random shift, random rotate\n  - loss: bce\n  - epochs: 60\n  - optimizer: Adam\n  - scheduler: cosine annealing\nCV: 0.8887, LB: 0.842\n```\n### tips\nsimilar competition\n- [MoNuSAC 2020](https://monusac-2020.grand-challenge.org/Home/)\n- [data science bowl 2018](https://www.kaggle.com/c/data-science-bowl-2018)\n- [SIIM-ACR Pneumothorax Segmentation](https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation)\n- [prostate-cancer-grade-assessment](https://www.kaggle.com/c/prostate-cancer-grade-assessment)\n\nsegmentation approach\n  - model architecture\n    - [object contextual representation](https://arxiv.org/abs/1909.11065) (eccv'20)\n    - [context adaptive convolution](https://arxiv.org/abs/2004.08222) (eccv'20)\n    - [semantic flow](https://arxiv.org/abs/2002.10120) (eccv'20)\n    - [SegFix](https://arxiv.org/abs/2007.04269) (eccv'20)\n    - [CascadePSP](https://openaccess.thecvf.com/content_CVPR_2020/papers/Cheng_CascadePSP_Toward_Class-Agnostic_and_Very_High-Resolution_Segmentation_via_Global_and_CVPR_2020_paper.pdf) (cvpr'20)\n    - [pointrend](https://openaccess.thecvf.com/content_CVPR_2020/papers/Kirillov_PointRend_Image_Segmentation_As_Rendering_CVPR_2020_paper.pdf) (cvpr'20)\n    - [context prior](https://openaccess.thecvf.com/content_CVPR_2020/papers/Yu_Context_Prior_for_Scene_Segmentation_CVPR_2020_paper.pdf) (cvpr'20)\n    - [hierachical multi scale attention](https://arxiv.org/abs/2005.10821) (arxiv'20)\n  - loss function\n    - [lovasz hinge](https://arxiv.org/abs/1512.07797)\n    - bce loss\n    - dice loss\n    - focal loss\n    - [auto seg-loss](https://arxiv.org/abs/2010.07930)\n    - [distribution-aware margin calibration](https://arxiv.org/abs/2011.01462)\n  - optimizer\n    - Adam\n    - [Radam](https://arxiv.org/abs/1908.03265)\n    - [AdaBelief](https://juntang-zhuang.github.io/adabelief/)",
    "1101262": "fyi, resnet34-unet can get to lb 8.40.\nthis is single fold (trained with all images) with 3x tta (original hflip and vflip)\nthere is no post-processing yet (i.e. results is submitted with some noise of small objects due to boundary problem)\n\ntrained with 0.25 scale, on 320x320 tiles\nloss is BCE\noptimizer is Lookahead+RAdam, hand adjusted learning rate  1e-3, 1e-4 to 1e-5\n\nbecause it is resnet34, inference time is 11 min on titianX pascal gpu for all 5 test images\n\n```\ninference tile:\n    tile_size = 600  \n    tile_average_step = 192  \n\n\n b9a3865fc  324 / 325    2 min 05 sec   (id, num of tiles, time)\n b2dc8411c     88 / 89     2 min 55 sec\n 26dc41664  339 / 340   5 min 09 sec\n c68fe75ea  387 / 388    7 min 48 sec\n afa5e8098  451 / 452   10 min 46 sec\n```",
    "1099633": "@phalanx hi, nice work, your baseline got a great LB, my model cv is 0.898, but the lb is 0.839.\nI want to ask a questions: how did you preprocess the data before the training?",
    "1125739": "hi, I just obtain 0.830 on the public test data.\nI think the reason may be the training data.\ncould you share the patch numbers of train images and the detailed strategy to generate image patchs?\\\n\nThanks\n",
    "1104614": "Nice tips! Did you generate 256x256 dataset by yourself, or use some public available resources?",
    "1104240": "How you have done train/split? Using tiles or first splitting by images?",
    "1098862": "How do you make the inference+committing, I am using rasterio but it is extremly slow",
    "1098462": "nice, how much is the single fold score?",
    "1106644": "",
    "1101019": ""
  }
}