{
  "id": 146216,
  "title": "[updated] Classification? Segmentation? Some results share",
  "url": "/competitions/prostate-cancer-grade-assessment/discussion/146216",
  "author_name": "Tsai29",
  "post_date": "2020-04-26T09:48:36.797000",
  "votes": 27,
  "comment_count": 6,
  "views": 0,
  "content": "<p>From the beginning, I thought this is a multi-class segmentation competition, since pretty much all the famous articles were using segmentation model(perhaps with classifier to deal with segmentation result) to solve this problem. But from public notebooks and discussion section, we knew that pure classification model(maybe with some extra regression job) would be able to give a pretty decent score. Anyway, I would like to share some of my thoughts about using segmentation model to solve the problem.</p>\n\n<p>Since only <code>radboud</code> data has enough mask label for us to classify the gleason score, so I only use their data and mask to train the segmentation model. And the result was PRETTY BAD.\nI was using regular Unet with efficientnetB0 backbone, Adam optimizer, low learning rate, 512x1024 resolution and some basic augmentation. The dice coefficient stop improve after around 30-40 epochs. It is not too difficult for model to segment the background, healthy region and cancerous region, but the classification job on cancerous epithelium is hard. The model can't recognize the type of cancerous epithelium is belong to gleason3, gleason4 or gleason5 at all, at least in my case.</p>\n\n<p>I think the problem might be the labeled mask is too noisy to use, since the mask is labeled by different people from ISUP_Grade label. Or maybe I need to use larger resolution/more detailed image to deal with segmentation task.</p>\n\n<p>Anyway just want to share you guys some of my experiment. But I will still keep trying to use segmentation model to solve the problem, since I am more interested in segmentation task. </p>\n\n<p>If you saw me show on Leaderboard, it might means I finally manage to use segmentation model to get the normal result, or I just quit to use segmentation model anymore😅 </p>\n\n<p>Good luck</p>\n\n<hr>\n\n<p>After several experiments, turns out the real problem is due to my wrong implement of loss function. Segmentation task is totally feasible.</p>\n\n<p>simple result share:</p>\n\n<p><code>\nbackbone : Efficinetb0\nmodel type : u-net\ntraining detail : single fold, no augmentation/tta\nCV : 0.44\nLB : 0.53\n</code></p>",
  "messages": [
    {
      "id": 821617,
      "postDate": "2020-04-26T09:48:36.797Z",
      "content": "<p>From the beginning, I thought this is a multi-class segmentation competition, since pretty much all the famous articles were using segmentation model(perhaps with classifier to deal with segmentation result) to solve this problem. But from public notebooks and discussion section, we knew that pure classification model(maybe with some extra regression job) would be able to give a pretty decent score. Anyway, I would like to share some of my thoughts about using segmentation model to solve the problem.</p>\n\n<p>Since only <code>radboud</code> data has enough mask label for us to classify the gleason score, so I only use their data and mask to train the segmentation model. And the result was PRETTY BAD.\nI was using regular Unet with efficientnetB0 backbone, Adam optimizer, low learning rate, 512x1024 resolution and some basic augmentation. The dice coefficient stop improve after around 30-40 epochs. It is not too difficult for model to segment the background, healthy region and cancerous region, but the classification job on cancerous epithelium is hard. The model can't recognize the type of cancerous epithelium is belong to gleason3, gleason4 or gleason5 at all, at least in my case.</p>\n\n<p>I think the problem might be the labeled mask is too noisy to use, since the mask is labeled by different people from ISUP_Grade label. Or maybe I need to use larger resolution/more detailed image to deal with segmentation task.</p>\n\n<p>Anyway just want to share you guys some of my experiment. But I will still keep trying to use segmentation model to solve the problem, since I am more interested in segmentation task. </p>\n\n<p>If you saw me show on Leaderboard, it might means I finally manage to use segmentation model to get the normal result, or I just quit to use segmentation model anymore😅 </p>\n\n<p>Good luck</p>\n\n<hr>\n\n<p>After several experiments, turns out the real problem is due to my wrong implement of loss function. Segmentation task is totally feasible.</p>\n\n<p>simple result share:</p>\n\n<p><code>\nbackbone : Efficinetb0\nmodel type : u-net\ntraining detail : single fold, no augmentation/tta\nCV : 0.44\nLB : 0.53\n</code></p>",
      "rawMarkdown": "From the beginning, I thought this is a multi-class segmentation competition, since pretty much all the famous articles were using segmentation model(perhaps with classifier to deal with segmentation result) to solve this problem. But from public notebooks and discussion section, we knew that pure classification model(maybe with some extra regression job) would be able to give a pretty decent score. Anyway, I would like to share some of my thoughts about using segmentation model to solve the problem.\n\nSince only `radboud` data has enough mask label for us to classify the gleason score, so I only use their data and mask to train the segmentation model. And the result was PRETTY BAD.\nI was using regular Unet with efficientnetB0 backbone, Adam optimizer, low learning rate, 512x1024 resolution and some basic augmentation. The dice coefficient stop improve after around 30-40 epochs. It is not too difficult for model to segment the background, healthy region and cancerous region, but the classification job on cancerous epithelium is hard. The model can't recognize the type of cancerous epithelium is belong to gleason3, gleason4 or gleason5 at all, at least in my case.\n\nI think the problem might be the labeled mask is too noisy to use, since the mask is labeled by different people from ISUP_Grade label. Or maybe I need to use larger resolution/more detailed image to deal with segmentation task.\n\nAnyway just want to share you guys some of my experiment. But I will still keep trying to use segmentation model to solve the problem, since I am more interested in segmentation task. \n\nIf you saw me show on Leaderboard, it might means I finally manage to use segmentation model to get the normal result, or I just quit to use segmentation model anymore😅 \n\nGood luck\n\n\n------------------------------------------------------------------------------------------\n\nAfter several experiments, turns out the real problem is due to my wrong implement of loss function. Segmentation task is totally feasible.\n\nsimple result share:\n\n```\nbackbone : Efficinetb0\nmodel type : u-net\ntraining detail : single fold, no augmentation/tta\nCV : 0.44\nLB : 0.53\n```",
      "votes": 26
    },
    {
      "id": 822092,
      "postDate": "2020-04-26T16:58:11.363Z",
      "content": "<p>Thanks for sharing! Another idea is to maybe use CenterNet like in the Peking/Baidu competition a few months back. Combining segmentation with regression.</p>",
      "rawMarkdown": "Thanks for sharing! Another idea is to maybe use CenterNet like in the Peking/Baidu competition a few months back. Combining segmentation with regression.",
      "votes": 1
    },
    {
      "id": 821633,
      "postDate": "2020-04-26T10:07:20.207Z",
      "content": "<p>Thanks for sharing your results, I'm also curious about the segmentation/classification challenge</p>",
      "rawMarkdown": "Thanks for sharing your results, I'm also curious about the segmentation/classification challenge",
      "votes": 1,
      "replies": [
        {
          "id": 821642,
          "postDate": "2020-04-26T10:16:02.653Z",
          "content": "<p>I think the gleason classification on segmented pixels is possible, but I didn't find the trick yet. Since the gleason3, gleason4 and gleason5 masked label is a little bit like labeled by machine/model. So I am assuming this is a possible task, but difficult.</p>",
          "rawMarkdown": "I think the gleason classification on segmented pixels is possible, but I didn't find the trick yet. Since the gleason3, gleason4 and gleason5 masked label is a little bit like labeled by machine/model. So I am assuming this is a possible task, but difficult."
        },
        {
          "id": 827418,
          "postDate": "2020-04-30T09:30:50.290Z",
          "content": "<p>Hi Xie29, classification from segmentation is certainly possible, there are some details about translating segmentation results in the supplemental information of our Lancet Oncology paper: (preprint) <a href=\"https://arxiv.org/src/1907.07980v1/anc/Supplementary_Information.pdf\">https://arxiv.org/src/1907.07980v1/anc/Supplementary_Information.pdf</a> </p>\n\n<p>As for tips for your U-Net: make sure you use a high enough resolution, and using oversampling or weight maps can help to balance the labels. </p>\n\n<p>Good luck!</p>",
          "rawMarkdown": "Hi Xie29, classification from segmentation is certainly possible, there are some details about translating segmentation results in the supplemental information of our Lancet Oncology paper: (preprint) https://arxiv.org/src/1907.07980v1/anc/Supplementary_Information.pdf \n\nAs for tips for your U-Net: make sure you use a high enough resolution, and using oversampling or weight maps can help to balance the labels. \n\nGood luck!",
          "votes": 4
        },
        {
          "id": 827640,
          "postDate": "2020-04-30T12:34:31.650Z",
          "content": "<p><a href=\"/hanspinckaers\">@hanspinckaers</a> Thank you so much for the tips. I already has some small progress on segmentation task, the image resolution is quite important in my experiment. But the data is quite huge, I am still searching the balance between resolution and training/inference speed. Great paper by the way.</p>",
          "rawMarkdown": "@hanspinckaers Thank you so much for the tips. I already has some small progress on segmentation task, the image resolution is quite important in my experiment. But the data is quite huge, I am still searching the balance between resolution and training/inference speed. Great paper by the way.",
          "votes": 1
        }
      ]
    },
    {
      "id": 821629,
      "postDate": "2020-04-26T10:00:37.367Z",
      "content": "<p>Thanks so much :D</p>",
      "rawMarkdown": "Thanks so much :D",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 822092,
      "author_name": "GreatGameDota",
      "author_url": "",
      "post_date": "2020-04-26T16:58:11.363000",
      "content": "<p>Thanks for sharing! Another idea is to maybe use CenterNet like in the Peking/Baidu competition a few months back. Combining segmentation with regression.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 821633,
      "author_name": "Matt",
      "author_url": "",
      "post_date": "2020-04-26T10:07:20.207000",
      "content": "<p>Thanks for sharing your results, I'm also curious about the segmentation/classification challenge</p>",
      "votes": 1,
      "replies": [
        {
          "id": 821642,
          "author_name": "Tsai29",
          "author_url": "",
          "post_date": "2020-04-26T10:16:02.653000",
          "content": "<p>I think the gleason classification on segmented pixels is possible, but I didn't find the trick yet. Since the gleason3, gleason4 and gleason5 masked label is a little bit like labeled by machine/model. So I am assuming this is a possible task, but difficult.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 827418,
          "author_name": "Hans Pinckaers",
          "author_url": "",
          "post_date": "2020-04-30T09:30:50.290000",
          "content": "<p>Hi Xie29, classification from segmentation is certainly possible, there are some details about translating segmentation results in the supplemental information of our Lancet Oncology paper: (preprint) <a href=\"https://arxiv.org/src/1907.07980v1/anc/Supplementary_Information.pdf\">https://arxiv.org/src/1907.07980v1/anc/Supplementary_Information.pdf</a> </p>\n\n<p>As for tips for your U-Net: make sure you use a high enough resolution, and using oversampling or weight maps can help to balance the labels. </p>\n\n<p>Good luck!</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 827640,
          "author_name": "Tsai29",
          "author_url": "",
          "post_date": "2020-04-30T12:34:31.650000",
          "content": "<p><a href=\"/hanspinckaers\">@hanspinckaers</a> Thank you so much for the tips. I already has some small progress on segmentation task, the image resolution is quite important in my experiment. But the data is quite huge, I am still searching the balance between resolution and training/inference speed. Great paper by the way.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 821629,
      "author_name": "Alberto Maria Falletta",
      "author_url": "",
      "post_date": "2020-04-26T10:00:37.367000",
      "content": "<p>Thanks so much :D</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "821617": "From the beginning, I thought this is a multi-class segmentation competition, since pretty much all the famous articles were using segmentation model(perhaps with classifier to deal with segmentation result) to solve this problem. But from public notebooks and discussion section, we knew that pure classification model(maybe with some extra regression job) would be able to give a pretty decent score. Anyway, I would like to share some of my thoughts about using segmentation model to solve the problem.\n\nSince only `radboud` data has enough mask label for us to classify the gleason score, so I only use their data and mask to train the segmentation model. And the result was PRETTY BAD.\nI was using regular Unet with efficientnetB0 backbone, Adam optimizer, low learning rate, 512x1024 resolution and some basic augmentation. The dice coefficient stop improve after around 30-40 epochs. It is not too difficult for model to segment the background, healthy region and cancerous region, but the classification job on cancerous epithelium is hard. The model can't recognize the type of cancerous epithelium is belong to gleason3, gleason4 or gleason5 at all, at least in my case.\n\nI think the problem might be the labeled mask is too noisy to use, since the mask is labeled by different people from ISUP_Grade label. Or maybe I need to use larger resolution/more detailed image to deal with segmentation task.\n\nAnyway just want to share you guys some of my experiment. But I will still keep trying to use segmentation model to solve the problem, since I am more interested in segmentation task. \n\nIf you saw me show on Leaderboard, it might means I finally manage to use segmentation model to get the normal result, or I just quit to use segmentation model anymore😅 \n\nGood luck\n\n\n------------------------------------------------------------------------------------------\n\nAfter several experiments, turns out the real problem is due to my wrong implement of loss function. Segmentation task is totally feasible.\n\nsimple result share:\n\n```\nbackbone : Efficinetb0\nmodel type : u-net\ntraining detail : single fold, no augmentation/tta\nCV : 0.44\nLB : 0.53\n```",
    "822092": "Thanks for sharing! Another idea is to maybe use CenterNet like in the Peking/Baidu competition a few months back. Combining segmentation with regression.",
    "821633": "Thanks for sharing your results, I'm also curious about the segmentation/classification challenge",
    "821629": "Thanks so much :D"
  }
}