{
  "id": 150429,
  "title": "Holes in segmentation masks",
  "url": "/competitions/prostate-cancer-grade-assessment/discussion/150429",
  "author_name": "Jay",
  "post_date": "2020-05-12T08:40:41.177000",
  "votes": 3,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Hi,</p>\n\n<p>the segmentation masks for the Radboud data contains strange \"holes\".</p>\n\n<p>Segmentation mask:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2Fde40e1fef62ef909b32cf5f080d03500%2FBildschirmfoto%202020-05-12%20um%2010.17.26.png?generation=1589272480627842&amp;alt=media\" alt=\"\"></p>\n\n<p>Underlaying tissue:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2F2c64f073efa0affa6254543b74e1a5bb%2FBildschirmfoto%202020-05-12%20um%2010.17.17.png?generation=1589272502867951&amp;alt=media\" alt=\"\"></p>\n\n<p>It looks like some tissue was segmented but then it got assigned class 0 (background) (black in the image), which does not make sense.\nI understand that the Radboud data was generated automatically and is noisy, but this seems like a wrong assignment of labels. Even the automatic process should clearly been able to see that this is not background.</p>\n\n<p>@wouterbulten Do you have some more information on these cases? Would it be reasonable to fill these holes with e.g. benign tissue class?</p>",
  "messages": [
    {
      "id": 843760,
      "postDate": "2020-05-12T08:40:41.177Z",
      "content": "<p>Hi,</p>\n\n<p>the segmentation masks for the Radboud data contains strange \"holes\".</p>\n\n<p>Segmentation mask:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2Fde40e1fef62ef909b32cf5f080d03500%2FBildschirmfoto%202020-05-12%20um%2010.17.26.png?generation=1589272480627842&amp;alt=media\" alt=\"\"></p>\n\n<p>Underlaying tissue:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2F2c64f073efa0affa6254543b74e1a5bb%2FBildschirmfoto%202020-05-12%20um%2010.17.17.png?generation=1589272502867951&amp;alt=media\" alt=\"\"></p>\n\n<p>It looks like some tissue was segmented but then it got assigned class 0 (background) (black in the image), which does not make sense.\nI understand that the Radboud data was generated automatically and is noisy, but this seems like a wrong assignment of labels. Even the automatic process should clearly been able to see that this is not background.</p>\n\n<p>@wouterbulten Do you have some more information on these cases? Would it be reasonable to fill these holes with e.g. benign tissue class?</p>",
      "rawMarkdown": "Hi,\n\nthe segmentation masks for the Radboud data contains strange \"holes\".\n\nSegmentation mask:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2Fde40e1fef62ef909b32cf5f080d03500%2FBildschirmfoto%202020-05-12%20um%2010.17.26.png?generation=1589272480627842&amp;alt=media)\n\nUnderlaying tissue:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2F2c64f073efa0affa6254543b74e1a5bb%2FBildschirmfoto%202020-05-12%20um%2010.17.17.png?generation=1589272502867951&amp;alt=media)\n\nIt looks like some tissue was segmented but then it got assigned class 0 (background) (black in the image), which does not make sense.\nI understand that the Radboud data was generated automatically and is noisy, but this seems like a wrong assignment of labels. Even the automatic process should clearly been able to see that this is not background.\n\n@wouterbulten Do you have some more information on these cases? Would it be reasonable to fill these holes with e.g. benign tissue class?\n",
      "votes": 3
    },
    {
      "id": 846646,
      "postDate": "2020-05-13T23:05:10.683Z",
      "content": "<p>Is it me or all all the files in train_mask black?</p>",
      "rawMarkdown": "Is it me or all all the files in train_mask black?",
      "votes": 1,
      "replies": [
        {
          "id": 846764,
          "postDate": "2020-05-14T02:00:15.910Z",
          "content": "<p>They aren't. They are however saved as label matrices rather than colored masks. \nUse this to display one (assuming your mask is in mask numpy array)</p>\n\n<p><code>cmap = matplotlib.colors.ListedColormap(['black', 'gray', 'green', 'yellow', 'orange', 'red'])</code>\n<code>plt.imshow(np.asarray(mask)[:,:,0], cmap=cmap, interpolation='nearest', vmin=0, vmax=5)</code>\n<code>plt.show()</code></p>",
          "rawMarkdown": "They aren't. They are however saved as label matrices rather than colored masks. \nUse this to display one (assuming your mask is in mask numpy array)\n\n`cmap = matplotlib.colors.ListedColormap(['black', 'gray', 'green', 'yellow', 'orange', 'red'])`\n`plt.imshow(np.asarray(mask)[:,:,0], cmap=cmap, interpolation='nearest', vmin=0, vmax=5)   `\n`plt.show()`",
          "votes": 1
        },
        {
          "id": 849229,
          "postDate": "2020-05-15T15:35:58.950Z",
          "content": "<p>Thanks a lot!</p>",
          "rawMarkdown": "Thanks a lot!"
        }
      ]
    },
    {
      "id": 843813,
      "postDate": "2020-05-12T09:22:24.307Z",
      "content": "<p>Label 0 corresponds to background or unknown. If there are holes inside the tissue like your example, we were not able to reliably determine the label. In most of these cases, our system predicted a Gleason pattern that did not correspond to the biopsy-level label. For example, the system predicted growth pattern 5 in a biopsy with label 3+3. For those cases we set the label to zero because we were not certain whether the label was correct. </p>",
      "rawMarkdown": "Label 0 corresponds to background or unknown. If there are holes inside the tissue like your example, we were not able to reliably determine the label. In most of these cases, our system predicted a Gleason pattern that did not correspond to the biopsy-level label. For example, the system predicted growth pattern 5 in a biopsy with label 3+3. For those cases we set the label to zero because we were not certain whether the label was correct. \n\n",
      "votes": 2,
      "replies": [
        {
          "id": 843890,
          "postDate": "2020-05-12T10:31:19.887Z",
          "content": "<p>That makes sense. Thank you. \nI think it would have been nicer to introduce an additional label for these cases. But it should be fairly simple to automatically find these holes and generate a label if needed.</p>",
          "rawMarkdown": "That makes sense. Thank you. \nI think it would have been nicer to introduce an additional label for these cases. But it should be fairly simple to automatically find these holes and generate a label if needed."
        }
      ]
    },
    {
      "id": 849256,
      "postDate": "2020-05-15T15:51:01.210Z",
      "content": "<p>So I'm a bit confused on the mask details: \nRadboud: Prostate glands are individually labelled. Valid values are:\n0: background (non tissue) or unknown\n1: stroma (connective tissue, non-epithelium tissue)\n2: healthy (benign) epithelium\n3: cancerous epithelium (Gleason 3)\n4: cancerous epithelium (Gleason 4)\n5: cancerous epithelium (Gleason 5)</p>\n\n<p>Karolinska: Regions are labelled. Valid values are:\n0: background (non tissue) or unknown\n1: benign tissue (stroma and epithelium combined)\n2: cancerous tissue (stroma and epithelium combined)</p>\n\n<p>Which one is the mask following? The Radboud or Karolinska?</p>",
      "rawMarkdown": "So I'm a bit confused on the mask details: \nRadboud: Prostate glands are individually labelled. Valid values are:\n0: background (non tissue) or unknown\n1: stroma (connective tissue, non-epithelium tissue)\n2: healthy (benign) epithelium\n3: cancerous epithelium (Gleason 3)\n4: cancerous epithelium (Gleason 4)\n5: cancerous epithelium (Gleason 5)\n\nKarolinska: Regions are labelled. Valid values are:\n0: background (non tissue) or unknown\n1: benign tissue (stroma and epithelium combined)\n2: cancerous tissue (stroma and epithelium combined)\n\nWhich one is the mask following? The Radboud or Karolinska?",
      "replies": [
        {
          "id": 849315,
          "postDate": "2020-05-15T16:41:32.023Z",
          "content": "<p>It depends on the image.... refer to the provider in the csv.</p>",
          "rawMarkdown": "It depends on the image.... refer to the provider in the csv.",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 846646,
      "author_name": "Adi Mithani",
      "author_url": "",
      "post_date": "2020-05-13T23:05:10.683000",
      "content": "<p>Is it me or all all the files in train_mask black?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 846764,
          "author_name": "Arnaud Roussel",
          "author_url": "",
          "post_date": "2020-05-14T02:00:15.910000",
          "content": "<p>They aren't. They are however saved as label matrices rather than colored masks. \nUse this to display one (assuming your mask is in mask numpy array)</p>\n\n<p><code>cmap = matplotlib.colors.ListedColormap(['black', 'gray', 'green', 'yellow', 'orange', 'red'])</code>\n<code>plt.imshow(np.asarray(mask)[:,:,0], cmap=cmap, interpolation='nearest', vmin=0, vmax=5)</code>\n<code>plt.show()</code></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 849229,
          "author_name": "Adi Mithani",
          "author_url": "",
          "post_date": "2020-05-15T15:35:58.950000",
          "content": "<p>Thanks a lot!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 843813,
      "author_name": "Wouter Bulten",
      "author_url": "",
      "post_date": "2020-05-12T09:22:24.307000",
      "content": "<p>Label 0 corresponds to background or unknown. If there are holes inside the tissue like your example, we were not able to reliably determine the label. In most of these cases, our system predicted a Gleason pattern that did not correspond to the biopsy-level label. For example, the system predicted growth pattern 5 in a biopsy with label 3+3. For those cases we set the label to zero because we were not certain whether the label was correct. </p>",
      "votes": 2,
      "replies": [
        {
          "id": 843890,
          "author_name": "Jay",
          "author_url": "",
          "post_date": "2020-05-12T10:31:19.887000",
          "content": "<p>That makes sense. Thank you. \nI think it would have been nicer to introduce an additional label for these cases. But it should be fairly simple to automatically find these holes and generate a label if needed.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 849256,
      "author_name": "Adi Mithani",
      "author_url": "",
      "post_date": "2020-05-15T15:51:01.210000",
      "content": "<p>So I'm a bit confused on the mask details: \nRadboud: Prostate glands are individually labelled. Valid values are:\n0: background (non tissue) or unknown\n1: stroma (connective tissue, non-epithelium tissue)\n2: healthy (benign) epithelium\n3: cancerous epithelium (Gleason 3)\n4: cancerous epithelium (Gleason 4)\n5: cancerous epithelium (Gleason 5)</p>\n\n<p>Karolinska: Regions are labelled. Valid values are:\n0: background (non tissue) or unknown\n1: benign tissue (stroma and epithelium combined)\n2: cancerous tissue (stroma and epithelium combined)</p>\n\n<p>Which one is the mask following? The Radboud or Karolinska?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 849315,
          "author_name": "Arnaud Roussel",
          "author_url": "",
          "post_date": "2020-05-15T16:41:32.023000",
          "content": "<p>It depends on the image.... refer to the provider in the csv.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "843760": "Hi,\n\nthe segmentation masks for the Radboud data contains strange \"holes\".\n\nSegmentation mask:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2Fde40e1fef62ef909b32cf5f080d03500%2FBildschirmfoto%202020-05-12%20um%2010.17.26.png?generation=1589272480627842&amp;alt=media)\n\nUnderlaying tissue:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F204012%2F2c64f073efa0affa6254543b74e1a5bb%2FBildschirmfoto%202020-05-12%20um%2010.17.17.png?generation=1589272502867951&amp;alt=media)\n\nIt looks like some tissue was segmented but then it got assigned class 0 (background) (black in the image), which does not make sense.\nI understand that the Radboud data was generated automatically and is noisy, but this seems like a wrong assignment of labels. Even the automatic process should clearly been able to see that this is not background.\n\n@wouterbulten Do you have some more information on these cases? Would it be reasonable to fill these holes with e.g. benign tissue class?\n",
    "846646": "Is it me or all all the files in train_mask black?",
    "843813": "Label 0 corresponds to background or unknown. If there are holes inside the tissue like your example, we were not able to reliably determine the label. In most of these cases, our system predicted a Gleason pattern that did not correspond to the biopsy-level label. For example, the system predicted growth pattern 5 in a biopsy with label 3+3. For those cases we set the label to zero because we were not certain whether the label was correct. \n\n",
    "849256": "So I'm a bit confused on the mask details: \nRadboud: Prostate glands are individually labelled. Valid values are:\n0: background (non tissue) or unknown\n1: stroma (connective tissue, non-epithelium tissue)\n2: healthy (benign) epithelium\n3: cancerous epithelium (Gleason 3)\n4: cancerous epithelium (Gleason 4)\n5: cancerous epithelium (Gleason 5)\n\nKarolinska: Regions are labelled. Valid values are:\n0: background (non tissue) or unknown\n1: benign tissue (stroma and epithelium combined)\n2: cancerous tissue (stroma and epithelium combined)\n\nWhich one is the mask following? The Radboud or Karolinska?"
  }
}