{
  "id": 287487,
  "title": "Are we predicting cells or a mask?",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/287487",
  "author_name": "",
  "post_date": "2021-11-14T08:10:44.644703900Z",
  "votes": 18,
  "comment_count": 11,
  "views": 0,
  "content": "<p>Hello. I started the competition by learning U2Net, finding preprocessing and postprocessing methods to segment each cell in an image. Now vague doubts begin to torment me that I am doing everything correctly. Perhaps our task is not to segment the cells separately, but to segment their clusters as well, where they are.<br>\nRoughly speaking, segment like the person who compiled the dataset. What do you think about this?</p>",
  "messages": [
    {
      "id": "1581758",
      "postDate": "11/14/2021 08:10:44",
      "content": "<p>Hello. I started the competition by learning U2Net, finding preprocessing and postprocessing methods to segment each cell in an image. Now vague doubts begin to torment me that I am doing everything correctly. Perhaps our task is not to segment the cells separately, but to segment their clusters as well, where they are.<br>\nRoughly speaking, segment like the person who compiled the dataset. What do you think about this?</p>",
      "rawMarkdown": "Hello. I started the competition by learning U2Net, finding preprocessing and postprocessing methods to segment each cell in an image. Now vague doubts begin to torment me that I am doing everything correctly. Perhaps our task is not to segment the cells separately, but to segment their clusters as well, where they are.\nRoughly speaking, segment like the person who compiled the dataset. What do you think about this?",
      "votes": null
    },
    {
      "id": "1582395",
      "postDate": "11/14/2021 20:54:09",
      "content": "<p>can you please explain what do you mean by <code>segment their clusters as well</code>?</p>",
      "rawMarkdown": "can you please explain what do you mean by `segment their clusters as well`?",
      "votes": null
    },
    {
      "id": "1582401",
      "postDate": "11/14/2021 21:09:58",
      "content": "<p>as I understand it, brain cells tend to coalesce into a bunch - as if sticking to each other. we can see this in the images. also dense cell groups can be seen in astro images. they are very difficult to separate. and they are also poorly segmented - separated and indicated in annotations.</p>",
      "rawMarkdown": "as I understand it, brain cells tend to coalesce into a bunch - as if sticking to each other. we can see this in the images. also dense cell groups can be seen in astro images. they are very difficult to separate. and they are also poorly segmented - separated and indicated in annotations.",
      "votes": null
    },
    {
      "id": "1582651",
      "postDate": "11/15/2021 05:48:23",
      "content": "<p>Oh I see, I did not really think about it like that, and also dont really know performing clustering and then doing the segmentation can help or not but the idea sounds good to me. Please update this topic if you find some good results. </p>\n<p>I dont know tagging people is ok or not, <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> and <a href=\"https://www.kaggle.com/danieliusk\" target=\"_blank\">@danieliusk</a> are doing great with Unets and segmentation in general. if they can give their opinion on this then that might be helpful.</p>",
      "rawMarkdown": "Oh I see, I did not really think about it like that, and also dont really know performing clustering and then doing the segmentation can help or not but the idea sounds good to me. Please update this topic if you find some good results. \n\nI dont know tagging people is ok or not, @awsaf49 and @danieliusk are doing great with Unets and segmentation in general. if they can give their opinion on this then that might be helpful.",
      "votes": null
    },
    {
      "id": "1584817",
      "postDate": "11/16/2021 19:27:23",
      "content": "<p>Not sure about doing great, as other methods seems to work better ( for example Mask-RCNN) :) </p>\n<p>However, I do not have any valid ideas on how to use clustering at the moment. Would be interesting to see if someone can make use of it.</p>",
      "rawMarkdown": "Not sure about doing great, as other methods seems to work better ( for example Mask-RCNN) :) \n\nHowever, I do not have any valid ideas on how to use clustering at the moment. Would be interesting to see if someone can make use of it.",
      "votes": null
    },
    {
      "id": "1584908",
      "postDate": "11/16/2021 21:29:13",
      "content": "<p>but your work with Unet is good, and Unet, was clearly a thing worthy of trying out. Although it's not up to the mark. sad life😔</p>",
      "rawMarkdown": "but your work with Unet is good, and Unet, was clearly a thing worthy of trying out. Although it's not up to the mark. sad life😔",
      "votes": null
    },
    {
      "id": "1584952",
      "postDate": "11/16/2021 22:49:46",
      "content": "<p>if you tell me, then my U2Net gets 0.064 at its best, and subsequent manipulations with the watershed and other processing lead to notebook errors.</p>",
      "rawMarkdown": "if you tell me, then my U2Net gets 0.064 at its best, and subsequent manipulations with the watershed and other processing lead to notebook errors.",
      "votes": null
    },
    {
      "id": "1584972",
      "postDate": "11/16/2021 23:36:52",
      "content": "<p>Yeah I also have gotten only 0.053 with my Unet and a basic TTA[have to work a lot], but <a href=\"https://www.kaggle.com/danieliusk\" target=\"_blank\">@danieliusk</a> scored 0.183 with his Unet, and that <a href=\"https://www.kaggle.com/c/sartorius-cell-instance-segmentation/discussion/286553\" target=\"_blank\">Unet strikes back</a> NB got 0.155 LB. So Unet is not that useless. thoee high-scoring Unets are using tretrained models though. </p>",
      "rawMarkdown": "Yeah I also have gotten only 0.053 with my Unet and a basic TTA[have to work a lot], but @danieliusk scored 0.183 with his Unet, and that [Unet strikes back](https://www.kaggle.com/c/sartorius-cell-instance-segmentation/discussion/286553) NB got 0.155 LB. So Unet is not that useless. thoee high-scoring Unets are using tretrained models though.",
      "votes": null
    },
    {
      "id": "1585657",
      "postDate": "11/17/2021 12:14:56",
      "content": "<p>So far I've got 0.176 on LB with a simple Unet created with R, Keras, and Tensorflow.  I train the models on my own computer, starting with the default random weights.  Each model predicts an array of 0 to 1 probabilities for each image which is then post-processed to resize, threshold and segment into individual cells. I'm finding that ensembling the results of multiple models by averaging their raw numerical predictions (prior to post-processing) produces a modest but noticeable improvement over the predictions of individual models.</p>",
      "rawMarkdown": "So far I've got 0.176 on LB with a simple Unet created with R, Keras, and Tensorflow.  I train the models on my own computer, starting with the default random weights.  Each model predicts an array of 0 to 1 probabilities for each image which is then post-processed to resize, threshold and segment into individual cells. I'm finding that ensembling the results of multiple models by averaging their raw numerical predictions (prior to post-processing) produces a modest but noticeable improvement over the predictions of individual models.",
      "votes": null
    },
    {
      "id": "1585862",
      "postDate": "11/17/2021 15:58:31",
      "content": "<p>Oh, that's great, hey <a href=\"https://www.kaggle.com/dslate\" target=\"_blank\">@dslate</a> can you tell me more about the model config, like what image size you used, what are augmentations you used, batch size,  learning rate, epochs stuff, I will try to fine-tune my model. I heard that making the Learning rate very low and increasing the epochs helped.</p>",
      "rawMarkdown": "Oh, that's great, hey @dslate can you tell me more about the model config, like what image size you used, what are augmentations you used, batch size,  learning rate, epochs stuff, I will try to fine-tune my model. I heard that making the Learning rate very low and increasing the epochs helped.",
      "votes": null
    },
    {
      "id": "1586839",
      "postDate": "11/18/2021 09:33:09",
      "content": "<p><a href=\"https://www.kaggle.com/soumya9977\" target=\"_blank\">@soumya9977</a></p>\n<p>I resize images and masks to 512x512.  Augmentations (train only) include flip, flop, transpose, and \"warp\" using R function imager::imwarp, which distorts the horizontal and vertical scales as in reflections from a curved mirror.  Batch size is 8 images.  I don't really do epochs; I construct a batch of randomly selected and augmented images, call train_on_batch to get the loss for that batch and update the model weights, and repeat the process until some termination criterion is reached.  I monitor losses, and when the model doesn't seem to be able to make any more progress I reduce the learning rate and continue.  Training ends when some maximum number of batches (currently 10000) is reached, or the learning rate, which I set initially to 0.0001, has been reduced too many times, or some specified loss value is achieved.</p>\n<p>Eventually I'll probably give up on this Unet and try to get one of the fancier, higher-performing algorithms like 'Mask R-CNN' working in my R environment (for various reasons I prefer R as my base language rather than Python).</p>\n<p>I hope this helps.</p>",
      "rawMarkdown": "soumya9977\n\nI resize images and masks to 512x512.  Augmentations (train only) include flip, flop, transpose, and \"warp\" using R function imager::imwarp, which distorts the horizontal and vertical scales as in reflections from a curved mirror.  Batch size is 8 images.  I don't really do epochs; I construct a batch of randomly selected and augmented images, call train_on_batch to get the loss for that batch and update the model weights, and repeat the process until some termination criterion is reached.  I monitor losses, and when the model doesn't seem to be able to make any more progress I reduce the learning rate and continue.  Training ends when some maximum number of batches (currently 10000) is reached, or the learning rate, which I set initially to 0.0001, has been reduced too many times, or some specified loss value is achieved.\n\nEventually I'll probably give up on this Unet and try to get one of the fancier, higher-performing algorithms like 'Mask R-CNN' working in my R environment (for various reasons I prefer R as my base language rather than Python).\n\nI hope this helps.",
      "votes": null
    },
    {
      "id": "1587297",
      "postDate": "11/18/2021 16:14:45",
      "content": "<p>thanks for sharing your model config details, I will try to improve my model based on that.</p>",
      "rawMarkdown": "thanks for sharing your model config details, I will try to improve my model based on that.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1582395,
      "author_name": "soumya9977",
      "author_url": "",
      "post_date": "11/14/2021 20:54:09",
      "content": "<p>can you please explain what do you mean by <code>segment their clusters as well</code>?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1582401,
          "author_name": "zaakciiru",
          "author_url": "",
          "post_date": "11/14/2021 21:09:58",
          "content": "<p>as I understand it, brain cells tend to coalesce into a bunch - as if sticking to each other. we can see this in the images. also dense cell groups can be seen in astro images. they are very difficult to separate. and they are also poorly segmented - separated and indicated in annotations.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1582651,
          "author_name": "soumya9977",
          "author_url": "",
          "post_date": "11/15/2021 05:48:23",
          "content": "<p>Oh I see, I did not really think about it like that, and also dont really know performing clustering and then doing the segmentation can help or not but the idea sounds good to me. Please update this topic if you find some good results. </p>\n<p>I dont know tagging people is ok or not, <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> and <a href=\"https://www.kaggle.com/danieliusk\" target=\"_blank\">@danieliusk</a> are doing great with Unets and segmentation in general. if they can give their opinion on this then that might be helpful.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1584817,
          "author_name": "danieliusk",
          "author_url": "",
          "post_date": "11/16/2021 19:27:23",
          "content": "<p>Not sure about doing great, as other methods seems to work better ( for example Mask-RCNN) :) </p>\n<p>However, I do not have any valid ideas on how to use clustering at the moment. Would be interesting to see if someone can make use of it.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1584908,
          "author_name": "soumya9977",
          "author_url": "",
          "post_date": "11/16/2021 21:29:13",
          "content": "<p>but your work with Unet is good, and Unet, was clearly a thing worthy of trying out. Although it's not up to the mark. sad life😔</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1584952,
          "author_name": "zaakciiru",
          "author_url": "",
          "post_date": "11/16/2021 22:49:46",
          "content": "<p>if you tell me, then my U2Net gets 0.064 at its best, and subsequent manipulations with the watershed and other processing lead to notebook errors.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1584972,
          "author_name": "soumya9977",
          "author_url": "",
          "post_date": "11/16/2021 23:36:52",
          "content": "<p>Yeah I also have gotten only 0.053 with my Unet and a basic TTA[have to work a lot], but <a href=\"https://www.kaggle.com/danieliusk\" target=\"_blank\">@danieliusk</a> scored 0.183 with his Unet, and that <a href=\"https://www.kaggle.com/c/sartorius-cell-instance-segmentation/discussion/286553\" target=\"_blank\">Unet strikes back</a> NB got 0.155 LB. So Unet is not that useless. thoee high-scoring Unets are using tretrained models though. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1585657,
          "author_name": "dslate",
          "author_url": "",
          "post_date": "11/17/2021 12:14:56",
          "content": "<p>So far I've got 0.176 on LB with a simple Unet created with R, Keras, and Tensorflow.  I train the models on my own computer, starting with the default random weights.  Each model predicts an array of 0 to 1 probabilities for each image which is then post-processed to resize, threshold and segment into individual cells. I'm finding that ensembling the results of multiple models by averaging their raw numerical predictions (prior to post-processing) produces a modest but noticeable improvement over the predictions of individual models.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1585862,
          "author_name": "soumya9977",
          "author_url": "",
          "post_date": "11/17/2021 15:58:31",
          "content": "<p>Oh, that's great, hey <a href=\"https://www.kaggle.com/dslate\" target=\"_blank\">@dslate</a> can you tell me more about the model config, like what image size you used, what are augmentations you used, batch size,  learning rate, epochs stuff, I will try to fine-tune my model. I heard that making the Learning rate very low and increasing the epochs helped.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1586839,
          "author_name": "dslate",
          "author_url": "",
          "post_date": "11/18/2021 09:33:09",
          "content": "<p><a href=\"https://www.kaggle.com/soumya9977\" target=\"_blank\">@soumya9977</a></p>\n<p>I resize images and masks to 512x512.  Augmentations (train only) include flip, flop, transpose, and \"warp\" using R function imager::imwarp, which distorts the horizontal and vertical scales as in reflections from a curved mirror.  Batch size is 8 images.  I don't really do epochs; I construct a batch of randomly selected and augmented images, call train_on_batch to get the loss for that batch and update the model weights, and repeat the process until some termination criterion is reached.  I monitor losses, and when the model doesn't seem to be able to make any more progress I reduce the learning rate and continue.  Training ends when some maximum number of batches (currently 10000) is reached, or the learning rate, which I set initially to 0.0001, has been reduced too many times, or some specified loss value is achieved.</p>\n<p>Eventually I'll probably give up on this Unet and try to get one of the fancier, higher-performing algorithms like 'Mask R-CNN' working in my R environment (for various reasons I prefer R as my base language rather than Python).</p>\n<p>I hope this helps.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1587297,
          "author_name": "soumya9977",
          "author_url": "",
          "post_date": "11/18/2021 16:14:45",
          "content": "<p>thanks for sharing your model config details, I will try to improve my model based on that.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1581758": "Hello. I started the competition by learning U2Net, finding preprocessing and postprocessing methods to segment each cell in an image. Now vague doubts begin to torment me that I am doing everything correctly. Perhaps our task is not to segment the cells separately, but to segment their clusters as well, where they are.\nRoughly speaking, segment like the person who compiled the dataset. What do you think about this?",
    "1582395": "can you please explain what do you mean by `segment their clusters as well`?",
    "1582401": "as I understand it, brain cells tend to coalesce into a bunch - as if sticking to each other. we can see this in the images. also dense cell groups can be seen in astro images. they are very difficult to separate. and they are also poorly segmented - separated and indicated in annotations.",
    "1582651": "Oh I see, I did not really think about it like that, and also dont really know performing clustering and then doing the segmentation can help or not but the idea sounds good to me. Please update this topic if you find some good results. \n\nI dont know tagging people is ok or not, @awsaf49 and @danieliusk are doing great with Unets and segmentation in general. if they can give their opinion on this then that might be helpful.",
    "1584817": "Not sure about doing great, as other methods seems to work better ( for example Mask-RCNN) :) \n\nHowever, I do not have any valid ideas on how to use clustering at the moment. Would be interesting to see if someone can make use of it.",
    "1584908": "but your work with Unet is good, and Unet, was clearly a thing worthy of trying out. Although it's not up to the mark. sad life😔",
    "1584952": "if you tell me, then my U2Net gets 0.064 at its best, and subsequent manipulations with the watershed and other processing lead to notebook errors.",
    "1584972": "Yeah I also have gotten only 0.053 with my Unet and a basic TTA[have to work a lot], but @danieliusk scored 0.183 with his Unet, and that [Unet strikes back](https://www.kaggle.com/c/sartorius-cell-instance-segmentation/discussion/286553) NB got 0.155 LB. So Unet is not that useless. thoee high-scoring Unets are using tretrained models though.",
    "1585657": "So far I've got 0.176 on LB with a simple Unet created with R, Keras, and Tensorflow.  I train the models on my own computer, starting with the default random weights.  Each model predicts an array of 0 to 1 probabilities for each image which is then post-processed to resize, threshold and segment into individual cells. I'm finding that ensembling the results of multiple models by averaging their raw numerical predictions (prior to post-processing) produces a modest but noticeable improvement over the predictions of individual models.",
    "1585862": "Oh, that's great, hey @dslate can you tell me more about the model config, like what image size you used, what are augmentations you used, batch size,  learning rate, epochs stuff, I will try to fine-tune my model. I heard that making the Learning rate very low and increasing the epochs helped.",
    "1586839": "soumya9977\n\nI resize images and masks to 512x512.  Augmentations (train only) include flip, flop, transpose, and \"warp\" using R function imager::imwarp, which distorts the horizontal and vertical scales as in reflections from a curved mirror.  Batch size is 8 images.  I don't really do epochs; I construct a batch of randomly selected and augmented images, call train_on_batch to get the loss for that batch and update the model weights, and repeat the process until some termination criterion is reached.  I monitor losses, and when the model doesn't seem to be able to make any more progress I reduce the learning rate and continue.  Training ends when some maximum number of batches (currently 10000) is reached, or the learning rate, which I set initially to 0.0001, has been reduced too many times, or some specified loss value is achieved.\n\nEventually I'll probably give up on this Unet and try to get one of the fancier, higher-performing algorithms like 'Mask R-CNN' working in my R environment (for various reasons I prefer R as my base language rather than Python).\n\nI hope this helps.",
    "1587297": "thanks for sharing your model config details, I will try to improve my model based on that."
  },
  "source": "meta"
}