{
  "id": 298081,
  "title": "5th place solution, maskrcnn, pseudo label and cellpose",
  "url": "/competitions/sartorius-cell-instance-segmentation/writeups/bestfitting-5th-place-solution-maskrcnn-pseudo-lab",
  "author_name": "",
  "post_date": "2022-02-24T03:52:37.870Z",
  "votes": 84,
  "comment_count": 15,
  "views": 0,
  "content": "<p>Congrats to all the winners, and thanks to Sartorius team and Kaggle hosted this competition, it’s very challenging and interest.</p>\n<p><strong>Methods</strong></p>\n<p>My pipeline can be described in the following figure.<br>\n<img src=\"https://i.imgur.com/pF2p304.png\" alt=\"pipeline.png\"><br>\nStep 1: MaskRCNN models were trained on Detectron2 using LIVECell_dataset_2021 without shsy5y cells.<br>\nStep 2: Finetune the MaskRCNN models on competition train dataset and LIVECell shsy5y cells.<br>\nStep 3: Predict the train_semi_supervised dataset and used them as pseudo labels.<br>\nStep 4: Finetune the models using LIVECellshsy5y cells + competition trainset + train_semi_supervised(pseudo)<br>\nStep 5: Predict the competition trainset and LIVECellshsy5y cells using the above models.<br>\nStep 6: Generate the flow-x, flow-y and semantic segmentation base on Step5 results using Cellpose.<br>\nStep 7: Train Cellpose model on LIVECell_dataset_2021 without shsy5y cells.<br>\nStep 8: Finetune Cellpose model using Step7 results as additional channels.<br>\nStep 9: Predict and post-process using Cellpose. The diameter was set to 19 and re-predict.</p>\n<p>The MaskRCNN+Cellpose architecture is in the following figure.<br>\n<img src=\"https://i.imgur.com/WJnAQOH.png\" alt=\"cellpose-arch.png\"><br>\n<strong>Results</strong><br>\n<img src=\"https://i.imgur.com/dwA0BNE.png\" alt=\"results.png\"><br>\n<strong>Things tried but not worked</strong><br>\n1.Deep Watershed and it’s variants.<br>\n2.OmniPose </p>\n<p><strong>Things want to try if have more time</strong><br>\n1.Cellpose as additional heads of MaskRCNN.<br>\n2.Detection models using all kinds of datasets+UNET Singel Cell segmentation.</p>\n<p><strong>Happy New Year!</strong></p>",
  "messages": [
    {
      "id": "1634288",
      "postDate": "12/31/2021 14:26:44",
      "content": "<p>Congrats to all the winners, and thanks to Sartorius team and Kaggle hosted this competition, it’s very challenging and interest.</p>\n<p><strong>Methods</strong></p>\n<p>My pipeline can be described in the following figure.<br>\n<img src=\"https://i.imgur.com/pF2p304.png\" alt=\"pipeline.png\"><br>\nStep 1: MaskRCNN models were trained on Detectron2 using LIVECell_dataset_2021 without shsy5y cells.<br>\nStep 2: Finetune the MaskRCNN models on competition train dataset and LIVECell shsy5y cells.<br>\nStep 3: Predict the train_semi_supervised dataset and used them as pseudo labels.<br>\nStep 4: Finetune the models using LIVECellshsy5y cells + competition trainset + train_semi_supervised(pseudo)<br>\nStep 5: Predict the competition trainset and LIVECellshsy5y cells using the above models.<br>\nStep 6: Generate the flow-x, flow-y and semantic segmentation base on Step5 results using Cellpose.<br>\nStep 7: Train Cellpose model on LIVECell_dataset_2021 without shsy5y cells.<br>\nStep 8: Finetune Cellpose model using Step7 results as additional channels.<br>\nStep 9: Predict and post-process using Cellpose. The diameter was set to 19 and re-predict.</p>\n<p>The MaskRCNN+Cellpose architecture is in the following figure.<br>\n<img src=\"https://i.imgur.com/WJnAQOH.png\" alt=\"cellpose-arch.png\"><br>\n<strong>Results</strong><br>\n<img src=\"https://i.imgur.com/dwA0BNE.png\" alt=\"results.png\"><br>\n<strong>Things tried but not worked</strong><br>\n1.Deep Watershed and it’s variants.<br>\n2.OmniPose </p>\n<p><strong>Things want to try if have more time</strong><br>\n1.Cellpose as additional heads of MaskRCNN.<br>\n2.Detection models using all kinds of datasets+UNET Singel Cell segmentation.</p>\n<p><strong>Happy New Year!</strong></p>",
      "rawMarkdown": "Congrats to all the winners, and thanks to Sartorius team and Kaggle hosted this competition, it’s very challenging and interest.\n\n**Methods**\n\nMy pipeline can be described in the following figure.\n![pipeline.png](https://i.imgur.com/pF2p304.png)\nStep 1: MaskRCNN models were trained on Detectron2 using LIVECell_dataset_2021 without shsy5y cells.\nStep 2: Finetune the MaskRCNN models on competition train dataset and LIVECell shsy5y cells.\nStep 3: Predict the train_semi_supervised dataset and used them as pseudo labels.\nStep 4: Finetune the models using LIVECellshsy5y cells + competition trainset + train_semi_supervised(pseudo)\nStep 5: Predict the competition trainset and LIVECellshsy5y cells using the above models.\nStep 6: Generate the flow-x, flow-y and semantic segmentation base on Step5 results using Cellpose.\nStep 7: Train Cellpose model on LIVECell_dataset_2021 without shsy5y cells.\nStep 8: Finetune Cellpose model using Step7 results as additional channels.\nStep 9: Predict and post-process using Cellpose. The diameter was set to 19 and re-predict.\n\nThe MaskRCNN+Cellpose architecture is in the following figure.\n![cellpose-arch.png](https://i.imgur.com/WJnAQOH.png)\n**Results**\n![results.png](https://i.imgur.com/dwA0BNE.png)\n**Things tried but not worked**\n1.Deep Watershed and it’s variants.\n2.OmniPose \n\n**Things want to try if have more time**\n1.Cellpose as additional heads of MaskRCNN.\n2.Detection models using all kinds of datasets+UNET Singel Cell segmentation.\n\n\n**Happy New Year!**",
      "votes": null
    },
    {
      "id": "1634332",
      "postDate": "12/31/2021 15:44:58",
      "content": "<p>Happy New Year!</p>",
      "rawMarkdown": "Happy New Year!",
      "votes": null
    },
    {
      "id": "1634336",
      "postDate": "12/31/2021 15:53:30",
      "content": "<p>Interesting idea with adding maskrcnn output as extra channels! And I see it gave you a good boost in performance. I never thought of that.</p>\n<p>Have you not experimented with other diameter setting than constant 19? It was a big factor in my own solution. You already have generated masks you are passing to it so I would have set to the median size of that.</p>",
      "rawMarkdown": "Interesting idea with adding maskrcnn output as extra channels! And I see it gave you a good boost in performance. I never thought of that.\n\nHave you not experimented with other diameter setting than constant 19? It was a big factor in my own solution. You already have generated masks you are passing to it so I would have set to the median size of that.",
      "votes": null
    },
    {
      "id": "1634354",
      "postDate": "12/31/2021 16:09:39",
      "content": "<p>Nice work <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a>. Good to see your solution has swin transformer. </p>",
      "rawMarkdown": "Nice work @bestfitting. Good to see your solution has swin transformer.",
      "votes": null
    },
    {
      "id": "1634360",
      "postDate": "12/31/2021 16:17:05",
      "content": "<p>Congrats! :)<br>\nI predict the mask of an image,  get the median diameter of the cells, and then re-predict this image using the estimated diameter.</p>",
      "rawMarkdown": "Congrats! :)\nI predict the mask of an image,  get the median diameter of the cells, and then re-predict this image using the estimated diameter.",
      "votes": null
    },
    {
      "id": "1634363",
      "postDate": "12/31/2021 16:21:11",
      "content": "<p>Ah ok, that makes sense.</p>",
      "rawMarkdown": "Ah ok, that makes sense.",
      "votes": null
    },
    {
      "id": "1634401",
      "postDate": "12/31/2021 17:04:15",
      "content": "<p>I noticed the shsy5y is excluded and then included back into the pipeline. May I ask what was the results/observations that led you to do that?</p>",
      "rawMarkdown": "I noticed the shsy5y is excluded and then included back into the pipeline. May I ask what was the results/observations that led you to do that?",
      "votes": null
    },
    {
      "id": "1634402",
      "postDate": "12/31/2021 17:04:29",
      "content": "<p>Nice and awesome model ,Congrats <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> </p>",
      "rawMarkdown": "Nice and awesome model ,Congrats @bestfitting",
      "votes": null
    },
    {
      "id": "1634500",
      "postDate": "12/31/2021 18:25:14",
      "content": "<p>A very articulated and complete work, <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a>. Congrats for your excellent result.</p>",
      "rawMarkdown": "A very articulated and complete work, @bestfitting. Congrats for your excellent result.",
      "votes": null
    },
    {
      "id": "1634550",
      "postDate": "12/31/2021 19:40:42",
      "content": "<p>Amazing engineering work! I'm absolutely impressed by your capacity to merge these multiple frameworks in the same integrated solution. I'm pretty sure that if you had 1 more week you would be top 1 with some more tuning. You had by far the steepest rising curve in the last week.</p>",
      "rawMarkdown": "Amazing engineering work! I'm absolutely impressed by your capacity to merge these multiple frameworks in the same integrated solution. I'm pretty sure that if you had 1 more week you would be top 1 with some more tuning. You had by far the steepest rising curve in the last week.",
      "votes": null
    },
    {
      "id": "1634889",
      "postDate": "01/01/2022 09:32:45",
      "content": "<p>Thanks for your kind words, but time is fair to everyone, so I quite satisfied with the final result. :)</p>",
      "rawMarkdown": "Thanks for your kind words, but time is fair to everyone, so I quite satisfied with the final result. :)",
      "votes": null
    },
    {
      "id": "1634895",
      "postDate": "01/01/2022 09:38:25",
      "content": "<p><a href=\"https://www.kaggle.com/jy2tong\" target=\"_blank\">@jy2tong</a> The logic behind is: I treat shsy5y cells of LIVECell_dataset_2021  as a part of train set data.</p>",
      "rawMarkdown": "jy2tong The logic behind is: I treat shsy5y cells of LIVECell_dataset_2021  as a part of train set data.",
      "votes": null
    },
    {
      "id": "1635385",
      "postDate": "01/01/2022 17:58:06",
      "content": "<p>Congratulations !great work</p>",
      "rawMarkdown": "Congratulations !great work",
      "votes": null
    },
    {
      "id": "1635592",
      "postDate": "01/02/2022 00:56:22",
      "content": "<p>Thank you.</p>",
      "rawMarkdown": "Thank you.",
      "votes": null
    },
    {
      "id": "1649323",
      "postDate": "01/14/2022 07:27:06",
      "content": "<p>How do you generate three channels from the Instance segmentation?</p>",
      "rawMarkdown": "How do you generate three channels from the Instance segmentation?",
      "votes": null
    },
    {
      "id": "1656519",
      "postDate": "01/19/2022 11:56:38",
      "content": "<p>Eager to open source learning.</p>",
      "rawMarkdown": "Eager to open source learning.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1634332,
      "author_name": "tiandaye",
      "author_url": "",
      "post_date": "12/31/2021 15:44:58",
      "content": "<p>Happy New Year!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1634336,
      "author_name": "slawekbiel",
      "author_url": "",
      "post_date": "12/31/2021 15:53:30",
      "content": "<p>Interesting idea with adding maskrcnn output as extra channels! And I see it gave you a good boost in performance. I never thought of that.</p>\n<p>Have you not experimented with other diameter setting than constant 19? It was a big factor in my own solution. You already have generated masks you are passing to it so I would have set to the median size of that.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1634360,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "12/31/2021 16:17:05",
          "content": "<p>Congrats! :)<br>\nI predict the mask of an image,  get the median diameter of the cells, and then re-predict this image using the estimated diameter.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1634363,
          "author_name": "slawekbiel",
          "author_url": "",
          "post_date": "12/31/2021 16:21:11",
          "content": "<p>Ah ok, that makes sense.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1634354,
      "author_name": "duykhanh99",
      "author_url": "",
      "post_date": "12/31/2021 16:09:39",
      "content": "<p>Nice work <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a>. Good to see your solution has swin transformer. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1634401,
      "author_name": "jy2tong",
      "author_url": "",
      "post_date": "12/31/2021 17:04:15",
      "content": "<p>I noticed the shsy5y is excluded and then included back into the pipeline. May I ask what was the results/observations that led you to do that?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1634895,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "01/01/2022 09:38:25",
          "content": "<p><a href=\"https://www.kaggle.com/jy2tong\" target=\"_blank\">@jy2tong</a> The logic behind is: I treat shsy5y cells of LIVECell_dataset_2021  as a part of train set data.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1635592,
          "author_name": "jy2tong",
          "author_url": "",
          "post_date": "01/02/2022 00:56:22",
          "content": "<p>Thank you.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1634402,
      "author_name": "balavashan",
      "author_url": "",
      "post_date": "12/31/2021 17:04:29",
      "content": "<p>Nice and awesome model ,Congrats <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1634500,
      "author_name": "lucamassaron",
      "author_url": "",
      "post_date": "12/31/2021 18:25:14",
      "content": "<p>A very articulated and complete work, <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a>. Congrats for your excellent result.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1634550,
      "author_name": "alexandrecc",
      "author_url": "",
      "post_date": "12/31/2021 19:40:42",
      "content": "<p>Amazing engineering work! I'm absolutely impressed by your capacity to merge these multiple frameworks in the same integrated solution. I'm pretty sure that if you had 1 more week you would be top 1 with some more tuning. You had by far the steepest rising curve in the last week.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1634889,
          "author_name": "bestfitting",
          "author_url": "",
          "post_date": "01/01/2022 09:32:45",
          "content": "<p>Thanks for your kind words, but time is fair to everyone, so I quite satisfied with the final result. :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1635385,
      "author_name": "aiswaryasivakumar",
      "author_url": "",
      "post_date": "01/01/2022 17:58:06",
      "content": "<p>Congratulations !great work</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1649323,
      "author_name": "zaopolearning",
      "author_url": "",
      "post_date": "01/14/2022 07:27:06",
      "content": "<p>How do you generate three channels from the Instance segmentation?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1656519,
      "author_name": "zaopolearning",
      "author_url": "",
      "post_date": "01/19/2022 11:56:38",
      "content": "<p>Eager to open source learning.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1634288": "Congrats to all the winners, and thanks to Sartorius team and Kaggle hosted this competition, it’s very challenging and interest.\n\n**Methods**\n\nMy pipeline can be described in the following figure.\n![pipeline.png](https://i.imgur.com/pF2p304.png)\nStep 1: MaskRCNN models were trained on Detectron2 using LIVECell_dataset_2021 without shsy5y cells.\nStep 2: Finetune the MaskRCNN models on competition train dataset and LIVECell shsy5y cells.\nStep 3: Predict the train_semi_supervised dataset and used them as pseudo labels.\nStep 4: Finetune the models using LIVECellshsy5y cells + competition trainset + train_semi_supervised(pseudo)\nStep 5: Predict the competition trainset and LIVECellshsy5y cells using the above models.\nStep 6: Generate the flow-x, flow-y and semantic segmentation base on Step5 results using Cellpose.\nStep 7: Train Cellpose model on LIVECell_dataset_2021 without shsy5y cells.\nStep 8: Finetune Cellpose model using Step7 results as additional channels.\nStep 9: Predict and post-process using Cellpose. The diameter was set to 19 and re-predict.\n\nThe MaskRCNN+Cellpose architecture is in the following figure.\n![cellpose-arch.png](https://i.imgur.com/WJnAQOH.png)\n**Results**\n![results.png](https://i.imgur.com/dwA0BNE.png)\n**Things tried but not worked**\n1.Deep Watershed and it’s variants.\n2.OmniPose \n\n**Things want to try if have more time**\n1.Cellpose as additional heads of MaskRCNN.\n2.Detection models using all kinds of datasets+UNET Singel Cell segmentation.\n\n\n**Happy New Year!**",
    "1634332": "Happy New Year!",
    "1634336": "Interesting idea with adding maskrcnn output as extra channels! And I see it gave you a good boost in performance. I never thought of that.\n\nHave you not experimented with other diameter setting than constant 19? It was a big factor in my own solution. You already have generated masks you are passing to it so I would have set to the median size of that.",
    "1634354": "Nice work @bestfitting. Good to see your solution has swin transformer.",
    "1634360": "Congrats! :)\nI predict the mask of an image,  get the median diameter of the cells, and then re-predict this image using the estimated diameter.",
    "1634363": "Ah ok, that makes sense.",
    "1634401": "I noticed the shsy5y is excluded and then included back into the pipeline. May I ask what was the results/observations that led you to do that?",
    "1634402": "Nice and awesome model ,Congrats @bestfitting",
    "1634500": "A very articulated and complete work, @bestfitting. Congrats for your excellent result.",
    "1634550": "Amazing engineering work! I'm absolutely impressed by your capacity to merge these multiple frameworks in the same integrated solution. I'm pretty sure that if you had 1 more week you would be top 1 with some more tuning. You had by far the steepest rising curve in the last week.",
    "1634889": "Thanks for your kind words, but time is fair to everyone, so I quite satisfied with the final result. :)",
    "1634895": "jy2tong The logic behind is: I treat shsy5y cells of LIVECell_dataset_2021  as a part of train set data.",
    "1635385": "Congratulations !great work",
    "1635592": "Thank you.",
    "1649323": "How do you generate three channels from the Instance segmentation?",
    "1656519": "Eager to open source learning."
  },
  "source": "meta"
}