{
  "id": 298073,
  "title": "Cellpose origin",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/298073",
  "author_name": "",
  "post_date": "2021-12-31T13:24:58.998195Z",
  "votes": 22,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Thanks to <a href=\"https://www.kaggle.com/slawekbiel\" target=\"_blank\">@slawekbiel</a> our team has been using cellpose.  This model is described in a paper: <a href=\"https://www.biorxiv.org/content/10.1101/2020.02.02.931238v2.full.pdf\" target=\"_blank\">https://www.biorxiv.org/content/10.1101/2020.02.02.931238v2.full.pdf</a> that cites Kaggle Datascience Bowl 2018.  I entered that competition (it was my first CV competition if I remember well).  I remembered a great model by <a href=\"https://www.kaggle.com/dmytropoplavskiy\" target=\"_blank\">@dmytropoplavskiy</a> which is really similar to cellpose. I am pretty sure Cellpose took inspiration from his model. You can judge by yourself: <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/55118\" target=\"_blank\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/55118</a></p>\n<p>An excerpt:</p>\n<p>The first approach was to predict using the single UNet model:</p>\n<ul>\n<li>Mask, BCE + DICE loss</li>\n<li>Nuclei centers with 3x3 patches around the center of mass as a training label, BCE loss</li>\n<li>Area of nuclei used to normalize loss from vectors for large and small nuclei</li>\n<li>X,Y of vector to the center of nuclei, MSE loss normalized by nuclei area</li>\n</ul>\n<p>For touching nuclei the vector value to the centers changes sign, so it changes sharply and the loss is the biggest on the nuclei border which forces model to learn to separate instances. The postprocessing was quite straightforward:</p>\n<ol>\n<li><p>Find the centers of nuclei using predicted centers output, expecting the area of each prediction to be approx 9.0 (matring area of 3x3 training patch)</p></li>\n<li><p>For each pixel in predicted masc, assign it to the cluster nearest to position predicted vector to the center points to.</p></li>\n</ol>",
  "messages": [
    {
      "id": "1634252",
      "postDate": "12/31/2021 13:24:58",
      "content": "<p>Thanks to <a href=\"https://www.kaggle.com/slawekbiel\" target=\"_blank\">@slawekbiel</a> our team has been using cellpose.  This model is described in a paper: <a href=\"https://www.biorxiv.org/content/10.1101/2020.02.02.931238v2.full.pdf\" target=\"_blank\">https://www.biorxiv.org/content/10.1101/2020.02.02.931238v2.full.pdf</a> that cites Kaggle Datascience Bowl 2018.  I entered that competition (it was my first CV competition if I remember well).  I remembered a great model by <a href=\"https://www.kaggle.com/dmytropoplavskiy\" target=\"_blank\">@dmytropoplavskiy</a> which is really similar to cellpose. I am pretty sure Cellpose took inspiration from his model. You can judge by yourself: <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/55118\" target=\"_blank\">https://www.kaggle.com/c/data-science-bowl-2018/discussion/55118</a></p>\n<p>An excerpt:</p>\n<p>The first approach was to predict using the single UNet model:</p>\n<ul>\n<li>Mask, BCE + DICE loss</li>\n<li>Nuclei centers with 3x3 patches around the center of mass as a training label, BCE loss</li>\n<li>Area of nuclei used to normalize loss from vectors for large and small nuclei</li>\n<li>X,Y of vector to the center of nuclei, MSE loss normalized by nuclei area</li>\n</ul>\n<p>For touching nuclei the vector value to the centers changes sign, so it changes sharply and the loss is the biggest on the nuclei border which forces model to learn to separate instances. The postprocessing was quite straightforward:</p>\n<ol>\n<li><p>Find the centers of nuclei using predicted centers output, expecting the area of each prediction to be approx 9.0 (matring area of 3x3 training patch)</p></li>\n<li><p>For each pixel in predicted masc, assign it to the cluster nearest to position predicted vector to the center points to.</p></li>\n</ol>",
      "rawMarkdown": "Thanks to @slawekbiel our team has been using cellpose.  This model is described in a paper: https://www.biorxiv.org/content/10.1101/2020.02.02.931238v2.full.pdf that cites Kaggle Datascience Bowl 2018.  I entered that competition (it was my first CV competition if I remember well).  I remembered a great model by @dmytropoplavskiy which is really similar to cellpose. I am pretty sure Cellpose took inspiration from his model. You can judge by yourself: https://www.kaggle.com/c/data-science-bowl-2018/discussion/55118\n\nAn excerpt:\n\nThe first approach was to predict using the single UNet model:\n\n-     Mask, BCE + DICE loss\n-    Nuclei centers with 3x3 patches around the center of mass as a training label, BCE loss\n-   Area of nuclei used to normalize loss from vectors for large and small nuclei\n-    X,Y of vector to the center of nuclei, MSE loss normalized by nuclei area\n\nFor touching nuclei the vector value to the centers changes sign, so it changes sharply and the loss is the biggest on the nuclei border which forces model to learn to separate instances. The postprocessing was quite straightforward:\n\n1.     Find the centers of nuclei using predicted centers output, expecting the area of each prediction to be approx 9.0 (matring area of 3x3 training patch)\n\n2.    For each pixel in predicted masc, assign it to the cluster nearest to position predicted vector to the center points to.",
      "votes": null
    },
    {
      "id": "1634323",
      "postDate": "12/31/2021 15:31:56",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/cpmp\" target=\"_blank\">@cpmp</a>.<br>\nInterestingly, <a href=\"https://www.kaggle.com/jacobkie\" target=\"_blank\">@jacobkie</a> used 8 gradients (flows) in his solution (#2) on the data bowl 2018: <a href=\"https://github.com/jacobkie/2018DSB\" target=\"_blank\">https://github.com/jacobkie/2018DSB</a> which is also really similar to cellpose. I wish I had more free time to test cellpose and similar now that I see that all the top team used it. </p>",
      "rawMarkdown": "Thanks @cpmp.\nInterestingly, @jacobkie used 8 gradients (flows) in his solution (#2) on the data bowl 2018: https://github.com/jacobkie/2018DSB which is also really similar to cellpose. I wish I had more free time to test cellpose and similar now that I see that all the top team used it.",
      "votes": null
    },
    {
      "id": "1634337",
      "postDate": "12/31/2021 15:53:48",
      "content": "<p>I think cellpose blends well with object detection models because it is quite different form them.  It is good at identifying boundaries when instances are adjacent.</p>\n<p>Thanks for the reference to 2nd solution.  That competition was all about identifying boundary when nuclei were adjacent.</p>",
      "rawMarkdown": "I think cellpose blends well with object detection models because it is quite different form them.  It is good at identifying boundaries when instances are adjacent.\n\nThanks for the reference to 2nd solution.  That competition was all about identifying boundary when nuclei were adjacent.",
      "votes": null
    },
    {
      "id": "1634499",
      "postDate": "12/31/2021 18:23:03",
      "content": "<p>Thank you <a href=\"https://www.kaggle.com/cpmpml\" target=\"_blank\">@cpmpml</a> for pointing this up. Kaggle is really always an engine of innovative ideas and successful applied solutions! </p>",
      "rawMarkdown": "Thank you @cpmpml for pointing this up. Kaggle is really always an engine of innovative ideas and successful applied solutions!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1634323,
      "author_name": "chabir",
      "author_url": "",
      "post_date": "12/31/2021 15:31:56",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/cpmp\" target=\"_blank\">@cpmp</a>.<br>\nInterestingly, <a href=\"https://www.kaggle.com/jacobkie\" target=\"_blank\">@jacobkie</a> used 8 gradients (flows) in his solution (#2) on the data bowl 2018: <a href=\"https://github.com/jacobkie/2018DSB\" target=\"_blank\">https://github.com/jacobkie/2018DSB</a> which is also really similar to cellpose. I wish I had more free time to test cellpose and similar now that I see that all the top team used it. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1634337,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "12/31/2021 15:53:48",
          "content": "<p>I think cellpose blends well with object detection models because it is quite different form them.  It is good at identifying boundaries when instances are adjacent.</p>\n<p>Thanks for the reference to 2nd solution.  That competition was all about identifying boundary when nuclei were adjacent.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1634499,
      "author_name": "lucamassaron",
      "author_url": "",
      "post_date": "12/31/2021 18:23:03",
      "content": "<p>Thank you <a href=\"https://www.kaggle.com/cpmpml\" target=\"_blank\">@cpmpml</a> for pointing this up. Kaggle is really always an engine of innovative ideas and successful applied solutions! </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1634252": "Thanks to @slawekbiel our team has been using cellpose.  This model is described in a paper: https://www.biorxiv.org/content/10.1101/2020.02.02.931238v2.full.pdf that cites Kaggle Datascience Bowl 2018.  I entered that competition (it was my first CV competition if I remember well).  I remembered a great model by @dmytropoplavskiy which is really similar to cellpose. I am pretty sure Cellpose took inspiration from his model. You can judge by yourself: https://www.kaggle.com/c/data-science-bowl-2018/discussion/55118\n\nAn excerpt:\n\nThe first approach was to predict using the single UNet model:\n\n-     Mask, BCE + DICE loss\n-    Nuclei centers with 3x3 patches around the center of mass as a training label, BCE loss\n-   Area of nuclei used to normalize loss from vectors for large and small nuclei\n-    X,Y of vector to the center of nuclei, MSE loss normalized by nuclei area\n\nFor touching nuclei the vector value to the centers changes sign, so it changes sharply and the loss is the biggest on the nuclei border which forces model to learn to separate instances. The postprocessing was quite straightforward:\n\n1.     Find the centers of nuclei using predicted centers output, expecting the area of each prediction to be approx 9.0 (matring area of 3x3 training patch)\n\n2.    For each pixel in predicted masc, assign it to the cluster nearest to position predicted vector to the center points to.",
    "1634323": "Thanks @cpmp.\nInterestingly, @jacobkie used 8 gradients (flows) in his solution (#2) on the data bowl 2018: https://github.com/jacobkie/2018DSB which is also really similar to cellpose. I wish I had more free time to test cellpose and similar now that I see that all the top team used it.",
    "1634337": "I think cellpose blends well with object detection models because it is quite different form them.  It is good at identifying boundaries when instances are adjacent.\n\nThanks for the reference to 2nd solution.  That competition was all about identifying boundary when nuclei were adjacent.",
    "1634499": "Thank you @cpmpml for pointing this up. Kaggle is really always an engine of innovative ideas and successful applied solutions!"
  },
  "source": "meta"
}