{
  "id": 424803,
  "title": "How do you seperate masks in Unet++?",
  "url": "/competitions/hubmap-hacking-the-human-vasculature/discussion/424803",
  "author_name": "",
  "post_date": "2023-07-15T20:54:07.374766700Z",
  "votes": 1,
  "comment_count": 10,
  "views": 0,
  "content": "<p>I'm having trouble predicting masks with unet++.<br>\nI could only get all the masks, not separate them to get individual masks<br>\nSo I had only one value in my coded string, which I think may be the reason for my submission score of 0.<br>\nI would like to know how you guys predict the separate masks when using unet++?</p>",
  "messages": [
    {
      "id": "2345955",
      "postDate": "07/15/2023 20:54:07",
      "content": "<p>I'm having trouble predicting masks with unet++.<br>\nI could only get all the masks, not separate them to get individual masks<br>\nSo I had only one value in my coded string, which I think may be the reason for my submission score of 0.<br>\nI would like to know how you guys predict the separate masks when using unet++?</p>",
      "rawMarkdown": "I'm having trouble predicting masks with unet++.\nI could only get all the masks, not separate them to get individual masks\nSo I had only one value in my coded string, which I think may be the reason for my submission score of 0.\nI would like to know how you guys predict the separate masks when using unet++?",
      "votes": null
    },
    {
      "id": "2345963",
      "postDate": "07/15/2023 21:00:57",
      "content": "<p><code>72e40acccadf 512 512 0 1.0 eNqVlFt74iAQhv/SgAaltm61XRpUwLUeYmIOmpPWav7/XYckbe3u1YaYdw7AA8OHaZSQCt6H/Ykz6yqqOpoAGGLqb2sZINYAqAOa2mDbqI3ikLqT+dkwgz8A+LJJO1Pd7DzNXDZsqKb6dtxCyaVwztyshLrwbkXh+7G95tsuWR2mqpDOlk0L2fPYpJS9LZOF7PvMzSUP2Esm73ZMpHIQst8HeR+x5718iNlTIocJG8fy14E9RjIBRIjIWWwCuYfFoNl0s+P2hcaGmwI1NcB1U7V+20O3WEWmgxuhGOhgq1PmRz3hu1KfMzT8rKvGYao7y85MJ0tZn4gNaeqZ0XWUwPVBVKNB9eB</code></p>\n<p>This is what my string looks like</p>",
      "rawMarkdown": "`72e40acccadf 512 512 0 1.0 eNqVlFt74iAQhv/SgAaltm61XRpUwLUeYmIOmpPWav7/XYckbe3u1YaYdw7AA8OHaZSQCt6H/Ykz6yqqOpoAGGLqb2sZINYAqAOa2mDbqI3ikLqT+dkwgz8A+LJJO1Pd7DzNXDZsqKb6dtxCyaVwztyshLrwbkXh+7G95tsuWR2mqpDOlk0L2fPYpJS9LZOF7PvMzSUP2Esm73ZMpHIQst8HeR+x5718iNlTIocJG8fy14E9RjIBRIjIWWwCuYfFoNl0s+P2hcaGmwI1NcB1U7V+20O3WEWmgxuhGOhgq1PmRz3hu1KfMzT8rKvGYao7y85MJ0tZn4gNaeqZ0XWUwPVBVKNB9eB `\n\nThis is what my string looks like",
      "votes": null
    },
    {
      "id": "2345966",
      "postDate": "07/15/2023 21:12:03",
      "content": "<p><code>display(Image.fromarray(mask.astype(np.uint8)*255))</code><br>\n<code>base64_str = self.__encoder(mask)</code></p>\n<p>How do I split my mask?Thanks a lot.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12913052%2F14d50936b854eb501715b6242c06bd95%2FXnip2023-07-16_05-08-38.png?generation=1689455390732703&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "`display(Image.fromarray(mask.astype(np.uint8)*255))`\n`base64_str = self.__encoder(mask)`\n\nHow do I split my mask?Thanks a lot.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12913052%2F14d50936b854eb501715b6242c06bd95%2FXnip2023-07-16_05-08-38.png?generation=1689455390732703&alt=media)",
      "votes": null
    },
    {
      "id": "2346011",
      "postDate": "07/15/2023 23:14:36",
      "content": "<p>You can use connected components. This is a notebook that uses it<br>\n<a href=\"https://www.kaggle.com/code/hidngnguyna/baseline-unet-semantic-as-instance-segmentation\" target=\"_blank\">https://www.kaggle.com/code/hidngnguyna/baseline-unet-semantic-as-instance-segmentation</a></p>",
      "rawMarkdown": "You can use connected components. This is a notebook that uses it\nhttps://www.kaggle.com/code/hidngnguyna/baseline-unet-semantic-as-instance-segmentation",
      "votes": null
    },
    {
      "id": "2346188",
      "postDate": "07/16/2023 05:40:40",
      "content": "<p>Thanks, I will check it.</p>",
      "rawMarkdown": "Thanks, I will check it.",
      "votes": null
    },
    {
      "id": "2346207",
      "postDate": "07/16/2023 05:55:06",
      "content": "<p><a href=\"https://www.kaggle.com/tanjiroll\" target=\"_blank\">@tanjiroll</a> thanks a lot, I have solved my problem.</p>",
      "rawMarkdown": "tanjiroll thanks a lot, I have solved my problem.",
      "votes": null
    },
    {
      "id": "2346482",
      "postDate": "07/16/2023 09:36:02",
      "content": "<p>Using connected components is one way to go. Check the <code>skimage.segmentation</code> submodule for some inspiration <a href=\"https://scikit-image.org/docs/stable/api/skimage.segmentation.html\" target=\"_blank\">https://scikit-image.org/docs/stable/api/skimage.segmentation.html</a></p>",
      "rawMarkdown": "Using connected components is one way to go. Check the `skimage.segmentation` submodule for some inspiration https://scikit-image.org/docs/stable/api/skimage.segmentation.html",
      "votes": null
    },
    {
      "id": "2346672",
      "postDate": "07/16/2023 12:29:24",
      "content": "<p><a href=\"https://www.kaggle.com/yassinealouini\" target=\"_blank\">@yassinealouini</a> thanks, i have solved my problem</p>",
      "rawMarkdown": "yassinealouini thanks, i have solved my problem",
      "votes": null
    },
    {
      "id": "2351163",
      "postDate": "07/19/2023 21:34:19",
      "content": "<p><a href=\"https://www.kaggle.com/watchernight\" target=\"_blank\">@watchernight</a> i'm facing same, how did u solved it? always getting zero score </p>",
      "rawMarkdown": "watchernight i'm facing same, how did u solved it? always getting zero score",
      "votes": null
    },
    {
      "id": "2351594",
      "postDate": "07/20/2023 08:55:23",
      "content": "<p>You must set the confidence score</p>",
      "rawMarkdown": "You must set the confidence score",
      "votes": null
    },
    {
      "id": "2351910",
      "postDate": "07/20/2023 13:21:32",
      "content": "<p>which part exactly you mean? confidence score?</p>\n<p>instead of </p>\n<blockquote>\n  <p>score = 1.0<br>\n  used as <br>\n  score = np.mean(pred[m, :, mask_i &gt; 0]) </p>\n</blockquote>",
      "rawMarkdown": "which part exactly you mean? confidence score?\n\ninstead of \n>score = 1.0\nused as \n>score = np.mean(pred[m, :, mask_i > 0])",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2345963,
      "author_name": "watchernight",
      "author_url": "",
      "post_date": "07/15/2023 21:00:57",
      "content": "<p><code>72e40acccadf 512 512 0 1.0 eNqVlFt74iAQhv/SgAaltm61XRpUwLUeYmIOmpPWav7/XYckbe3u1YaYdw7AA8OHaZSQCt6H/Ykz6yqqOpoAGGLqb2sZINYAqAOa2mDbqI3ikLqT+dkwgz8A+LJJO1Pd7DzNXDZsqKb6dtxCyaVwztyshLrwbkXh+7G95tsuWR2mqpDOlk0L2fPYpJS9LZOF7PvMzSUP2Esm73ZMpHIQst8HeR+x5718iNlTIocJG8fy14E9RjIBRIjIWWwCuYfFoNl0s+P2hcaGmwI1NcB1U7V+20O3WEWmgxuhGOhgq1PmRz3hu1KfMzT8rKvGYao7y85MJ0tZn4gNaeqZ0XWUwPVBVKNB9eB</code></p>\n<p>This is what my string looks like</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2345966,
      "author_name": "watchernight",
      "author_url": "",
      "post_date": "07/15/2023 21:12:03",
      "content": "<p><code>display(Image.fromarray(mask.astype(np.uint8)*255))</code><br>\n<code>base64_str = self.__encoder(mask)</code></p>\n<p>How do I split my mask?Thanks a lot.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12913052%2F14d50936b854eb501715b6242c06bd95%2FXnip2023-07-16_05-08-38.png?generation=1689455390732703&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 2346482,
          "author_name": "yassinealouini",
          "author_url": "",
          "post_date": "07/16/2023 09:36:02",
          "content": "<p>Using connected components is one way to go. Check the <code>skimage.segmentation</code> submodule for some inspiration <a href=\"https://scikit-image.org/docs/stable/api/skimage.segmentation.html\" target=\"_blank\">https://scikit-image.org/docs/stable/api/skimage.segmentation.html</a></p>",
          "votes": null,
          "replies": [
            {
              "id": 2346672,
              "author_name": "watchernight",
              "author_url": "",
              "post_date": "07/16/2023 12:29:24",
              "content": "<p><a href=\"https://www.kaggle.com/yassinealouini\" target=\"_blank\">@yassinealouini</a> thanks, i have solved my problem</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2346011,
      "author_name": "tanjiroll",
      "author_url": "",
      "post_date": "07/15/2023 23:14:36",
      "content": "<p>You can use connected components. This is a notebook that uses it<br>\n<a href=\"https://www.kaggle.com/code/hidngnguyna/baseline-unet-semantic-as-instance-segmentation\" target=\"_blank\">https://www.kaggle.com/code/hidngnguyna/baseline-unet-semantic-as-instance-segmentation</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 2346188,
          "author_name": "watchernight",
          "author_url": "",
          "post_date": "07/16/2023 05:40:40",
          "content": "<p>Thanks, I will check it.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2346207,
              "author_name": "watchernight",
              "author_url": "",
              "post_date": "07/16/2023 05:55:06",
              "content": "<p><a href=\"https://www.kaggle.com/tanjiroll\" target=\"_blank\">@tanjiroll</a> thanks a lot, I have solved my problem.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2351163,
                  "author_name": "seshurajup",
                  "author_url": "",
                  "post_date": "07/19/2023 21:34:19",
                  "content": "<p><a href=\"https://www.kaggle.com/watchernight\" target=\"_blank\">@watchernight</a> i'm facing same, how did u solved it? always getting zero score </p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 2351594,
                      "author_name": "bent1e",
                      "author_url": "",
                      "post_date": "07/20/2023 08:55:23",
                      "content": "<p>You must set the confidence score</p>",
                      "votes": null,
                      "replies": [
                        {
                          "id": 2351910,
                          "author_name": "seshurajup",
                          "author_url": "",
                          "post_date": "07/20/2023 13:21:32",
                          "content": "<p>which part exactly you mean? confidence score?</p>\n<p>instead of </p>\n<blockquote>\n  <p>score = 1.0<br>\n  used as <br>\n  score = np.mean(pred[m, :, mask_i &gt; 0]) </p>\n</blockquote>",
                          "votes": null,
                          "replies": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2345955": "I'm having trouble predicting masks with unet++.\nI could only get all the masks, not separate them to get individual masks\nSo I had only one value in my coded string, which I think may be the reason for my submission score of 0.\nI would like to know how you guys predict the separate masks when using unet++?",
    "2345963": "`72e40acccadf 512 512 0 1.0 eNqVlFt74iAQhv/SgAaltm61XRpUwLUeYmIOmpPWav7/XYckbe3u1YaYdw7AA8OHaZSQCt6H/Ykz6yqqOpoAGGLqb2sZINYAqAOa2mDbqI3ikLqT+dkwgz8A+LJJO1Pd7DzNXDZsqKb6dtxCyaVwztyshLrwbkXh+7G95tsuWR2mqpDOlk0L2fPYpJS9LZOF7PvMzSUP2Esm73ZMpHIQst8HeR+x5718iNlTIocJG8fy14E9RjIBRIjIWWwCuYfFoNl0s+P2hcaGmwI1NcB1U7V+20O3WEWmgxuhGOhgq1PmRz3hu1KfMzT8rKvGYao7y85MJ0tZn4gNaeqZ0XWUwPVBVKNB9eB `\n\nThis is what my string looks like",
    "2345966": "`display(Image.fromarray(mask.astype(np.uint8)*255))`\n`base64_str = self.__encoder(mask)`\n\nHow do I split my mask?Thanks a lot.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12913052%2F14d50936b854eb501715b6242c06bd95%2FXnip2023-07-16_05-08-38.png?generation=1689455390732703&alt=media)",
    "2346011": "You can use connected components. This is a notebook that uses it\nhttps://www.kaggle.com/code/hidngnguyna/baseline-unet-semantic-as-instance-segmentation",
    "2346188": "Thanks, I will check it.",
    "2346207": "tanjiroll thanks a lot, I have solved my problem.",
    "2346482": "Using connected components is one way to go. Check the `skimage.segmentation` submodule for some inspiration https://scikit-image.org/docs/stable/api/skimage.segmentation.html",
    "2346672": "yassinealouini thanks, i have solved my problem",
    "2351163": "watchernight i'm facing same, how did u solved it? always getting zero score",
    "2351594": "You must set the confidence score",
    "2351910": "which part exactly you mean? confidence score?\n\ninstead of \n>score = 1.0\nused as \n>score = np.mean(pred[m, :, mask_i > 0])"
  },
  "source": "meta"
}