{
  "id": 455890,
  "title": "Supplemental annotations now available",
  "url": "/competitions/UBC-OCEAN/discussion/455890",
  "author_name": "Sohier Dane",
  "post_date": "2023-11-16T23:27:33.907000",
  "votes": 38,
  "comment_count": 30,
  "views": 0,
  "content": "<p>The <a href=\"https://www.kaggle.com/competitions/UBC-OCEAN/discussion/452360\" target=\"_blank\">annotations Maryam mentioned in this post</a> are now available in the form of <a href=\"https://www.kaggle.com/datasets/sohier/ubc-ovarian-cancer-competition-supplemental-masks\" target=\"_blank\">this Kaggle dataset</a>. I am not planning on adding them directly to the core competition dataset due to the time required and risks involved in rebuilding the core dataset.</p>\n<p>I want to acknowledge the feedback many of you provided that this is a disruptive change to make mid-competition. It is indeed likely to alter the optimal approach to some modeling strategies such as generating synthetic TMA imagery, as TMAs in this context are typically all or mostly cancerous tissue. All of us involved in organizing the competition had a robust discussion about the tradeoffs before deciding to proceed. At the same time, this is not a model we want to repeat for future competitions. We at Kaggle are reviewing our processes with the aim of ensuring that future launches do not require similar mid-stream updates.</p>\n<p>Overall, we hope that this data supplement unlocks new levels of accuracy and improves the utility of the end results. Thank you for your patience and happy kaggling.</p>",
  "messages": [
    {
      "id": 2527881,
      "postDate": "2023-11-16T23:27:33.907Z",
      "content": "<p>The <a href=\"https://www.kaggle.com/competitions/UBC-OCEAN/discussion/452360\" target=\"_blank\">annotations Maryam mentioned in this post</a> are now available in the form of <a href=\"https://www.kaggle.com/datasets/sohier/ubc-ovarian-cancer-competition-supplemental-masks\" target=\"_blank\">this Kaggle dataset</a>. I am not planning on adding them directly to the core competition dataset due to the time required and risks involved in rebuilding the core dataset.</p>\n<p>I want to acknowledge the feedback many of you provided that this is a disruptive change to make mid-competition. It is indeed likely to alter the optimal approach to some modeling strategies such as generating synthetic TMA imagery, as TMAs in this context are typically all or mostly cancerous tissue. All of us involved in organizing the competition had a robust discussion about the tradeoffs before deciding to proceed. At the same time, this is not a model we want to repeat for future competitions. We at Kaggle are reviewing our processes with the aim of ensuring that future launches do not require similar mid-stream updates.</p>\n<p>Overall, we hope that this data supplement unlocks new levels of accuracy and improves the utility of the end results. Thank you for your patience and happy kaggling.</p>",
      "rawMarkdown": "The [annotations Maryam mentioned in this post](https://www.kaggle.com/competitions/UBC-OCEAN/discussion/452360) are now available in the form of [this Kaggle dataset](https://www.kaggle.com/datasets/sohier/ubc-ovarian-cancer-competition-supplemental-masks). I am not planning on adding them directly to the core competition dataset due to the time required and risks involved in rebuilding the core dataset.\n\nI want to acknowledge the feedback many of you provided that this is a disruptive change to make mid-competition. It is indeed likely to alter the optimal approach to some modeling strategies such as generating synthetic TMA imagery, as TMAs in this context are typically all or mostly cancerous tissue. All of us involved in organizing the competition had a robust discussion about the tradeoffs before deciding to proceed. At the same time, this is not a model we want to repeat for future competitions. We at Kaggle are reviewing our processes with the aim of ensuring that future launches do not require similar mid-stream updates.\n\nOverall, we hope that this data supplement unlocks new levels of accuracy and improves the utility of the end results. Thank you for your patience and happy kaggling.",
      "votes": 38
    },
    {
      "id": 2528303,
      "postDate": "2023-11-17T08:49:04.953Z",
      "content": "<p><a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>\n<pre><code>The masks use the following color codes:\n\nRed: Tumor\nGreen: Stroma (healthy tissue)\nBlue: Necrosis (dead or dying non-cancerous tissue)\n</code></pre>\n<p>According to the above definition, for a 3-channel mask image, the value of each pixel should be 0 or 255, or 0 or 1. However, the given mask image contains other values.<br>\n(Alternatively, you can make it a 1-channel mask image and store only 0, 1, 2, and 3.)</p>\n<p>Is it possible that you specified an option other than cv2.INTER_NEAREST when resizing the mask image?</p>\n<pre><code>In []:  os\nIn []: os.environ[] = (, ).__str__()\nIn []:  cv2\nIn []:  numpy  np\nIn []:  pathlib  Path\nIn []: image = cv2.imread()\nIn []: image.shape\nOut[]: (, , )\n\nIn []: np.unique(image[:, :, ])\nOut[]: array([], dtype=uint8)\n\nIn []: np.unique(image[:, :, ])\nOut[]:\narray([  ,   ,   ,   ,   ,   ,   ,   ,   ,   ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , ], dtype=uint8)\n\nIn []: np.unique(image[:, :, ])\nOut[]:\narray([  ,   ,   ,   ,   ,   ,   ,   ,   ,   ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , ], dtype=uint8)\n</code></pre>",
      "rawMarkdown": "@sohier \n\n```text\nThe masks use the following color codes:\n\nRed: Tumor\nGreen: Stroma (healthy tissue)\nBlue: Necrosis (dead or dying non-cancerous tissue)\n```\n\nAccording to the above definition, for a 3-channel mask image, the value of each pixel should be 0 or 255, or 0 or 1. However, the given mask image contains other values.\n(Alternatively, you can make it a 1-channel mask image and store only 0, 1, 2, and 3.)\n\nIs it possible that you specified an option other than cv2.INTER_NEAREST when resizing the mask image?\n\n```ipython\nIn [1]: import os\nIn [2]: os.environ[\"OPENCV_IO_MAX_IMAGE_PIXELS\"] = pow(2, 40).__str__()\nIn [3]: import cv2\nIn [4]: import numpy as np\nIn [5]: from pathlib import Path\nIn [6]: image = cv2.imread(\"/mnt/UBC-OCEAN/masks/6951.png\")\nIn [7]: image.shape\nOut[7]: (35909, 44544, 3)\n\nIn [8]: np.unique(image[:, :, 0])\nOut[8]: array([0], dtype=uint8)\n\nIn [9]: np.unique(image[:, :, 1])\nOut[9]:\narray([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,\n        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,\n        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,\n        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,\n        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,\n        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,\n        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,\n        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103,\n       104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,\n       117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,\n       130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,\n       143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,\n       156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,\n       169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,\n       182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,\n       195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,\n       208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,\n       221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,\n       234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,\n       247, 248, 249, 250, 251, 252, 253, 254, 255], dtype=uint8)\n\nIn [10]: np.unique(image[:, :, 2])\nOut[10]:\narray([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,\n        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,\n        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,\n        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,\n        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,\n        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,\n        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,\n        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103,\n       104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,\n       117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,\n       130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,\n       143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,\n       156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,\n       169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,\n       182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,\n       195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,\n       208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,\n       221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,\n       234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,\n       247, 248, 249, 250, 251, 252, 253, 254, 255], dtype=uint8)\n```",
      "votes": 12,
      "replies": [
        {
          "id": 2529067,
          "postDate": "2023-11-17T22:26:49.293Z",
          "content": "<p>This issue arises from resizing the annotation to match the slide's dimensions. Please interpret any non-zero values in the blue, green, and red channels as indicating necrosis, stroma, and tumor areas, respectively.</p>",
          "rawMarkdown": "This issue arises from resizing the annotation to match the slide's dimensions. Please interpret any non-zero values in the blue, green, and red channels as indicating necrosis, stroma, and tumor areas, respectively.",
          "votes": 9
        }
      ]
    },
    {
      "id": 2529071,
      "postDate": "2023-11-17T22:37:19.340Z",
      "content": "<p>Dear participants,</p>\n<p>These annotations are provided as samples of tumor and non-tumor regions. Key aspects to note:</p>\n<p><strong>Purpose</strong>: The annotations are representative data for identifying tumor and non-tumor areas.<br>\n<strong>Tumor / Non-tumor Classification</strong>: For this project, both stroma and necrosis should be classified as non-tumor.</p>\n<p><strong>Pathologist Annotations:</strong><br>\nThe annotations made by pathologists represent examples of tumor, stroma, and necrosis tissues. They are not exhaustive but illustrative of each tissue type.</p>\n<p><strong>Important Considerations:</strong></p>\n<ol>\n<li>Representative Nature: Annotated regions serve as examples. For instance, an area marked as a tumor doesn’t imply it’s the sole tumor area in the slide. Other unannotated tumor regions may exist.</li>\n<li>Exclusivity: In addition to tumor, stroma, and necrosis, other tissue types may be present in a slide but are not annotated as they are not relevant to this specific problem.</li>\n</ol>",
      "rawMarkdown": "Dear participants,\n\nThese annotations are provided as samples of tumor and non-tumor regions. Key aspects to note:\n\n**Purpose**: The annotations are representative data for identifying tumor and non-tumor areas.\n**Tumor / Non-tumor Classification**: For this project, both stroma and necrosis should be classified as non-tumor.\n\n**Pathologist Annotations:**\nThe annotations made by pathologists represent examples of tumor, stroma, and necrosis tissues. They are not exhaustive but illustrative of each tissue type.\n\n**Important Considerations:**\n1. Representative Nature: Annotated regions serve as examples. For instance, an area marked as a tumor doesn’t imply it’s the sole tumor area in the slide. Other unannotated tumor regions may exist.\n2. Exclusivity: In addition to tumor, stroma, and necrosis, other tissue types may be present in a slide but are not annotated as they are not relevant to this specific problem.\n",
      "votes": 10,
      "replies": [
        {
          "id": 2530586,
          "postDate": "2023-11-19T09:37:36.057Z",
          "content": "<p><a href=\"https://www.kaggle.com/masadia\" target=\"_blank\">@masadia</a> ,Thank you for the explanation. Please clarify, <strong>They are not exhaustive but illustrative of each tissue type.</strong> - so an image labelled HGSC with tumor marked area provided, indicates the same classification (HGSC) only or could be other types also namely CC , MC . </p>",
          "rawMarkdown": "@masadia ,Thank you for the explanation. Please clarify, **They are not exhaustive but illustrative of each tissue type.** - so an image labelled HGSC with tumor marked area provided, indicates the same classification (HGSC) only or could be other types also namely CC , MC . ",
          "votes": 3,
          "replies": [
            {
              "id": 2531988,
              "postDate": "2023-11-20T17:51:11.560Z",
              "content": "<p>Hi Meenakshi,</p>\n<p>An image labeled as HGSC exclusively signifies this particular classification and does not encompass any other subtypes. It's important to note that the annotations are illustrative and may not cover all instances of tumor (e.g., HGSC tumors) on the slides; there could be additional occurrences beyond those highlighted in the provided images.</p>\n<p>Best,<br>\nMaryam</p>",
              "rawMarkdown": "Hi Meenakshi,\n\nAn image labeled as HGSC exclusively signifies this particular classification and does not encompass any other subtypes. It's important to note that the annotations are illustrative and may not cover all instances of tumor (e.g., HGSC tumors) on the slides; there could be additional occurrences beyond those highlighted in the provided images.\n\nBest,\nMaryam",
              "votes": 4
            },
            {
              "id": 2532410,
              "postDate": "2023-11-21T03:33:54.257Z",
              "content": "<p>Noted. Thanks</p>",
              "rawMarkdown": "Noted. Thanks"
            },
            {
              "id": 2576737,
              "postDate": "2023-12-28T04:56:42.270Z",
              "content": "<p>Hi, so is it correct if I said that the masks cover all possible classes (tissue variations) that could be present in an image? In other words if the the masks were exhaustive it would cover the whole tissue. <br>\nThanks &amp; Best Regards<br>\nMichael</p>",
              "rawMarkdown": "Hi, so is it correct if I said that the masks cover all possible classes (tissue variations) that could be present in an image? In other words if the the masks were exhaustive it would cover the whole tissue. \nThanks & Best Regards\nMichael"
            }
          ]
        }
      ]
    },
    {
      "id": 2528234,
      "postDate": "2023-11-17T08:07:34.340Z",
      "content": "<p>question about mask.</p>\n<blockquote>\n  <p>The masks use the following color codes:<br>\n  Red: Tumor<br>\n  Green: Stroma (healthy tissue)<br>\n  Blue: Necrosis (dead or dying non-cancerous tissue)</p>\n</blockquote>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F1663f8f3489330ad8a979bea54e87e66%2F1101_add_weighted.png?generation=1700208031061071&amp;alt=media\" alt=\"\"><br>\nBy using <code>cv2.addWeighted(img_, 0.9, mask, 0.3, 0)</code>, we can see the area where image exists but mask doesn't exist.<br>\nWhat does the area without color mean? Does it have no relationship with label ? <br>\nthank you.</p>",
      "rawMarkdown": "question about mask.\n> The masks use the following color codes:\nRed: Tumor\nGreen: Stroma (healthy tissue)\nBlue: Necrosis (dead or dying non-cancerous tissue)\n\n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F1663f8f3489330ad8a979bea54e87e66%2F1101_add_weighted.png?generation=1700208031061071&alt=media)\nBy using `cv2.addWeighted(img_, 0.9, mask, 0.3, 0)`, we can see the area where image exists but mask doesn't exist.\nWhat does the area without color mean? Does it have no relationship with label ? \nthank you.",
      "votes": 6,
      "replies": [
        {
          "id": 2528902,
          "postDate": "2023-11-17T17:50:27.930Z",
          "content": "<p>I made notebook to visualize overlay mask_tile on image_tile based on  <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> 's great notebook.  <br>\n<a href=\"https://www.kaggle.com/code/clearwaterkzk/ubc-viz-overlay-mask-tile-on-image-tile\" target=\"_blank\">https://www.kaggle.com/code/clearwaterkzk/ubc-viz-overlay-mask-tile-on-image-tile</a><br>\nplease visit if you want and upvote if you like. thank you.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F2d5efd6bc2f8629769025ffa903a6196%2F__results___12_1.png?generation=1700243352095713&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "I made notebook to visualize overlay mask_tile on image_tile based on  @jirkaborovec 's great notebook.  \n[https://www.kaggle.com/code/clearwaterkzk/ubc-viz-overlay-mask-tile-on-image-tile](https://www.kaggle.com/code/clearwaterkzk/ubc-viz-overlay-mask-tile-on-image-tile)\nplease visit if you want and upvote if you like. thank you.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F2d5efd6bc2f8629769025ffa903a6196%2F__results___12_1.png?generation=1700243352095713&alt=media)",
          "votes": 4,
          "replies": [
            {
              "id": 2531471,
              "postDate": "2023-11-20T08:41:31.413Z",
              "content": "<p>that is nice, I have created a tiled dataset, and updated the training which is till running by now: <a href=\"https://www.kaggle.com/code/jirkaborovec/cancer-subtype-tiles-masks-w-lightning-timm\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/cancer-subtype-tiles-masks-w-lightning-timm</a></p>",
              "rawMarkdown": "that is nice, I have created a tiled dataset, and updated the training which is till running by now: https://www.kaggle.com/code/jirkaborovec/cancer-subtype-tiles-masks-w-lightning-timm",
              "votes": 1
            }
          ]
        },
        {
          "id": 2529075,
          "postDate": "2023-11-17T22:44:45.050Z",
          "content": "<p>I've provided additional information and clarification in another <a href=\"https://www.kaggle.com/competitions/UBC-OCEAN/discussion/455890#2529071\" target=\"_blank\">comment</a>. Please check my comment for more details on your question. </p>",
          "rawMarkdown": "I've provided additional information and clarification in another [comment](https://www.kaggle.com/competitions/UBC-OCEAN/discussion/455890#2529071). Please check my comment for more details on your question. "
        }
      ]
    },
    {
      "id": 2533556,
      "postDate": "2023-11-22T03:25:44.877Z",
      "content": "<p>How to convert color mask to label mask:</p>\n<pre><code> numpy  np\n pyvips\n\n\n ():\n    \n    bg = (mask.(axis=-) == )\n    mask = mask.argmax(axis=-).astype(np.uint8) + \n    mask[bg] = \n\n     mask\n\nmask = pyvips.Image.new_from_file(, access=)\nmask = mask2label(mask)\n</code></pre>",
      "rawMarkdown": "How to convert color mask to label mask:\n``` python\nimport numpy as np\nimport pyvips\n\n\ndef mask2label(mask: np.ndarray):\n    \"\"\"\n    modify the color mask to label mask in place.\n\n    Args:\n        mask: (H, W), np.uint8\n\n    Returns:\n        mask: (H, W), np.uint8, value: {'background': 0, 'tumor': 1, 'stroma': 2, 'necrosis': 3}\n    \"\"\"\n    bg = (mask.sum(axis=-1) == 0)\n    mask = mask.argmax(axis=-1).astype(np.uint8) + 1\n    mask[bg] = 0\n\n    return mask\n\nmask = pyvips.Image.new_from_file('./ubc-ovarian-cancer-competition-supplemental-masks/1101.png', access='sequential')\nmask = mask2label(mask)\n\n```",
      "votes": 4
    },
    {
      "id": 2530538,
      "postDate": "2023-11-19T08:28:21.890Z",
      "content": "<p>Here is a basic segmentation model trained on the given data, and inferred on the thumbnail images:<br>\n<a href=\"https://www.kaggle.com/code/pjmathematician/ocean-segmentation-thumbnails\" target=\"_blank\">https://www.kaggle.com/code/pjmathematician/ocean-segmentation-thumbnails</a></p>",
      "rawMarkdown": "Here is a basic segmentation model trained on the given data, and inferred on the thumbnail images:\nhttps://www.kaggle.com/code/pjmathematician/ocean-segmentation-thumbnails",
      "votes": 3
    },
    {
      "id": 2528104,
      "postDate": "2023-11-17T05:56:16.420Z",
      "content": "<p><a href=\"https://youtu.be/49NP8VEOH5I?t=591\" target=\"_blank\">https://youtu.be/49NP8VEOH5I?t=591</a> this slide says that along with the annotated pngs, they have also provided text files with the polygon coordinates, which are absent in the dataset. Any updates regarding this?</p>",
      "rawMarkdown": "https://youtu.be/49NP8VEOH5I?t=591 this slide says that along with the annotated pngs, they have also provided text files with the polygon coordinates, which are absent in the dataset. Any updates regarding this?",
      "votes": 3,
      "replies": [
        {
          "id": 2528887,
          "postDate": "2023-11-17T17:42:04.173Z",
          "content": "<p>We opted to provide the data solely in png format. </p>",
          "rawMarkdown": "We opted to provide the data solely in png format. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 2547257,
      "postDate": "2023-12-03T10:47:43.447Z",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Fb85059903975388fba6a9d591ff61450%2F12442.png?generation=1701600128672608&amp;alt=media\" alt=\"\"><br>\nWhy is there a tumor annotation in the black area of the WSI(12442.png)?<br>\n<a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> <a href=\"https://www.kaggle.com/masadia\" target=\"_blank\">@masadia</a> </p>\n<p>I mean this:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Ffa238c742471815ef52fbce9afa049de%2FScreenshot%20from%202023-12-04%2011-14-12.png?generation=1701659725954018&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Fb85059903975388fba6a9d591ff61450%2F12442.png?generation=1701600128672608&alt=media)\nWhy is there a tumor annotation in the black area of the WSI(12442.png)?\n@sohier @masadia \n\nI mean this:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Ffa238c742471815ef52fbce9afa049de%2FScreenshot%20from%202023-12-04%2011-14-12.png?generation=1701659725954018&alt=media)\n",
      "votes": 1,
      "replies": [
        {
          "id": 2547433,
          "postDate": "2023-12-03T13:52:38.713Z",
          "content": "<p>it seems as an artifact of placing two masks, as you can also see that a tissue is missing on the left side…</p>",
          "rawMarkdown": "it seems as an artifact of placing two masks, as you can also see that a tissue is missing on the left side..."
        },
        {
          "id": 2561946,
          "postDate": "2023-12-15T01:24:39.033Z",
          "content": "<p>Hi Jirka,  I'm trying to apply the masks to the training big images without success… after the size error was resolved I have this… \"<br>\nUnidentifiedImageError: cannot identify image file '/kaggle/input/UBC-OCEAN/train_images/39146.png'\"</p>",
          "rawMarkdown": "Hi Jirka,  I'm trying to apply the masks to the training big images without success... after the size error was resolved I have this... \"\nUnidentifiedImageError: cannot identify image file '/kaggle/input/UBC-OCEAN/train_images/39146.png'\"",
          "replies": [
            {
              "id": 2562322,
              "postDate": "2023-12-15T08:53:18Z",
              "content": "<p>can you pls tell more where the error comes from, like what you try to do like loading with pyVis?</p>",
              "rawMarkdown": "can you pls tell more where the error comes from, like what you try to do like loading with pyVis?"
            },
            {
              "id": 2562555,
              "postDate": "2023-12-15T14:17:36.757Z",
              "content": "<p>and I used a copy of this link and just changed the path of the images to those with higher resolution.</p>\n<p><a href=\"https://www.kaggle.com/code/yuto0712/view-annotation-file/notebook\" target=\"_blank\">https://www.kaggle.com/code/yuto0712/view-annotation-file/notebook</a></p>",
              "rawMarkdown": "and I used a copy of this link and just changed the path of the images to those with higher resolution.\n\nhttps://www.kaggle.com/code/yuto0712/view-annotation-file/notebook"
            },
            {
              "id": 2564224,
              "postDate": "2023-12-16T23:13:44.373Z",
              "content": "<p>I cropping manually tha large imgs , with maks only red and green to try a best fit. in <br>\n<a href=\"https://www.kaggle.com/datasets/dagobertopanassol/ubc-red-green-cells-croped-in-photoshop\" target=\"_blank\">https://www.kaggle.com/datasets/dagobertopanassol/ubc-red-green-cells-croped-in-photoshop</a><br>\nbecouse i tryed fork one of yours code and triyed to do it, but cannot…</p>\n<ul>\n<li>Im found a new model  not still used here , used in another histograms of cancer with 0.87 of accuracy and like to share and found any group/friends to use and participate toguether.</li>\n</ul>",
              "rawMarkdown": "I cropping manually tha large imgs , with maks only red and green to try a best fit. in \nhttps://www.kaggle.com/datasets/dagobertopanassol/ubc-red-green-cells-croped-in-photoshop\nbecouse i tryed fork one of yours code and triyed to do it, but cannot...\n\n- Im found a new model  not still used here , used in another histograms of cancer with 0.87 of accuracy and like to share and found any group/friends to use and participate toguether.\n",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2531467,
      "postDate": "2023-11-20T08:38:35.317Z",
      "content": "<p>This is great complement to the competition! I ran a new <a href=\"https://kaggle.com/code/jirkaborovec/cancer-subtype-cut-wsi-tiles-mask-0-25x\" target=\"_blank\">cutting notebook</a> and created a dataset with tile's triples (image, annotation, labels) for easier training. So the label's mask are set as:</p>\n<table>\n<thead>\n<tr>\n<th>label</th>\n<th>color</th>\n<th>meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>0</code></td>\n<td>Black</td>\n<td>background</td>\n</tr>\n<tr>\n<td><code>1</code></td>\n<td>Red</td>\n<td>Tumor</td>\n</tr>\n<tr>\n<td><code>2</code></td>\n<td>Green</td>\n<td>Stroma (healthy tissue)</td>\n</tr>\n<tr>\n<td><code>3</code></td>\n<td>Blue</td>\n<td>Necrosis (dead or dying non-cancerous tissue)</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<p><strong>The dataset: <a href=\"https://kaggle.com/datasets/jirkaborovec/ubc-ocean-tiles-w-masks-2048px-scale-0-25\" target=\"_blank\">UBC-OCEAN: Tiles🖽 w/ masks🔬 2048px | scale 0.25</a></strong></p>",
      "rawMarkdown": "This is great complement to the competition! I ran a new [cutting notebook](https://kaggle.com/code/jirkaborovec/cancer-subtype-cut-wsi-tiles-mask-0-25x) and created a dataset with tile's triples (image, annotation, labels) for easier training. So the label's mask are set as:\n\n| label | color | meaning |\n| --- | --- | --- |\n| `0` | Black | background |\n| `1` | Red | Tumor |\n| `2` | Green | Stroma (healthy tissue) |\n| `3` | Blue | Necrosis (dead or dying non-cancerous tissue) |\n\n---\n\n**The dataset: [UBC-OCEAN: Tiles🖽 w/ masks🔬 2048px | scale 0.25](https://kaggle.com/datasets/jirkaborovec/ubc-ocean-tiles-w-masks-2048px-scale-0-25)**",
      "votes": 2
    },
    {
      "id": 2575059,
      "postDate": "2023-12-26T14:03:35.717Z",
      "content": "<p><a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> I just want to make sure I understand correctly. In <a href=\"https://www.kaggle.com/masadia\" target=\"_blank\">@masadia</a> post, the video says the masks will be at 40x magnification and we'll have to rescale to make them fit the 20x magnification. However, I was checking the image dimensions between the supplied masks and the .png images and they seem to have the same dimensions. Was the scaling already done for us? I looked through some notebooks and it looked like things fit 1:1 so I assume they were, but I want to be sure.</p>",
      "rawMarkdown": "@sohier I just want to make sure I understand correctly. In @masadia post, the video says the masks will be at 40x magnification and we'll have to rescale to make them fit the 20x magnification. However, I was checking the image dimensions between the supplied masks and the .png images and they seem to have the same dimensions. Was the scaling already done for us? I looked through some notebooks and it looked like things fit 1:1 so I assume they were, but I want to be sure."
    },
    {
      "id": 2537501,
      "postDate": "2023-11-25T08:17:41.693Z",
      "content": "<p>Hello,</p>\n<p>Are these masks available for the test dataset as well, or are they only provided for the training dataset?</p>\n<p>Thank you!</p>",
      "rawMarkdown": "Hello,\n\nAre these masks available for the test dataset as well, or are they only provided for the training dataset?\n\nThank you!\n",
      "replies": [
        {
          "id": 2537626,
          "postDate": "2023-11-25T11:07:02.093Z",
          "content": "<p>Training only I guess</p>",
          "rawMarkdown": "Training only I guess",
          "votes": 1,
          "replies": [
            {
              "id": 2537832,
              "postDate": "2023-11-25T14:14:43.297Z",
              "content": "<p>Thank you very much for the reply.</p>",
              "rawMarkdown": "Thank you very much for the reply."
            }
          ]
        }
      ]
    },
    {
      "id": 2531168,
      "postDate": "2023-11-20T01:29:17.973Z",
      "content": "<p>Very well done！！！</p>",
      "rawMarkdown": "Very well done！！！"
    },
    {
      "id": 2530060,
      "postDate": "2023-11-18T18:40:57.550Z",
      "content": "<p>Some changes are good.</p>",
      "rawMarkdown": "Some changes are good."
    },
    {
      "id": 2568193,
      "postDate": "2023-12-20T10:24:05.293Z",
      "content": "<p>Thank you for the sharing!</p>",
      "rawMarkdown": "Thank you for the sharing!"
    },
    {
      "id": 2563080,
      "postDate": "2023-12-16T02:33:40.870Z",
      "content": "<p>Thank you for the sharing!</p>",
      "rawMarkdown": "Thank you for the sharing!"
    }
  ],
  "comments": [
    {
      "id": 2528303,
      "author_name": "fam_taro",
      "author_url": "",
      "post_date": "2023-11-17T08:49:04.953000",
      "content": "<p><a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>\n<pre><code>The masks use the following color codes:\n\nRed: Tumor\nGreen: Stroma (healthy tissue)\nBlue: Necrosis (dead or dying non-cancerous tissue)\n</code></pre>\n<p>According to the above definition, for a 3-channel mask image, the value of each pixel should be 0 or 255, or 0 or 1. However, the given mask image contains other values.<br>\n(Alternatively, you can make it a 1-channel mask image and store only 0, 1, 2, and 3.)</p>\n<p>Is it possible that you specified an option other than cv2.INTER_NEAREST when resizing the mask image?</p>\n<pre><code>In []:  os\nIn []: os.environ[] = (, ).__str__()\nIn []:  cv2\nIn []:  numpy  np\nIn []:  pathlib  Path\nIn []: image = cv2.imread()\nIn []: image.shape\nOut[]: (, , )\n\nIn []: np.unique(image[:, :, ])\nOut[]: array([], dtype=uint8)\n\nIn []: np.unique(image[:, :, ])\nOut[]:\narray([  ,   ,   ,   ,   ,   ,   ,   ,   ,   ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , ], dtype=uint8)\n\nIn []: np.unique(image[:, :, ])\nOut[]:\narray([  ,   ,   ,   ,   ,   ,   ,   ,   ,   ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,  ,\n        ,  ,  ,  ,  ,  ,  ,  ,  , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , , , , , ,\n       , , , , , , , , ], dtype=uint8)\n</code></pre>",
      "votes": 12,
      "replies": [
        {
          "id": 2529067,
          "author_name": "masadia",
          "author_url": "",
          "post_date": "2023-11-17T22:26:49.293000",
          "content": "<p>This issue arises from resizing the annotation to match the slide's dimensions. Please interpret any non-zero values in the blue, green, and red channels as indicating necrosis, stroma, and tumor areas, respectively.</p>",
          "votes": 9,
          "replies": []
        }
      ]
    },
    {
      "id": 2529071,
      "author_name": "masadia",
      "author_url": "",
      "post_date": "2023-11-17T22:37:19.340000",
      "content": "<p>Dear participants,</p>\n<p>These annotations are provided as samples of tumor and non-tumor regions. Key aspects to note:</p>\n<p><strong>Purpose</strong>: The annotations are representative data for identifying tumor and non-tumor areas.<br>\n<strong>Tumor / Non-tumor Classification</strong>: For this project, both stroma and necrosis should be classified as non-tumor.</p>\n<p><strong>Pathologist Annotations:</strong><br>\nThe annotations made by pathologists represent examples of tumor, stroma, and necrosis tissues. They are not exhaustive but illustrative of each tissue type.</p>\n<p><strong>Important Considerations:</strong></p>\n<ol>\n<li>Representative Nature: Annotated regions serve as examples. For instance, an area marked as a tumor doesn’t imply it’s the sole tumor area in the slide. Other unannotated tumor regions may exist.</li>\n<li>Exclusivity: In addition to tumor, stroma, and necrosis, other tissue types may be present in a slide but are not annotated as they are not relevant to this specific problem.</li>\n</ol>",
      "votes": 10,
      "replies": [
        {
          "id": 2530586,
          "author_name": "Meenakshi",
          "author_url": "",
          "post_date": "2023-11-19T09:37:36.057000",
          "content": "<p><a href=\"https://www.kaggle.com/masadia\" target=\"_blank\">@masadia</a> ,Thank you for the explanation. Please clarify, <strong>They are not exhaustive but illustrative of each tissue type.</strong> - so an image labelled HGSC with tumor marked area provided, indicates the same classification (HGSC) only or could be other types also namely CC , MC . </p>",
          "votes": 3,
          "replies": [
            {
              "id": 2531988,
              "author_name": "masadia",
              "author_url": "",
              "post_date": "2023-11-20T17:51:11.560000",
              "content": "<p>Hi Meenakshi,</p>\n<p>An image labeled as HGSC exclusively signifies this particular classification and does not encompass any other subtypes. It's important to note that the annotations are illustrative and may not cover all instances of tumor (e.g., HGSC tumors) on the slides; there could be additional occurrences beyond those highlighted in the provided images.</p>\n<p>Best,<br>\nMaryam</p>",
              "votes": 4,
              "replies": []
            },
            {
              "id": 2532410,
              "author_name": "Meenakshi",
              "author_url": "",
              "post_date": "2023-11-21T03:33:54.257000",
              "content": "<p>Noted. Thanks</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2576737,
              "author_name": "Schroter",
              "author_url": "",
              "post_date": "2023-12-28T04:56:42.270000",
              "content": "<p>Hi, so is it correct if I said that the masks cover all possible classes (tissue variations) that could be present in an image? In other words if the the masks were exhaustive it would cover the whole tissue. <br>\nThanks &amp; Best Regards<br>\nMichael</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2528234,
      "author_name": "Aurora_blue",
      "author_url": "",
      "post_date": "2023-11-17T08:07:34.340000",
      "content": "<p>question about mask.</p>\n<blockquote>\n  <p>The masks use the following color codes:<br>\n  Red: Tumor<br>\n  Green: Stroma (healthy tissue)<br>\n  Blue: Necrosis (dead or dying non-cancerous tissue)</p>\n</blockquote>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F1663f8f3489330ad8a979bea54e87e66%2F1101_add_weighted.png?generation=1700208031061071&amp;alt=media\" alt=\"\"><br>\nBy using <code>cv2.addWeighted(img_, 0.9, mask, 0.3, 0)</code>, we can see the area where image exists but mask doesn't exist.<br>\nWhat does the area without color mean? Does it have no relationship with label ? <br>\nthank you.</p>",
      "votes": 6,
      "replies": [
        {
          "id": 2528902,
          "author_name": "Aurora_blue",
          "author_url": "",
          "post_date": "2023-11-17T17:50:27.930000",
          "content": "<p>I made notebook to visualize overlay mask_tile on image_tile based on  <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> 's great notebook.  <br>\n<a href=\"https://www.kaggle.com/code/clearwaterkzk/ubc-viz-overlay-mask-tile-on-image-tile\" target=\"_blank\">https://www.kaggle.com/code/clearwaterkzk/ubc-viz-overlay-mask-tile-on-image-tile</a><br>\nplease visit if you want and upvote if you like. thank you.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F2d5efd6bc2f8629769025ffa903a6196%2F__results___12_1.png?generation=1700243352095713&amp;alt=media\" alt=\"\"></p>",
          "votes": 4,
          "replies": [
            {
              "id": 2531471,
              "author_name": "Jirka",
              "author_url": "",
              "post_date": "2023-11-20T08:41:31.413000",
              "content": "<p>that is nice, I have created a tiled dataset, and updated the training which is till running by now: <a href=\"https://www.kaggle.com/code/jirkaborovec/cancer-subtype-tiles-masks-w-lightning-timm\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/cancer-subtype-tiles-masks-w-lightning-timm</a></p>",
              "votes": 1,
              "replies": []
            }
          ]
        },
        {
          "id": 2529075,
          "author_name": "masadia",
          "author_url": "",
          "post_date": "2023-11-17T22:44:45.050000",
          "content": "<p>I've provided additional information and clarification in another <a href=\"https://www.kaggle.com/competitions/UBC-OCEAN/discussion/455890#2529071\" target=\"_blank\">comment</a>. Please check my comment for more details on your question. </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2533556,
      "author_name": "m1dsolo",
      "author_url": "",
      "post_date": "2023-11-22T03:25:44.877000",
      "content": "<p>How to convert color mask to label mask:</p>\n<pre><code> numpy  np\n pyvips\n\n\n ():\n    \n    bg = (mask.(axis=-) == )\n    mask = mask.argmax(axis=-).astype(np.uint8) + \n    mask[bg] = \n\n     mask\n\nmask = pyvips.Image.new_from_file(, access=)\nmask = mask2label(mask)\n</code></pre>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 2530538,
      "author_name": "pjmathematician",
      "author_url": "",
      "post_date": "2023-11-19T08:28:21.890000",
      "content": "<p>Here is a basic segmentation model trained on the given data, and inferred on the thumbnail images:<br>\n<a href=\"https://www.kaggle.com/code/pjmathematician/ocean-segmentation-thumbnails\" target=\"_blank\">https://www.kaggle.com/code/pjmathematician/ocean-segmentation-thumbnails</a></p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 2528104,
      "author_name": "pjmathematician",
      "author_url": "",
      "post_date": "2023-11-17T05:56:16.420000",
      "content": "<p><a href=\"https://youtu.be/49NP8VEOH5I?t=591\" target=\"_blank\">https://youtu.be/49NP8VEOH5I?t=591</a> this slide says that along with the annotated pngs, they have also provided text files with the polygon coordinates, which are absent in the dataset. Any updates regarding this?</p>",
      "votes": 3,
      "replies": [
        {
          "id": 2528887,
          "author_name": "Sohier Dane",
          "author_url": "",
          "post_date": "2023-11-17T17:42:04.173000",
          "content": "<p>We opted to provide the data solely in png format. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2547257,
      "author_name": "fate",
      "author_url": "",
      "post_date": "2023-12-03T10:47:43.447000",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Fb85059903975388fba6a9d591ff61450%2F12442.png?generation=1701600128672608&amp;alt=media\" alt=\"\"><br>\nWhy is there a tumor annotation in the black area of the WSI(12442.png)?<br>\n<a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> <a href=\"https://www.kaggle.com/masadia\" target=\"_blank\">@masadia</a> </p>\n<p>I mean this:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Ffa238c742471815ef52fbce9afa049de%2FScreenshot%20from%202023-12-04%2011-14-12.png?generation=1701659725954018&amp;alt=media\" alt=\"\"></p>",
      "votes": 1,
      "replies": [
        {
          "id": 2547433,
          "author_name": "Jirka",
          "author_url": "",
          "post_date": "2023-12-03T13:52:38.713000",
          "content": "<p>it seems as an artifact of placing two masks, as you can also see that a tissue is missing on the left side…</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2561946,
          "author_name": "dagoberto panassol",
          "author_url": "",
          "post_date": "2023-12-15T01:24:39.033000",
          "content": "<p>Hi Jirka,  I'm trying to apply the masks to the training big images without success… after the size error was resolved I have this… \"<br>\nUnidentifiedImageError: cannot identify image file '/kaggle/input/UBC-OCEAN/train_images/39146.png'\"</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2562322,
              "author_name": "Jirka",
              "author_url": "",
              "post_date": "2023-12-15T08:53:18",
              "content": "<p>can you pls tell more where the error comes from, like what you try to do like loading with pyVis?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2562555,
              "author_name": "dagoberto panassol",
              "author_url": "",
              "post_date": "2023-12-15T14:17:36.757000",
              "content": "<p>and I used a copy of this link and just changed the path of the images to those with higher resolution.</p>\n<p><a href=\"https://www.kaggle.com/code/yuto0712/view-annotation-file/notebook\" target=\"_blank\">https://www.kaggle.com/code/yuto0712/view-annotation-file/notebook</a></p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2564224,
              "author_name": "dagoberto panassol",
              "author_url": "",
              "post_date": "2023-12-16T23:13:44.373000",
              "content": "<p>I cropping manually tha large imgs , with maks only red and green to try a best fit. in <br>\n<a href=\"https://www.kaggle.com/datasets/dagobertopanassol/ubc-red-green-cells-croped-in-photoshop\" target=\"_blank\">https://www.kaggle.com/datasets/dagobertopanassol/ubc-red-green-cells-croped-in-photoshop</a><br>\nbecouse i tryed fork one of yours code and triyed to do it, but cannot…</p>\n<ul>\n<li>Im found a new model  not still used here , used in another histograms of cancer with 0.87 of accuracy and like to share and found any group/friends to use and participate toguether.</li>\n</ul>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2531467,
      "author_name": "Jirka",
      "author_url": "",
      "post_date": "2023-11-20T08:38:35.317000",
      "content": "<p>This is great complement to the competition! I ran a new <a href=\"https://kaggle.com/code/jirkaborovec/cancer-subtype-cut-wsi-tiles-mask-0-25x\" target=\"_blank\">cutting notebook</a> and created a dataset with tile's triples (image, annotation, labels) for easier training. So the label's mask are set as:</p>\n<table>\n<thead>\n<tr>\n<th>label</th>\n<th>color</th>\n<th>meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>0</code></td>\n<td>Black</td>\n<td>background</td>\n</tr>\n<tr>\n<td><code>1</code></td>\n<td>Red</td>\n<td>Tumor</td>\n</tr>\n<tr>\n<td><code>2</code></td>\n<td>Green</td>\n<td>Stroma (healthy tissue)</td>\n</tr>\n<tr>\n<td><code>3</code></td>\n<td>Blue</td>\n<td>Necrosis (dead or dying non-cancerous tissue)</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<p><strong>The dataset: <a href=\"https://kaggle.com/datasets/jirkaborovec/ubc-ocean-tiles-w-masks-2048px-scale-0-25\" target=\"_blank\">UBC-OCEAN: Tiles🖽 w/ masks🔬 2048px | scale 0.25</a></strong></p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2575059,
      "author_name": "chemdatafarmer",
      "author_url": "",
      "post_date": "2023-12-26T14:03:35.717000",
      "content": "<p><a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> I just want to make sure I understand correctly. In <a href=\"https://www.kaggle.com/masadia\" target=\"_blank\">@masadia</a> post, the video says the masks will be at 40x magnification and we'll have to rescale to make them fit the 20x magnification. However, I was checking the image dimensions between the supplied masks and the .png images and they seem to have the same dimensions. Was the scaling already done for us? I looked through some notebooks and it looked like things fit 1:1 so I assume they were, but I want to be sure.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2537501,
      "author_name": "rangtang",
      "author_url": "",
      "post_date": "2023-11-25T08:17:41.693000",
      "content": "<p>Hello,</p>\n<p>Are these masks available for the test dataset as well, or are they only provided for the training dataset?</p>\n<p>Thank you!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2537626,
          "author_name": "Jirka",
          "author_url": "",
          "post_date": "2023-11-25T11:07:02.093000",
          "content": "<p>Training only I guess</p>",
          "votes": 1,
          "replies": [
            {
              "id": 2537832,
              "author_name": "rangtang",
              "author_url": "",
              "post_date": "2023-11-25T14:14:43.297000",
              "content": "<p>Thank you very much for the reply.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2531168,
      "author_name": "BingTanghu",
      "author_url": "",
      "post_date": "2023-11-20T01:29:17.973000",
      "content": "<p>Very well done！！！</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2530060,
      "author_name": "VIKRAM MISHRA",
      "author_url": "",
      "post_date": "2023-11-18T18:40:57.550000",
      "content": "<p>Some changes are good.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2568193,
      "author_name": "sunhowww",
      "author_url": "",
      "post_date": "2023-12-20T10:24:05.293000",
      "content": "<p>Thank you for the sharing!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2563080,
      "author_name": "SodaXie",
      "author_url": "",
      "post_date": "2023-12-16T02:33:40.870000",
      "content": "<p>Thank you for the sharing!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2527881": "The [annotations Maryam mentioned in this post](https://www.kaggle.com/competitions/UBC-OCEAN/discussion/452360) are now available in the form of [this Kaggle dataset](https://www.kaggle.com/datasets/sohier/ubc-ovarian-cancer-competition-supplemental-masks). I am not planning on adding them directly to the core competition dataset due to the time required and risks involved in rebuilding the core dataset.\n\nI want to acknowledge the feedback many of you provided that this is a disruptive change to make mid-competition. It is indeed likely to alter the optimal approach to some modeling strategies such as generating synthetic TMA imagery, as TMAs in this context are typically all or mostly cancerous tissue. All of us involved in organizing the competition had a robust discussion about the tradeoffs before deciding to proceed. At the same time, this is not a model we want to repeat for future competitions. We at Kaggle are reviewing our processes with the aim of ensuring that future launches do not require similar mid-stream updates.\n\nOverall, we hope that this data supplement unlocks new levels of accuracy and improves the utility of the end results. Thank you for your patience and happy kaggling.",
    "2528303": "@sohier \n\n```text\nThe masks use the following color codes:\n\nRed: Tumor\nGreen: Stroma (healthy tissue)\nBlue: Necrosis (dead or dying non-cancerous tissue)\n```\n\nAccording to the above definition, for a 3-channel mask image, the value of each pixel should be 0 or 255, or 0 or 1. However, the given mask image contains other values.\n(Alternatively, you can make it a 1-channel mask image and store only 0, 1, 2, and 3.)\n\nIs it possible that you specified an option other than cv2.INTER_NEAREST when resizing the mask image?\n\n```ipython\nIn [1]: import os\nIn [2]: os.environ[\"OPENCV_IO_MAX_IMAGE_PIXELS\"] = pow(2, 40).__str__()\nIn [3]: import cv2\nIn [4]: import numpy as np\nIn [5]: from pathlib import Path\nIn [6]: image = cv2.imread(\"/mnt/UBC-OCEAN/masks/6951.png\")\nIn [7]: image.shape\nOut[7]: (35909, 44544, 3)\n\nIn [8]: np.unique(image[:, :, 0])\nOut[8]: array([0], dtype=uint8)\n\nIn [9]: np.unique(image[:, :, 1])\nOut[9]:\narray([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,\n        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,\n        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,\n        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,\n        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,\n        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,\n        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,\n        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103,\n       104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,\n       117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,\n       130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,\n       143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,\n       156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,\n       169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,\n       182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,\n       195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,\n       208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,\n       221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,\n       234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,\n       247, 248, 249, 250, 251, 252, 253, 254, 255], dtype=uint8)\n\nIn [10]: np.unique(image[:, :, 2])\nOut[10]:\narray([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,\n        13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,\n        26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,\n        39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,\n        52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,\n        65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,\n        78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,\n        91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103,\n       104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,\n       117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,\n       130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,\n       143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,\n       156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,\n       169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,\n       182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,\n       195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,\n       208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,\n       221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,\n       234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,\n       247, 248, 249, 250, 251, 252, 253, 254, 255], dtype=uint8)\n```",
    "2529071": "Dear participants,\n\nThese annotations are provided as samples of tumor and non-tumor regions. Key aspects to note:\n\n**Purpose**: The annotations are representative data for identifying tumor and non-tumor areas.\n**Tumor / Non-tumor Classification**: For this project, both stroma and necrosis should be classified as non-tumor.\n\n**Pathologist Annotations:**\nThe annotations made by pathologists represent examples of tumor, stroma, and necrosis tissues. They are not exhaustive but illustrative of each tissue type.\n\n**Important Considerations:**\n1. Representative Nature: Annotated regions serve as examples. For instance, an area marked as a tumor doesn’t imply it’s the sole tumor area in the slide. Other unannotated tumor regions may exist.\n2. Exclusivity: In addition to tumor, stroma, and necrosis, other tissue types may be present in a slide but are not annotated as they are not relevant to this specific problem.\n",
    "2528234": "question about mask.\n> The masks use the following color codes:\nRed: Tumor\nGreen: Stroma (healthy tissue)\nBlue: Necrosis (dead or dying non-cancerous tissue)\n\n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4250230%2F1663f8f3489330ad8a979bea54e87e66%2F1101_add_weighted.png?generation=1700208031061071&alt=media)\nBy using `cv2.addWeighted(img_, 0.9, mask, 0.3, 0)`, we can see the area where image exists but mask doesn't exist.\nWhat does the area without color mean? Does it have no relationship with label ? \nthank you.",
    "2533556": "How to convert color mask to label mask:\n``` python\nimport numpy as np\nimport pyvips\n\n\ndef mask2label(mask: np.ndarray):\n    \"\"\"\n    modify the color mask to label mask in place.\n\n    Args:\n        mask: (H, W), np.uint8\n\n    Returns:\n        mask: (H, W), np.uint8, value: {'background': 0, 'tumor': 1, 'stroma': 2, 'necrosis': 3}\n    \"\"\"\n    bg = (mask.sum(axis=-1) == 0)\n    mask = mask.argmax(axis=-1).astype(np.uint8) + 1\n    mask[bg] = 0\n\n    return mask\n\nmask = pyvips.Image.new_from_file('./ubc-ovarian-cancer-competition-supplemental-masks/1101.png', access='sequential')\nmask = mask2label(mask)\n\n```",
    "2530538": "Here is a basic segmentation model trained on the given data, and inferred on the thumbnail images:\nhttps://www.kaggle.com/code/pjmathematician/ocean-segmentation-thumbnails",
    "2528104": "https://youtu.be/49NP8VEOH5I?t=591 this slide says that along with the annotated pngs, they have also provided text files with the polygon coordinates, which are absent in the dataset. Any updates regarding this?",
    "2547257": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Fb85059903975388fba6a9d591ff61450%2F12442.png?generation=1701600128672608&alt=media)\nWhy is there a tumor annotation in the black area of the WSI(12442.png)?\n@sohier @masadia \n\nI mean this:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4184342%2Ffa238c742471815ef52fbce9afa049de%2FScreenshot%20from%202023-12-04%2011-14-12.png?generation=1701659725954018&alt=media)\n",
    "2531467": "This is great complement to the competition! I ran a new [cutting notebook](https://kaggle.com/code/jirkaborovec/cancer-subtype-cut-wsi-tiles-mask-0-25x) and created a dataset with tile's triples (image, annotation, labels) for easier training. So the label's mask are set as:\n\n| label | color | meaning |\n| --- | --- | --- |\n| `0` | Black | background |\n| `1` | Red | Tumor |\n| `2` | Green | Stroma (healthy tissue) |\n| `3` | Blue | Necrosis (dead or dying non-cancerous tissue) |\n\n---\n\n**The dataset: [UBC-OCEAN: Tiles🖽 w/ masks🔬 2048px | scale 0.25](https://kaggle.com/datasets/jirkaborovec/ubc-ocean-tiles-w-masks-2048px-scale-0-25)**",
    "2575059": "@sohier I just want to make sure I understand correctly. In @masadia post, the video says the masks will be at 40x magnification and we'll have to rescale to make them fit the 20x magnification. However, I was checking the image dimensions between the supplied masks and the .png images and they seem to have the same dimensions. Was the scaling already done for us? I looked through some notebooks and it looked like things fit 1:1 so I assume they were, but I want to be sure.",
    "2537501": "Hello,\n\nAre these masks available for the test dataset as well, or are they only provided for the training dataset?\n\nThank you!\n",
    "2531168": "Very well done！！！",
    "2530060": "Some changes are good.",
    "2568193": "Thank you for the sharing!",
    "2563080": "Thank you for the sharing!"
  }
}