{
  "id": 221015,
  "title": "Visualizing Segmentation Masks Interactively",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/221015",
  "author_name": "Ayush Thakur",
  "post_date": "2021-02-20T15:52:43.357000",
  "votes": 11,
  "comment_count": 4,
  "views": 0,
  "content": "<p>In this competition, we are provided with image-level labels, and the task is to classify each cell in a given image into one or multiple labels.</p>\n<ul>\n<li><p>Thus, each image has multiple numbers of cells. </p></li>\n<li><p>Each cell consists of multiple <a href=\"https://www.genome.gov/genetics-glossary/Organelle\" target=\"_blank\">organelles</a>. In the previous <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification\" target=\"_blank\">HPA competition</a>, 28 organelles were used as labels, and the task was to predict image-level labels (given input image predict the organelles). </p></li>\n<li><p>In this competition, the task is to predict cell-level labels using signals from image-level labels. That's what makes it a more challenging problem statement. </p></li>\n<li><p><strong>But what are we predicting?</strong> There's a specific <em>protein of interest</em>(signal in the green channel) that can be present in an organelle or multiple organelles in each cell. The image-level labels point to the presence of that protein in the cells <em>in general</em>. Thus at the cell-level, <br>\nthe protein might not be present in the ground truth organelle. Interesting!</p></li>\n<li><p>This calls for cell segmentation. We have to know the presence of the cells in an image. But we also need to differentiate one cell from another cell. Thus it's instance segmentation. </p></li>\n<li><p>The authors have provided with <a href=\"https://github.com/CellProfiling/HPA-Cell-Segmentation\" target=\"_blank\">HPA-Cell-Segmentation</a> tool. <strong>Is it good?</strong> In a discussion thread, I read that it can accurately segment cells in ~90% of test set images. That's an excellent baseline to start with and focus on cell-level classification. </p></li>\n</ul>\n<p>I thought of playing with the <a href=\"https://github.com/CellProfiling/HPA-Cell-Segmentation\" target=\"_blank\">tool</a> and visualize the segmentation masks. I have used <a href=\"https://wandb.ai/site\" target=\"_blank\">Weights and Biases</a> to play with the segmentation mask interactively.</p>\n<p>Here's my Kaggle kernel: <a href=\"http://bit.ly/kernel-segmentation\" target=\"_blank\">http://bit.ly/kernel-segmentation</a></p>\n<p>For quick access to the logged results: <a href=\"http://bit.ly/play-with-segmentation-masks\" target=\"_blank\">http://bit.ly/play-with-segmentation-masks</a></p>\n<p><img src=\"https://i.imgur.com/9kNLI4L.gif\" alt=\"\"></p>\n<p><strong>If you find this useful, please consider upvoting the</strong> <a href=\"http://bit.ly/kernel-segmentation\" target=\"_blank\">Kernel</a>. :)</p>",
  "messages": [
    {
      "id": 1211841,
      "postDate": "2021-02-20T15:52:43.357Z",
      "content": "<p>In this competition, we are provided with image-level labels, and the task is to classify each cell in a given image into one or multiple labels.</p>\n<ul>\n<li><p>Thus, each image has multiple numbers of cells. </p></li>\n<li><p>Each cell consists of multiple <a href=\"https://www.genome.gov/genetics-glossary/Organelle\" target=\"_blank\">organelles</a>. In the previous <a href=\"https://www.kaggle.com/c/human-protein-atlas-image-classification\" target=\"_blank\">HPA competition</a>, 28 organelles were used as labels, and the task was to predict image-level labels (given input image predict the organelles). </p></li>\n<li><p>In this competition, the task is to predict cell-level labels using signals from image-level labels. That's what makes it a more challenging problem statement. </p></li>\n<li><p><strong>But what are we predicting?</strong> There's a specific <em>protein of interest</em>(signal in the green channel) that can be present in an organelle or multiple organelles in each cell. The image-level labels point to the presence of that protein in the cells <em>in general</em>. Thus at the cell-level, <br>\nthe protein might not be present in the ground truth organelle. Interesting!</p></li>\n<li><p>This calls for cell segmentation. We have to know the presence of the cells in an image. But we also need to differentiate one cell from another cell. Thus it's instance segmentation. </p></li>\n<li><p>The authors have provided with <a href=\"https://github.com/CellProfiling/HPA-Cell-Segmentation\" target=\"_blank\">HPA-Cell-Segmentation</a> tool. <strong>Is it good?</strong> In a discussion thread, I read that it can accurately segment cells in ~90% of test set images. That's an excellent baseline to start with and focus on cell-level classification. </p></li>\n</ul>\n<p>I thought of playing with the <a href=\"https://github.com/CellProfiling/HPA-Cell-Segmentation\" target=\"_blank\">tool</a> and visualize the segmentation masks. I have used <a href=\"https://wandb.ai/site\" target=\"_blank\">Weights and Biases</a> to play with the segmentation mask interactively.</p>\n<p>Here's my Kaggle kernel: <a href=\"http://bit.ly/kernel-segmentation\" target=\"_blank\">http://bit.ly/kernel-segmentation</a></p>\n<p>For quick access to the logged results: <a href=\"http://bit.ly/play-with-segmentation-masks\" target=\"_blank\">http://bit.ly/play-with-segmentation-masks</a></p>\n<p><img src=\"https://i.imgur.com/9kNLI4L.gif\" alt=\"\"></p>\n<p><strong>If you find this useful, please consider upvoting the</strong> <a href=\"http://bit.ly/kernel-segmentation\" target=\"_blank\">Kernel</a>. :)</p>",
      "rawMarkdown": "In this competition, we are provided with image-level labels, and the task is to classify each cell in a given image into one or multiple labels.\n\n* Thus, each image has multiple numbers of cells. \n\n* Each cell consists of multiple [organelles](https://www.genome.gov/genetics-glossary/Organelle). In the previous [HPA competition](https://www.kaggle.com/c/human-protein-atlas-image-classification), 28 organelles were used as labels, and the task was to predict image-level labels (given input image predict the organelles). \n\n* In this competition, the task is to predict cell-level labels using signals from image-level labels. That's what makes it a more challenging problem statement. \n\n* **But what are we predicting?** There's a specific _protein of interest_(signal in the green channel) that can be present in an organelle or multiple organelles in each cell. The image-level labels point to the presence of that protein in the cells *in general*. Thus at the cell-level, \nthe protein might not be present in the ground truth organelle. Interesting!\n\n* This calls for cell segmentation. We have to know the presence of the cells in an image. But we also need to differentiate one cell from another cell. Thus it's instance segmentation. \n\n* The authors have provided with [HPA-Cell-Segmentation](https://github.com/CellProfiling/HPA-Cell-Segmentation) tool. **Is it good?** In a discussion thread, I read that it can accurately segment cells in ~90% of test set images. That's an excellent baseline to start with and focus on cell-level classification. \n\nI thought of playing with the [tool](https://github.com/CellProfiling/HPA-Cell-Segmentation) and visualize the segmentation masks. I have used [Weights and Biases](https://wandb.ai/site) to play with the segmentation mask interactively.\n\nHere's my Kaggle kernel: http://bit.ly/kernel-segmentation\n\nFor quick access to the logged results: http://bit.ly/play-with-segmentation-masks\n\n![](https://i.imgur.com/9kNLI4L.gif)\n\n**If you find this useful, please consider upvoting the** [Kernel](http://bit.ly/kernel-segmentation). :)\n\n",
      "votes": 11
    },
    {
      "id": 1212936,
      "postDate": "2021-02-21T18:24:28.670Z",
      "content": "<p>Hi,</p>\n<p>Also I have one question here are we doing semantic segmentation by case here.</p>",
      "rawMarkdown": "Hi,\n\nAlso I have one question here are we doing semantic segmentation by case here.",
      "replies": [
        {
          "id": 1213464,
          "postDate": "2021-02-22T06:07:53.893Z",
          "content": "<p>What do you mean by semantic segmentation \"by case\"?</p>",
          "rawMarkdown": "What do you mean by semantic segmentation \"by case\"?"
        }
      ]
    },
    {
      "id": 1212927,
      "postDate": "2021-02-21T18:20:18.283Z",
      "content": "<p>Hi,</p>\n<p>I have a question. Here, in the segmented image I can see different colors. As per my understanding I thought segmentation of one where there is background which is represent by back color and foreground is represented by using white color. Could you please help me clear my question? </p>",
      "rawMarkdown": "Hi,\n\nI have a question. Here, in the segmented image I can see different colors. As per my understanding I thought segmentation of one where there is background which is represent by back color and foreground is represented by using white color. Could you please help me clear my question? ",
      "replies": [
        {
          "id": 1213462,
          "postDate": "2021-02-22T06:07:27.953Z",
          "content": "<p>We are doing instance segmentation here. That is each instance of the same object(cell here) is being labeled independently. Thus W&amp;B automatically assigns unique color to each pixel value. </p>\n<p>For example if there are 10 cells in an image, semantic segmentation will give a binary mask (background will be 0 and cells will be 1) while instance segmentation will give a mask with 11 unique values(0 for background, 1 for cell 1, 2 for cell 2 and so on.)</p>\n<p>I hope this clears the doubt. :)</p>",
          "rawMarkdown": "We are doing instance segmentation here. That is each instance of the same object(cell here) is being labeled independently. Thus W&B automatically assigns unique color to each pixel value. \n\nFor example if there are 10 cells in an image, semantic segmentation will give a binary mask (background will be 0 and cells will be 1) while instance segmentation will give a mask with 11 unique values(0 for background, 1 for cell 1, 2 for cell 2 and so on.)\n\nI hope this clears the doubt. :)"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1212936,
      "author_name": "RSASHWIN",
      "author_url": "",
      "post_date": "2021-02-21T18:24:28.670000",
      "content": "<p>Hi,</p>\n<p>Also I have one question here are we doing semantic segmentation by case here.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1213464,
          "author_name": "Ayush Thakur",
          "author_url": "",
          "post_date": "2021-02-22T06:07:53.893000",
          "content": "<p>What do you mean by semantic segmentation \"by case\"?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1212927,
      "author_name": "RSASHWIN",
      "author_url": "",
      "post_date": "2021-02-21T18:20:18.283000",
      "content": "<p>Hi,</p>\n<p>I have a question. Here, in the segmented image I can see different colors. As per my understanding I thought segmentation of one where there is background which is represent by back color and foreground is represented by using white color. Could you please help me clear my question? </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1213462,
          "author_name": "Ayush Thakur",
          "author_url": "",
          "post_date": "2021-02-22T06:07:27.953000",
          "content": "<p>We are doing instance segmentation here. That is each instance of the same object(cell here) is being labeled independently. Thus W&amp;B automatically assigns unique color to each pixel value. </p>\n<p>For example if there are 10 cells in an image, semantic segmentation will give a binary mask (background will be 0 and cells will be 1) while instance segmentation will give a mask with 11 unique values(0 for background, 1 for cell 1, 2 for cell 2 and so on.)</p>\n<p>I hope this clears the doubt. :)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1211841": "In this competition, we are provided with image-level labels, and the task is to classify each cell in a given image into one or multiple labels.\n\n* Thus, each image has multiple numbers of cells. \n\n* Each cell consists of multiple [organelles](https://www.genome.gov/genetics-glossary/Organelle). In the previous [HPA competition](https://www.kaggle.com/c/human-protein-atlas-image-classification), 28 organelles were used as labels, and the task was to predict image-level labels (given input image predict the organelles). \n\n* In this competition, the task is to predict cell-level labels using signals from image-level labels. That's what makes it a more challenging problem statement. \n\n* **But what are we predicting?** There's a specific _protein of interest_(signal in the green channel) that can be present in an organelle or multiple organelles in each cell. The image-level labels point to the presence of that protein in the cells *in general*. Thus at the cell-level, \nthe protein might not be present in the ground truth organelle. Interesting!\n\n* This calls for cell segmentation. We have to know the presence of the cells in an image. But we also need to differentiate one cell from another cell. Thus it's instance segmentation. \n\n* The authors have provided with [HPA-Cell-Segmentation](https://github.com/CellProfiling/HPA-Cell-Segmentation) tool. **Is it good?** In a discussion thread, I read that it can accurately segment cells in ~90% of test set images. That's an excellent baseline to start with and focus on cell-level classification. \n\nI thought of playing with the [tool](https://github.com/CellProfiling/HPA-Cell-Segmentation) and visualize the segmentation masks. I have used [Weights and Biases](https://wandb.ai/site) to play with the segmentation mask interactively.\n\nHere's my Kaggle kernel: http://bit.ly/kernel-segmentation\n\nFor quick access to the logged results: http://bit.ly/play-with-segmentation-masks\n\n![](https://i.imgur.com/9kNLI4L.gif)\n\n**If you find this useful, please consider upvoting the** [Kernel](http://bit.ly/kernel-segmentation). :)\n\n",
    "1212936": "Hi,\n\nAlso I have one question here are we doing semantic segmentation by case here.",
    "1212927": "Hi,\n\nI have a question. Here, in the segmented image I can see different colors. As per my understanding I thought segmentation of one where there is background which is represent by back color and foreground is represented by using white color. Could you please help me clear my question? "
  }
}