{
  "id": 298002,
  "title": "[Viettel.DGD] Train4Ever 7th place Solution",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/298002",
  "author_name": "Bùi Nhật Trường",
  "post_date": "2021-12-31T03:55:35.263000",
  "votes": 38,
  "comment_count": 20,
  "views": 0,
  "content": "<p>Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.<br>\nShout out for <a href=\"https://www.kaggle.com/tungvs\" target=\"_blank\">@tungvs</a>  <a href=\"https://www.kaggle.com/namgalielei\" target=\"_blank\">@namgalielei</a> <a href=\"https://www.kaggle.com/damtrongtuyen\" target=\"_blank\">@damtrongtuyen</a> <a href=\"https://www.kaggle.com/duykhanh99\" target=\"_blank\">@duykhanh99</a>.</p>\n<p>This our brief solution for Sartorius - Cell Instance Segmentation competition. <br>\nOur solution is a flow with 5 stages back to back:</p>\n<ol>\n<li>Train baseline models</li>\n<li>Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask</li>\n<li>Pseudo labeling with potential models</li>\n<li>Pseudo labeling round 2 and Ensemble</li>\n<li>Post processing model</li>\n</ol>\n<p>Stage 1, we tried a lot of models with original data:<br>\n        - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)<br>\n    - PointRend <br>\n    - GCNet<br>\n    - CellPose<br>\n    - MaskRCNN Swin<br>\n    - MaskRCNN Cascade Swin<br>\n    - SCNet<br>\n    - Query Instance<br>\n    - HTC<br>\n    - CBNet V2<br>\nNote that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.<br>\nAfter validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:<br>\n    - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329<br>\n    - PointRend: 0.317<br>\n    - MaskRCNN SWin: 0.292<br>\n    - MaskRCNN Swin: 0.291<br>\n    - GCNet: 0.304<br>\n    - CellPose: 0.314<br>\n(All are reported on public leaderboard scores)</p>\n<p>Stage 2, we added clean data, retrained stage 1 candidates and finetuned:<br>\n    Add LiveCell Shsy5y data:<br>\nWe used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y <br>\n    Our cleaning method:<br>\n        1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)<br>\n        2. Remove cort images with duplicate annotations <br>\n        3. Sanity check and remove cort images that we feel missing annotations<br>\n    More fine tuning:<br>\n        1. Image size increased from 800 (shortest edge) to 1024<br>\n        2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)<br>\n    Our best model performance on Public leaderboard after stage 2:<br>\n        - MaskRCNN ResNeSt200: 0.336    </p>\n<p>Stage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data<br>\nFirst, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.<br>\nThen MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.</p>\n<p>At this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. </p>\n<p>Stage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.<br>\nThe new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.</p>\n<p>At this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. </p>\n<p>Then we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.</p>\n<p>The new ensembling method described with the image below:</p>\n<p><img src=\"https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg\" alt=\"ensembling method\"></p>\n<p>Those only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.</p>\n<p>Stage 5, we trained a machine learning model with a view to filtering FPs. <br>\nWe extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  <br>\nModel: CatBoost<br>\nValidation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.<br>\nHyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. </p>\n<p>This stage gave us a score of 0.341 on the leaderboard.</p>\n<p>Our final submission notebooks:<br>\n<a href=\"https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\" target=\"_blank\">https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook</a></p>\n<p>This is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.</p>",
  "messages": [
    {
      "id": 1633774,
      "postDate": "2021-12-31T03:55:35.263Z",
      "content": "<p>Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.<br>\nShout out for <a href=\"https://www.kaggle.com/tungvs\" target=\"_blank\">@tungvs</a>  <a href=\"https://www.kaggle.com/namgalielei\" target=\"_blank\">@namgalielei</a> <a href=\"https://www.kaggle.com/damtrongtuyen\" target=\"_blank\">@damtrongtuyen</a> <a href=\"https://www.kaggle.com/duykhanh99\" target=\"_blank\">@duykhanh99</a>.</p>\n<p>This our brief solution for Sartorius - Cell Instance Segmentation competition. <br>\nOur solution is a flow with 5 stages back to back:</p>\n<ol>\n<li>Train baseline models</li>\n<li>Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask</li>\n<li>Pseudo labeling with potential models</li>\n<li>Pseudo labeling round 2 and Ensemble</li>\n<li>Post processing model</li>\n</ol>\n<p>Stage 1, we tried a lot of models with original data:<br>\n        - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)<br>\n    - PointRend <br>\n    - GCNet<br>\n    - CellPose<br>\n    - MaskRCNN Swin<br>\n    - MaskRCNN Cascade Swin<br>\n    - SCNet<br>\n    - Query Instance<br>\n    - HTC<br>\n    - CBNet V2<br>\nNote that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.<br>\nAfter validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:<br>\n    - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329<br>\n    - PointRend: 0.317<br>\n    - MaskRCNN SWin: 0.292<br>\n    - MaskRCNN Swin: 0.291<br>\n    - GCNet: 0.304<br>\n    - CellPose: 0.314<br>\n(All are reported on public leaderboard scores)</p>\n<p>Stage 2, we added clean data, retrained stage 1 candidates and finetuned:<br>\n    Add LiveCell Shsy5y data:<br>\nWe used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y <br>\n    Our cleaning method:<br>\n        1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)<br>\n        2. Remove cort images with duplicate annotations <br>\n        3. Sanity check and remove cort images that we feel missing annotations<br>\n    More fine tuning:<br>\n        1. Image size increased from 800 (shortest edge) to 1024<br>\n        2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)<br>\n    Our best model performance on Public leaderboard after stage 2:<br>\n        - MaskRCNN ResNeSt200: 0.336    </p>\n<p>Stage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data<br>\nFirst, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.<br>\nThen MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.</p>\n<p>At this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. </p>\n<p>Stage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.<br>\nThe new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.</p>\n<p>At this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. </p>\n<p>Then we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.</p>\n<p>The new ensembling method described with the image below:</p>\n<p><img src=\"https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg\" alt=\"ensembling method\"></p>\n<p>Those only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.</p>\n<p>Stage 5, we trained a machine learning model with a view to filtering FPs. <br>\nWe extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  <br>\nModel: CatBoost<br>\nValidation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.<br>\nHyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. </p>\n<p>This stage gave us a score of 0.341 on the leaderboard.</p>\n<p>Our final submission notebooks:<br>\n<a href=\"https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\" target=\"_blank\">https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook</a></p>\n<p>This is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.</p>",
      "rawMarkdown": "Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.\nShout out for @tungvs  @namgalielei @damtrongtuyen @duykhanh99.\n\nThis our brief solution for Sartorius - Cell Instance Segmentation competition. \nOur solution is a flow with 5 stages back to back:\n1. Train baseline models\n2. Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask\n3. Pseudo labeling with potential models\n4. Pseudo labeling round 2 and Ensemble\n5. Post processing model\n\nStage 1, we tried a lot of models with original data:\n        - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)\n\t- PointRend \n\t- GCNet\n\t- CellPose\n\t- MaskRCNN Swin\n\t- MaskRCNN Cascade Swin\n\t- SCNet\n\t- Query Instance\n\t- HTC\n\t- CBNet V2\nNote that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.\nAfter validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:\n\t- MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329\n\t- PointRend: 0.317\n\t- MaskRCNN SWin: 0.292\n\t- MaskRCNN Swin: 0.291\n\t- GCNet: 0.304\n\t- CellPose: 0.314\n(All are reported on public leaderboard scores)\n\nStage 2, we added clean data, retrained stage 1 candidates and finetuned:\n\tAdd LiveCell Shsy5y data:\nWe used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y \n\tOur cleaning method:\n\t\t1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)\n\t\t2. Remove cort images with duplicate annotations \n\t\t3. Sanity check and remove cort images that we feel missing annotations\n\tMore fine tuning:\n\t\t1. Image size increased from 800 (shortest edge) to 1024\n\t\t2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)\n\tOur best model performance on Public leaderboard after stage 2:\n\t\t- MaskRCNN ResNeSt200: 0.336\t\n\nStage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data\nFirst, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.\nThen MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.\n \nAt this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. \n\nStage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.\nThe new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.\n\nAt this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. \n\nThen we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.\n\nThe new ensembling method described with the image below:\n\n![ensembling method](https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg)\n\nThose only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.\n\nStage 5, we trained a machine learning model with a view to filtering FPs. \nWe extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  \nModel: CatBoost\nValidation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.\nHyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. \n\nThis stage gave us a score of 0.341 on the leaderboard.\n\nOur final submission notebooks:\nhttps://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\n\n\t\nThis is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.\n",
      "votes": 37
    },
    {
      "id": 1633789,
      "postDate": "2021-12-31T04:11:29.430Z",
      "content": "<p>Scores of some other models:</p>\n<ol>\n<li>Single fold model with MaskRCNN Swin Tiny Transformer (mmdetection) can get 0.334 LB (not optimized)</li>\n<li>Single fold Cellpose model can get 0.332 LB </li>\n</ol>",
      "rawMarkdown": "Scores of some other models:\n\n1. Single fold model with MaskRCNN Swin Tiny Transformer (mmdetection) can get 0.334 LB (not optimized)\n2. Single fold Cellpose model can get 0.332 LB ",
      "votes": 7,
      "replies": [
        {
          "id": 1633792,
          "postDate": "2021-12-31T04:14:30.330Z",
          "content": "<p>After using pseudo label, indeed. </p>",
          "rawMarkdown": "After using pseudo label, indeed. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1634074,
      "postDate": "2021-12-31T10:38:56.047Z",
      "content": "<p>Congrats to your team!<br>\n May I know more details in your single MaskRCNN Cascade ResneSt200 model when training (configuration, augmentation..)? Thanks</p>",
      "rawMarkdown": "Congrats to your team!\n May I know more details in your single MaskRCNN Cascade ResneSt200 model when training (configuration, augmentation..)? Thanks",
      "votes": 1,
      "replies": [
        {
          "id": 1634269,
          "postDate": "2021-12-31T13:51:20.900Z",
          "content": "<p>Here is our config<br>\nShortest edge size: 1024<br>\nFreeze batchnorm</p>\n<p>MODEL.RPN.BATCH_SIZE_PER_IMAGE = 1024<br>\nMODEL.RPN.POSITIVE_FRACTION = 0.7<br>\nROI_HEADS.BATCH_SIZE_PER_IMAGE = 1024<br>\nMODEL.ROI_HEADS.POSITIVE_FRACTION = 0.7<br>\nANCHOR_GENERATOR.SIZES: [[4], [9], [17], [31], [64], [127]] <br>\nANCHOR_GENERATOR.SIZES.ASPECT_RATIOS: [[0.25, 0.5, 1.0, 2.0, 4.0]]  </p>\n<p>Augment: Random Crop 0.8</p>",
          "rawMarkdown": "Here is our config\nShortest edge size: 1024\nFreeze batchnorm\n\nMODEL.RPN.BATCH_SIZE_PER_IMAGE = 1024\nMODEL.RPN.POSITIVE_FRACTION = 0.7\nROI_HEADS.BATCH_SIZE_PER_IMAGE = 1024\nMODEL.ROI_HEADS.POSITIVE_FRACTION = 0.7\nANCHOR_GENERATOR.SIZES: [[4], [9], [17], [31], [64], [127]] \nANCHOR_GENERATOR.SIZES.ASPECT_RATIOS: [[0.25, 0.5, 1.0, 2.0, 4.0]]  \n\nAugment: Random Crop 0.8\n\n",
          "votes": 1
        }
      ]
    },
    {
      "id": 1634051,
      "postDate": "2021-12-31T10:17:16.623Z",
      "content": "<p>Congratulations to you and your team, two consecutive gold medals is an amazing achievement! Keep up the good work and you guys will be grandmaster in no time :)</p>",
      "rawMarkdown": "Congratulations to you and your team, two consecutive gold medals is an amazing achievement! Keep up the good work and you guys will be grandmaster in no time :)",
      "votes": 1,
      "replies": [
        {
          "id": 1634056,
          "postDate": "2021-12-31T10:23:51.530Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!",
          "votes": 1
        }
      ]
    },
    {
      "id": 1634038,
      "postDate": "2021-12-31T09:52:04.520Z",
      "content": "<p>Congratulations for your second gold! A very nice and detailed explanation.</p>",
      "rawMarkdown": "Congratulations for your second gold! A very nice and detailed explanation.",
      "votes": 1,
      "replies": [
        {
          "id": 1634057,
          "postDate": "2021-12-31T10:24:01.477Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        }
      ]
    },
    {
      "id": 1633880,
      "postDate": "2021-12-31T06:04:43.107Z",
      "content": "<p>Tons of work. Congrats！</p>",
      "rawMarkdown": "Tons of work. Congrats！",
      "votes": 1
    },
    {
      "id": 1633822,
      "postDate": "2021-12-31T04:55:57.627Z",
      "content": "<p>Tons of work. Congrats to your team. :D</p>",
      "rawMarkdown": "Tons of work. Congrats to your team. :D",
      "votes": 1,
      "replies": [
        {
          "id": 1633825,
          "postDate": "2021-12-31T04:58:17.660Z",
          "content": "<p>Thank you :D</p>",
          "rawMarkdown": "Thank you :D",
          "votes": 1
        }
      ]
    },
    {
      "id": 1633896,
      "postDate": "2021-12-31T06:28:53.653Z",
      "content": "<p>Congrats for two golds in a row Train4Ever!</p>",
      "rawMarkdown": "Congrats for two golds in a row Train4Ever!",
      "votes": 2,
      "replies": [
        {
          "id": 1633911,
          "postDate": "2021-12-31T06:40:56.233Z",
          "content": "<p>Thanks. Glad seeing you around</p>",
          "rawMarkdown": "Thanks. Glad seeing you around",
          "votes": 2
        }
      ]
    },
    {
      "id": 1633862,
      "postDate": "2021-12-31T05:46:49.063Z",
      "content": "<p>The ensembling idea that you just showed with the diagram, is just awesome. I checked your notebook, its a little big, so I couldn't find the code where you actually did it.<br>\nThanks</p>",
      "rawMarkdown": "The ensembling idea that you just showed with the diagram, is just awesome. I checked your notebook, its a little big, so I couldn't find the code where you actually did it.\nThanks",
      "votes": 2,
      "replies": [
        {
          "id": 1633866,
          "postDate": "2021-12-31T05:54:20.330Z",
          "content": "<p>Please look for ensemble() function. </p>",
          "rawMarkdown": "Please look for ensemble() function. ",
          "votes": 2
        },
        {
          "id": 1633890,
          "postDate": "2021-12-31T06:14:30.783Z",
          "content": "<p>Got it thanks!</p>",
          "rawMarkdown": "Got it thanks!\n",
          "votes": 1
        }
      ]
    },
    {
      "id": 1633781,
      "postDate": "2021-12-31T04:05:40.533Z",
      "content": "<p>Congrats…</p>",
      "rawMarkdown": "Congrats...",
      "votes": 2
    },
    {
      "id": 1633776,
      "postDate": "2021-12-31T03:59:29.193Z",
      "content": "<p>Excellent !!!</p>\n<blockquote>\n  <p>Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.<br>\n  Shout out for <a href=\"https://www.kaggle.com/tungvs\" target=\"_blank\">@tungvs</a>  <a href=\"https://www.kaggle.com/namgalielei\" target=\"_blank\">@namgalielei</a> <a href=\"https://www.kaggle.com/damtrongtuyen\" target=\"_blank\">@damtrongtuyen</a> <a href=\"https://www.kaggle.com/duykhanh99\" target=\"_blank\">@duykhanh99</a>.</p>\n  <p>This our brief solution for Sartorius - Cell Instance Segmentation competition. <br>\n  Our solution is a flow with 5 stages back to back:</p>\n  <ol>\n  <li>Train baseline models</li>\n  <li>Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask</li>\n  <li>Pseudo labeling with potential models</li>\n  <li>Pseudo labeling round 2 and Ensemble</li>\n  <li>Post processing model</li>\n  </ol>\n  <p>Stage 1, we tried a lot of models with original data:<br>\n          - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)<br>\n      - PointRend <br>\n      - GCNet<br>\n      - CellPose<br>\n      - MaskRCNN Swin<br>\n      - MaskRCNN Cascade Swin<br>\n      - SCNet<br>\n      - Query Instance<br>\n      - HTC<br>\n      - CBNet V2<br>\n  Note that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.<br>\n  After validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:<br>\n      - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329<br>\n      - PointRend: 0.317<br>\n      - MaskRCNN SWin: 0.292<br>\n      - MaskRCNN Swin: 0.291<br>\n      - GCNet: 0.304<br>\n      - CellPose: 0.314<br>\n  (All are reported on public leaderboard scores)</p>\n  <p>Stage 2, we added clean data, retrained stage 1 candidates and finetuned:<br>\n      Add LiveCell Shsy5y data:<br>\n  We used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y <br>\n      Our cleaning method:<br>\n          1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)<br>\n          2. Remove cort images with duplicate annotations <br>\n          3. Sanity check and remove cort images that we feel missing annotations<br>\n      More fine tuning:<br>\n          1. Image size increased from 800 (shortest edge) to 1024<br>\n          2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)<br>\n      Our best model performance on Public leaderboard after stage 2:<br>\n          - MaskRCNN ResNeSt200: 0.336    </p>\n  <p>Stage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data<br>\n  First, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.<br>\n  Then MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.</p>\n  <p>At this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. </p>\n  <p>Stage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.<br>\n  The new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.</p>\n  <p>At this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. </p>\n  <p>Then we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.</p>\n  <p>The new ensembling method described with the image below:</p>\n  <p><img src=\"https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg\" alt=\"ensembling method\"></p>\n  <p>Those only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.</p>\n  <p>Stage 5, we trained a machine learning model with a view to filtering FPs. <br>\n  We extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  <br>\n  Model: CatBoost<br>\n  Validation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.<br>\n  Hyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. </p>\n  <p>This stage gave us a score of 0.341 on the leaderboard.</p>\n  <p>Our final submission notebooks:<br>\n  <a href=\"https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\" target=\"_blank\">https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook</a></p>\n  <p>This is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.</p>\n</blockquote>",
      "rawMarkdown": "Excellent !!!\n> Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.\n> Shout out for @tungvs  @namgalielei @damtrongtuyen @duykhanh99.\n> \n> This our brief solution for Sartorius - Cell Instance Segmentation competition. \n> Our solution is a flow with 5 stages back to back:\n> 1. Train baseline models\n> 2. Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask\n> 3. Pseudo labeling with potential models\n> 4. Pseudo labeling round 2 and Ensemble\n> 5. Post processing model\n> \n> Stage 1, we tried a lot of models with original data:\n>         - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)\n> \t- PointRend \n> \t- GCNet\n> \t- CellPose\n> \t- MaskRCNN Swin\n> \t- MaskRCNN Cascade Swin\n> \t- SCNet\n> \t- Query Instance\n> \t- HTC\n> \t- CBNet V2\n> Note that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.\n> After validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:\n> \t- MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329\n> \t- PointRend: 0.317\n> \t- MaskRCNN SWin: 0.292\n> \t- MaskRCNN Swin: 0.291\n> \t- GCNet: 0.304\n> \t- CellPose: 0.314\n> (All are reported on public leaderboard scores)\n> \n> Stage 2, we added clean data, retrained stage 1 candidates and finetuned:\n> \tAdd LiveCell Shsy5y data:\n> We used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y \n> \tOur cleaning method:\n> \t\t1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)\n> \t\t2. Remove cort images with duplicate annotations \n> \t\t3. Sanity check and remove cort images that we feel missing annotations\n> \tMore fine tuning:\n> \t\t1. Image size increased from 800 (shortest edge) to 1024\n> \t\t2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)\n> \tOur best model performance on Public leaderboard after stage 2:\n> \t\t- MaskRCNN ResNeSt200: 0.336\t\n> \n> Stage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data\n> First, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.\n> Then MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.\n>  \n> At this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. \n> \n> Stage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.\n> The new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.\n> \n> At this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. \n> \n> Then we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.\n> \n> The new ensembling method described with the image below:\n> \n> ![ensembling method](https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg)\n> \n> Those only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.\n> \n> Stage 5, we trained a machine learning model with a view to filtering FPs. \n> We extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  \n> Model: CatBoost\n> Validation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.\n> Hyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. \n> \n> This stage gave us a score of 0.341 on the leaderboard.\n> \n> Our final submission notebooks:\n> https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\n> \n> \t\n> This is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.\n\n",
      "votes": -2
    },
    {
      "id": 1634980,
      "postDate": "2022-01-01T11:14:31.587Z",
      "content": "<p>Congrats for the entire team for getting gold 🪙 </p>",
      "rawMarkdown": "Congrats for the entire team for getting gold 🪙 "
    },
    {
      "id": 1633851,
      "postDate": "2021-12-31T05:30:43.387Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1633789,
      "author_name": "KhanhVD",
      "author_url": "",
      "post_date": "2021-12-31T04:11:29.430000",
      "content": "<p>Scores of some other models:</p>\n<ol>\n<li>Single fold model with MaskRCNN Swin Tiny Transformer (mmdetection) can get 0.334 LB (not optimized)</li>\n<li>Single fold Cellpose model can get 0.332 LB </li>\n</ol>",
      "votes": 7,
      "replies": [
        {
          "id": 1633792,
          "author_name": "Liam Nguyen",
          "author_url": "",
          "post_date": "2021-12-31T04:14:30.330000",
          "content": "<p>After using pseudo label, indeed. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1634074,
      "author_name": "Vu",
      "author_url": "",
      "post_date": "2021-12-31T10:38:56.047000",
      "content": "<p>Congrats to your team!<br>\n May I know more details in your single MaskRCNN Cascade ResneSt200 model when training (configuration, augmentation..)? Thanks</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1634269,
          "author_name": "Liam Nguyen",
          "author_url": "",
          "post_date": "2021-12-31T13:51:20.900000",
          "content": "<p>Here is our config<br>\nShortest edge size: 1024<br>\nFreeze batchnorm</p>\n<p>MODEL.RPN.BATCH_SIZE_PER_IMAGE = 1024<br>\nMODEL.RPN.POSITIVE_FRACTION = 0.7<br>\nROI_HEADS.BATCH_SIZE_PER_IMAGE = 1024<br>\nMODEL.ROI_HEADS.POSITIVE_FRACTION = 0.7<br>\nANCHOR_GENERATOR.SIZES: [[4], [9], [17], [31], [64], [127]] <br>\nANCHOR_GENERATOR.SIZES.ASPECT_RATIOS: [[0.25, 0.5, 1.0, 2.0, 4.0]]  </p>\n<p>Augment: Random Crop 0.8</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1634051,
      "author_name": "NaN",
      "author_url": "",
      "post_date": "2021-12-31T10:17:16.623000",
      "content": "<p>Congratulations to you and your team, two consecutive gold medals is an amazing achievement! Keep up the good work and you guys will be grandmaster in no time :)</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1634056,
          "author_name": "Bùi Nhật Trường",
          "author_url": "",
          "post_date": "2021-12-31T10:23:51.530000",
          "content": "<p>Thank you!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1634038,
      "author_name": "Luca Massaron",
      "author_url": "",
      "post_date": "2021-12-31T09:52:04.520000",
      "content": "<p>Congratulations for your second gold! A very nice and detailed explanation.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1634057,
          "author_name": "Bùi Nhật Trường",
          "author_url": "",
          "post_date": "2021-12-31T10:24:01.477000",
          "content": "<p>Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1633880,
      "author_name": "Tom Kerl",
      "author_url": "",
      "post_date": "2021-12-31T06:04:43.107000",
      "content": "<p>Tons of work. Congrats！</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1633822,
      "author_name": "Thang Vu",
      "author_url": "",
      "post_date": "2021-12-31T04:55:57.627000",
      "content": "<p>Tons of work. Congrats to your team. :D</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1633825,
          "author_name": "KhanhVD",
          "author_url": "",
          "post_date": "2021-12-31T04:58:17.660000",
          "content": "<p>Thank you :D</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1633896,
      "author_name": "Gunes Evitan",
      "author_url": "",
      "post_date": "2021-12-31T06:28:53.653000",
      "content": "<p>Congrats for two golds in a row Train4Ever!</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1633911,
          "author_name": "Liam Nguyen",
          "author_url": "",
          "post_date": "2021-12-31T06:40:56.233000",
          "content": "<p>Thanks. Glad seeing you around</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1633862,
      "author_name": "DeepUnderstanding",
      "author_url": "",
      "post_date": "2021-12-31T05:46:49.063000",
      "content": "<p>The ensembling idea that you just showed with the diagram, is just awesome. I checked your notebook, its a little big, so I couldn't find the code where you actually did it.<br>\nThanks</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1633866,
          "author_name": "Liam Nguyen",
          "author_url": "",
          "post_date": "2021-12-31T05:54:20.330000",
          "content": "<p>Please look for ensemble() function. </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1633890,
          "author_name": "DeepUnderstanding",
          "author_url": "",
          "post_date": "2021-12-31T06:14:30.783000",
          "content": "<p>Got it thanks!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1633781,
      "author_name": "Raghawendra Singh",
      "author_url": "",
      "post_date": "2021-12-31T04:05:40.533000",
      "content": "<p>Congrats…</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1633776,
      "author_name": "Nam Nguyen",
      "author_url": "",
      "post_date": "2021-12-31T03:59:29.193000",
      "content": "<p>Excellent !!!</p>\n<blockquote>\n  <p>Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.<br>\n  Shout out for <a href=\"https://www.kaggle.com/tungvs\" target=\"_blank\">@tungvs</a>  <a href=\"https://www.kaggle.com/namgalielei\" target=\"_blank\">@namgalielei</a> <a href=\"https://www.kaggle.com/damtrongtuyen\" target=\"_blank\">@damtrongtuyen</a> <a href=\"https://www.kaggle.com/duykhanh99\" target=\"_blank\">@duykhanh99</a>.</p>\n  <p>This our brief solution for Sartorius - Cell Instance Segmentation competition. <br>\n  Our solution is a flow with 5 stages back to back:</p>\n  <ol>\n  <li>Train baseline models</li>\n  <li>Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask</li>\n  <li>Pseudo labeling with potential models</li>\n  <li>Pseudo labeling round 2 and Ensemble</li>\n  <li>Post processing model</li>\n  </ol>\n  <p>Stage 1, we tried a lot of models with original data:<br>\n          - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)<br>\n      - PointRend <br>\n      - GCNet<br>\n      - CellPose<br>\n      - MaskRCNN Swin<br>\n      - MaskRCNN Cascade Swin<br>\n      - SCNet<br>\n      - Query Instance<br>\n      - HTC<br>\n      - CBNet V2<br>\n  Note that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.<br>\n  After validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:<br>\n      - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329<br>\n      - PointRend: 0.317<br>\n      - MaskRCNN SWin: 0.292<br>\n      - MaskRCNN Swin: 0.291<br>\n      - GCNet: 0.304<br>\n      - CellPose: 0.314<br>\n  (All are reported on public leaderboard scores)</p>\n  <p>Stage 2, we added clean data, retrained stage 1 candidates and finetuned:<br>\n      Add LiveCell Shsy5y data:<br>\n  We used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y <br>\n      Our cleaning method:<br>\n          1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)<br>\n          2. Remove cort images with duplicate annotations <br>\n          3. Sanity check and remove cort images that we feel missing annotations<br>\n      More fine tuning:<br>\n          1. Image size increased from 800 (shortest edge) to 1024<br>\n          2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)<br>\n      Our best model performance on Public leaderboard after stage 2:<br>\n          - MaskRCNN ResNeSt200: 0.336    </p>\n  <p>Stage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data<br>\n  First, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.<br>\n  Then MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.</p>\n  <p>At this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. </p>\n  <p>Stage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.<br>\n  The new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.</p>\n  <p>At this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. </p>\n  <p>Then we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.</p>\n  <p>The new ensembling method described with the image below:</p>\n  <p><img src=\"https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg\" alt=\"ensembling method\"></p>\n  <p>Those only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.</p>\n  <p>Stage 5, we trained a machine learning model with a view to filtering FPs. <br>\n  We extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  <br>\n  Model: CatBoost<br>\n  Validation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.<br>\n  Hyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. </p>\n  <p>This stage gave us a score of 0.341 on the leaderboard.</p>\n  <p>Our final submission notebooks:<br>\n  <a href=\"https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\" target=\"_blank\">https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook</a></p>\n  <p>This is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.</p>\n</blockquote>",
      "votes": -2,
      "replies": []
    },
    {
      "id": 1634980,
      "author_name": "Bala Vashan",
      "author_url": "",
      "post_date": "2022-01-01T11:14:31.587000",
      "content": "<p>Congrats for the entire team for getting gold 🪙 </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1633851,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-12-31T05:30:43.387000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1633774": "Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.\nShout out for @tungvs  @namgalielei @damtrongtuyen @duykhanh99.\n\nThis our brief solution for Sartorius - Cell Instance Segmentation competition. \nOur solution is a flow with 5 stages back to back:\n1. Train baseline models\n2. Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask\n3. Pseudo labeling with potential models\n4. Pseudo labeling round 2 and Ensemble\n5. Post processing model\n\nStage 1, we tried a lot of models with original data:\n        - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)\n\t- PointRend \n\t- GCNet\n\t- CellPose\n\t- MaskRCNN Swin\n\t- MaskRCNN Cascade Swin\n\t- SCNet\n\t- Query Instance\n\t- HTC\n\t- CBNet V2\nNote that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.\nAfter validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:\n\t- MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329\n\t- PointRend: 0.317\n\t- MaskRCNN SWin: 0.292\n\t- MaskRCNN Swin: 0.291\n\t- GCNet: 0.304\n\t- CellPose: 0.314\n(All are reported on public leaderboard scores)\n\nStage 2, we added clean data, retrained stage 1 candidates and finetuned:\n\tAdd LiveCell Shsy5y data:\nWe used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y \n\tOur cleaning method:\n\t\t1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)\n\t\t2. Remove cort images with duplicate annotations \n\t\t3. Sanity check and remove cort images that we feel missing annotations\n\tMore fine tuning:\n\t\t1. Image size increased from 800 (shortest edge) to 1024\n\t\t2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)\n\tOur best model performance on Public leaderboard after stage 2:\n\t\t- MaskRCNN ResNeSt200: 0.336\t\n\nStage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data\nFirst, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.\nThen MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.\n \nAt this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. \n\nStage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.\nThe new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.\n\nAt this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. \n\nThen we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.\n\nThe new ensembling method described with the image below:\n\n![ensembling method](https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg)\n\nThose only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.\n\nStage 5, we trained a machine learning model with a view to filtering FPs. \nWe extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  \nModel: CatBoost\nValidation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.\nHyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. \n\nThis stage gave us a score of 0.341 on the leaderboard.\n\nOur final submission notebooks:\nhttps://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\n\n\t\nThis is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.\n",
    "1633789": "Scores of some other models:\n\n1. Single fold model with MaskRCNN Swin Tiny Transformer (mmdetection) can get 0.334 LB (not optimized)\n2. Single fold Cellpose model can get 0.332 LB ",
    "1634074": "Congrats to your team!\n May I know more details in your single MaskRCNN Cascade ResneSt200 model when training (configuration, augmentation..)? Thanks",
    "1634051": "Congratulations to you and your team, two consecutive gold medals is an amazing achievement! Keep up the good work and you guys will be grandmaster in no time :)",
    "1634038": "Congratulations for your second gold! A very nice and detailed explanation.",
    "1633880": "Tons of work. Congrats！",
    "1633822": "Tons of work. Congrats to your team. :D",
    "1633896": "Congrats for two golds in a row Train4Ever!",
    "1633862": "The ensembling idea that you just showed with the diagram, is just awesome. I checked your notebook, its a little big, so I couldn't find the code where you actually did it.\nThanks",
    "1633781": "Congrats...",
    "1633776": "Excellent !!!\n> Hello Kagglers, I am Truong Bui Nhat from team Train4Ever. First, I would like to thank the host for providing such an interesting instance segmentation challenge, then all the other teams for making a nice race.\n> Shout out for @tungvs  @namgalielei @damtrongtuyen @duykhanh99.\n> \n> This our brief solution for Sartorius - Cell Instance Segmentation competition. \n> Our solution is a flow with 5 stages back to back:\n> 1. Train baseline models\n> 2. Add LiveCell Shsy5y data, clean data, retrain and finetune models and use NMS by mask\n> 3. Pseudo labeling with potential models\n> 4. Pseudo labeling round 2 and Ensemble\n> 5. Post processing model\n> \n> Stage 1, we tried a lot of models with original data:\n>         - MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain)\n> \t- PointRend \n> \t- GCNet\n> \t- CellPose\n> \t- MaskRCNN Swin\n> \t- MaskRCNN Cascade Swin\n> \t- SCNet\n> \t- Query Instance\n> \t- HTC\n> \t- CBNet V2\n> Note that we froze batch norm layers in backbone ResneSt200 and FPN because the training batch size was only 2. We thought it helped to keep the batch statistics unchanged, thus stabilizing the training.\n> After validating on local valid set + submit to Public leaderboard we selected the below candidates for stage 2:\n> \t- MaskRCNN Cascade ResneSt200 (with LIVE CELL pretrain): 0.329\n> \t- PointRend: 0.317\n> \t- MaskRCNN SWin: 0.292\n> \t- MaskRCNN Swin: 0.291\n> \t- GCNet: 0.304\n> \t- CellPose: 0.314\n> (All are reported on public leaderboard scores)\n> \n> Stage 2, we added clean data, retrained stage 1 candidates and finetuned:\n> \tAdd LiveCell Shsy5y data:\n> We used all the train, valid and test set of Shsy5y type from LiveCell data as additional training data for Shsy5y \n> \tOur cleaning method:\n> \t\t1. Remove LIVE CELL Shsy5y images with high FN with IOU 0.5 on training set (After training a model and perform error analysis)\n> \t\t2. Remove cort images with duplicate annotations \n> \t\t3. Sanity check and remove cort images that we feel missing annotations\n> \tMore fine tuning:\n> \t\t1. Image size increased from 800 (shortest edge) to 1024\n> \t\t2. Unfreeze all the backbone (default option of Detectron2 is freezing at the second block)\n> \tOur best model performance on Public leaderboard after stage 2:\n> \t\t- MaskRCNN ResNeSt200: 0.336\t\n> \n> Stage 3, we generated pseudo labels on the Semi Supervised dataset and re-trained on new data\n> First, both MaskRCNN ResNeSt200 and PointRend predicted the instances, then a simple ensembling technique was used to combine their predictions. The ensembling technique was to match IOU by mask to create different clusters, then within each cluster, used pixel voting to determine which pixel was kept, which was filtered.\n> Then MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin trained on this new pseudo data + original data + LiveCell Shys5y data.\n>  \n> At this stage MaskRCNN ResNeSt200 could achieve 0.338 on LB. \n> \n> Stage 4, we generated pseudo labels on the Semi Supervised dataset with MaskRCNN ResNeSt200, PointRend and MaskRCNN Swin coming from stage 3 and used the simple ensembling technique similar to stage 3 to combine the predictions.\n> The new pseudo prediction was added to original data + LiveCell Shsy5y data and we retrained MaskRCNN ResNeSt200 model.\n> \n> At this stage MaskRCNN ResNeSt200 could achieve 0.340 on LB. \n> \n> Then we developed a new ensemble technique to ensemble 2 MaskRCNN ResNeSt200 models trained on round 1 pseudo and round 2 pseudo data.\n> \n> The new ensembling method described with the image below:\n> \n> ![ensembling method](https://i.ibb.co/5ng4hkd/Ensemble-Flow.jpg)\n> \n> Those only boosted less than 0.1% (still 0.340), we still thought an ensembling submission would be better if a shake-up happens.\n> \n> Stage 5, we trained a machine learning model with a view to filtering FPs. \n> We extract some features from the prediction of stage 4 such as: basic features (instance confidence score, mask pixel scores, box area, mask area, location, size, mean/median pixel values on the original image), morphology features (rotation_angle, solidity, convex hull area, perimeter, …), neighboring features (overlap amount, overlap neighbor count, distance to top k neighbors, neighbor count within a circular area, …). The total number of features was 130.  \n> Model: CatBoost\n> Validation: We splitted the valid set (used for validating at the above 4 stages) into 2 half and used the first one to train CatBoost, the second one to validate and hyperparam tuning.\n> Hyperparam tuning method: Using hyperopt lib with objective function was the competition metrics on the second half of the valid set. \n> \n> This stage gave us a score of 0.341 on the leaderboard.\n> \n> Our final submission notebooks:\n> https://www.kaggle.com/namgalielei/maskrcnn-v21-v16-ensemble-stage2catboost/notebook\n> \n> \t\n> This is the end of our solution, stay safe and enjoy the New Year’s Eve everyone.\n\n",
    "1634980": "Congrats for the entire team for getting gold 🪙 ",
    "1633851": ""
  }
}