{
  "id": 238439,
  "title": "27th place solution (0.483LB)",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/238439",
  "author_name": "Mikhail Gurevich",
  "post_date": "2021-05-12T07:28:37.477000",
  "votes": 17,
  "comment_count": 8,
  "views": 0,
  "content": "<p>Hi all! It was a very long and intensive 3 months)<br>\nFirst of all, many thanks to the organizers for this very challenging and interesting competition!</p>\n<p>This was my first \"real\" competition at kaggle, so I'm glad to get a medal :-)</p>\n<p>My solution consists of several parts:</p>\n<p>1) <strong>Cell segmentation</strong>: I trained MaskRCNN on the HPASegmentator predictions. The only reason for this was the inference speed. MaskRCNN works really faster. A few experiments showed that solution score stayed the same when swapping HPASegmentator with MaskRCNN.</p>\n<p>2) <strong>Image Level classifiers</strong>:</p>\n<ul>\n<li>EfficientNetB3 (1024x1024)</li>\n<li>EfficientNetB3 (only green channel) (1024x1024) (thanks <a href=\"https://www.kaggle.com/h053473666\" target=\"_blank\">@h053473666</a> for this idea)</li>\n</ul>\n<p>3) <strong>Cell level classifiers</strong>:<br>\n    I used <a href=\"https://arxiv.org/abs/2101.11253\" target=\"_blank\">PuzzleCAM paper</a> approach for creating CAMs. And then I used them to create pseudo labels (at this point the labels were smooth - floats in [0.0, 1.0]) for each cell within images.<br>\n    Next step was to manually set up thresholds for each class and get final pseudo labels for further training model.</p>\n<ul>\n<li>EfficientNetB3 with dropout (256x256)</li>\n<li>EfficientNetB3 with dropout (only green channel) (256x256)</li>\n</ul>\n<p>4) <strong>Final submission</strong> I combined predictions from all 4 networks and get final predictions for each cell. The best result was with just an average of predictions from 4 models.</p>\n<p>5) <strong>Training details</strong><br>\nAll classifiers were trained with focal_loss + lovazh_loss (like in the winning solution of <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> in previous HPA competition).<br>\nOptimizer: Adam<br>\nScheduler: ReduceOnPlatoue<br>\nI also used oversampling for rare classes and undersampling for too common classes.</p>\n<p>Here is a summary:</p>\n<p><img src=\"https://i.ibb.co/VCns6cw/submission.png\" alt=\"Summary\"></p>\n<p>Thanks for reading and good luck in future competitions!)</p>",
  "messages": [
    {
      "id": 1303667,
      "postDate": "2021-05-12T07:28:37.477Z",
      "content": "<p>Hi all! It was a very long and intensive 3 months)<br>\nFirst of all, many thanks to the organizers for this very challenging and interesting competition!</p>\n<p>This was my first \"real\" competition at kaggle, so I'm glad to get a medal :-)</p>\n<p>My solution consists of several parts:</p>\n<p>1) <strong>Cell segmentation</strong>: I trained MaskRCNN on the HPASegmentator predictions. The only reason for this was the inference speed. MaskRCNN works really faster. A few experiments showed that solution score stayed the same when swapping HPASegmentator with MaskRCNN.</p>\n<p>2) <strong>Image Level classifiers</strong>:</p>\n<ul>\n<li>EfficientNetB3 (1024x1024)</li>\n<li>EfficientNetB3 (only green channel) (1024x1024) (thanks <a href=\"https://www.kaggle.com/h053473666\" target=\"_blank\">@h053473666</a> for this idea)</li>\n</ul>\n<p>3) <strong>Cell level classifiers</strong>:<br>\n    I used <a href=\"https://arxiv.org/abs/2101.11253\" target=\"_blank\">PuzzleCAM paper</a> approach for creating CAMs. And then I used them to create pseudo labels (at this point the labels were smooth - floats in [0.0, 1.0]) for each cell within images.<br>\n    Next step was to manually set up thresholds for each class and get final pseudo labels for further training model.</p>\n<ul>\n<li>EfficientNetB3 with dropout (256x256)</li>\n<li>EfficientNetB3 with dropout (only green channel) (256x256)</li>\n</ul>\n<p>4) <strong>Final submission</strong> I combined predictions from all 4 networks and get final predictions for each cell. The best result was with just an average of predictions from 4 models.</p>\n<p>5) <strong>Training details</strong><br>\nAll classifiers were trained with focal_loss + lovazh_loss (like in the winning solution of <a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> in previous HPA competition).<br>\nOptimizer: Adam<br>\nScheduler: ReduceOnPlatoue<br>\nI also used oversampling for rare classes and undersampling for too common classes.</p>\n<p>Here is a summary:</p>\n<p><img src=\"https://i.ibb.co/VCns6cw/submission.png\" alt=\"Summary\"></p>\n<p>Thanks for reading and good luck in future competitions!)</p>",
      "rawMarkdown": "Hi all! It was a very long and intensive 3 months)\nFirst of all, many thanks to the organizers for this very challenging and interesting competition!\n\nThis was my first \"real\" competition at kaggle, so I'm glad to get a medal :-)\n\nMy solution consists of several parts:\n\n1) **Cell segmentation**: I trained MaskRCNN on the HPASegmentator predictions. The only reason for this was the inference speed. MaskRCNN works really faster. A few experiments showed that solution score stayed the same when swapping HPASegmentator with MaskRCNN.\n\n2) **Image Level classifiers**:\n\n- EfficientNetB3 (1024x1024)\n- EfficientNetB3 (only green channel) (1024x1024) (thanks @h053473666 for this idea)\n\n3) **Cell level classifiers**:\n    I used [PuzzleCAM paper](https://arxiv.org/abs/2101.11253) approach for creating CAMs. And then I used them to create pseudo labels (at this point the labels were smooth - floats in [0.0, 1.0]) for each cell within images.\n    Next step was to manually set up thresholds for each class and get final pseudo labels for further training model.\n\n- EfficientNetB3 with dropout (256x256)\n- EfficientNetB3 with dropout (only green channel) (256x256)\n\n\n4) **Final submission** I combined predictions from all 4 networks and get final predictions for each cell. The best result was with just an average of predictions from 4 models.\n\n5) **Training details**\nAll classifiers were trained with focal_loss + lovazh_loss (like in the winning solution of @bestfitting in previous HPA competition).\nOptimizer: Adam\nScheduler: ReduceOnPlatoue\nI also used oversampling for rare classes and undersampling for too common classes.\n\nHere is a summary:\n\n![Summary](https://i.ibb.co/VCns6cw/submission.png)\n\nThanks for reading and good luck in future competitions!)\n",
      "votes": 17
    },
    {
      "id": 1305574,
      "postDate": "2021-05-13T11:23:14.813Z",
      "content": "<p>gratz with good performance outside MADE 💪 :D</p>",
      "rawMarkdown": "gratz with good performance outside MADE 💪 :D",
      "votes": 1,
      "replies": [
        {
          "id": 1305750,
          "postDate": "2021-05-13T13:09:12.580Z",
          "content": "<p>Thanks, as I see you also done great in Shopee competition) Congratulations with Expert tire)</p>",
          "rawMarkdown": "Thanks, as I see you also done great in Shopee competition) Congratulations with Expert tire)",
          "votes": 1
        },
        {
          "id": 1305773,
          "postDate": "2021-05-13T13:22:39.120Z",
          "content": "<p>Well expert was even before MADE but thx 😄</p>",
          "rawMarkdown": "Well expert was even before MADE but thx 😄"
        }
      ]
    },
    {
      "id": 1305031,
      "postDate": "2021-05-13T04:27:41.470Z",
      "content": "<p><a href=\"https://www.kaggle.com/mgurevich\" target=\"_blank\">@mgurevich</a> Congratulations  and Thanks for sharing the approach</p>",
      "rawMarkdown": "@mgurevich Congratulations  and Thanks for sharing the approach",
      "votes": 1
    },
    {
      "id": 1304399,
      "postDate": "2021-05-12T15:47:56.810Z",
      "content": "<p>Congratulations on Silver medal!</p>",
      "rawMarkdown": "Congratulations on Silver medal!",
      "votes": 1,
      "replies": [
        {
          "id": 1304733,
          "postDate": "2021-05-12T20:21:59.127Z",
          "content": "<p>Thanks and congratulations to you too!)</p>",
          "rawMarkdown": "Thanks and congratulations to you too!)"
        }
      ]
    },
    {
      "id": 1304143,
      "postDate": "2021-05-12T12:56:10.397Z",
      "content": "<p>Thanks for sharing, nice summary figure!</p>",
      "rawMarkdown": "Thanks for sharing, nice summary figure!",
      "votes": 1,
      "replies": [
        {
          "id": 1304732,
          "postDate": "2021-05-12T20:21:01.530Z",
          "content": "<p>Thank you! Congratulations on the gold medal!)</p>",
          "rawMarkdown": "Thank you! Congratulations on the gold medal!)"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1305574,
      "author_name": "empty",
      "author_url": "",
      "post_date": "2021-05-13T11:23:14.813000",
      "content": "<p>gratz with good performance outside MADE 💪 :D</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1305750,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-05-13T13:09:12.580000",
          "content": "<p>Thanks, as I see you also done great in Shopee competition) Congratulations with Expert tire)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1305773,
          "author_name": "empty",
          "author_url": "",
          "post_date": "2021-05-13T13:22:39.120000",
          "content": "<p>Well expert was even before MADE but thx 😄</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1305031,
      "author_name": "Tensor Girl",
      "author_url": "",
      "post_date": "2021-05-13T04:27:41.470000",
      "content": "<p><a href=\"https://www.kaggle.com/mgurevich\" target=\"_blank\">@mgurevich</a> Congratulations  and Thanks for sharing the approach</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304399,
      "author_name": "Alien",
      "author_url": "",
      "post_date": "2021-05-12T15:47:56.810000",
      "content": "<p>Congratulations on Silver medal!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1304733,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-05-12T20:21:59.127000",
          "content": "<p>Thanks and congratulations to you too!)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1304143,
      "author_name": "corochann",
      "author_url": "",
      "post_date": "2021-05-12T12:56:10.397000",
      "content": "<p>Thanks for sharing, nice summary figure!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1304732,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-05-12T20:21:01.530000",
          "content": "<p>Thank you! Congratulations on the gold medal!)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1303667": "Hi all! It was a very long and intensive 3 months)\nFirst of all, many thanks to the organizers for this very challenging and interesting competition!\n\nThis was my first \"real\" competition at kaggle, so I'm glad to get a medal :-)\n\nMy solution consists of several parts:\n\n1) **Cell segmentation**: I trained MaskRCNN on the HPASegmentator predictions. The only reason for this was the inference speed. MaskRCNN works really faster. A few experiments showed that solution score stayed the same when swapping HPASegmentator with MaskRCNN.\n\n2) **Image Level classifiers**:\n\n- EfficientNetB3 (1024x1024)\n- EfficientNetB3 (only green channel) (1024x1024) (thanks @h053473666 for this idea)\n\n3) **Cell level classifiers**:\n    I used [PuzzleCAM paper](https://arxiv.org/abs/2101.11253) approach for creating CAMs. And then I used them to create pseudo labels (at this point the labels were smooth - floats in [0.0, 1.0]) for each cell within images.\n    Next step was to manually set up thresholds for each class and get final pseudo labels for further training model.\n\n- EfficientNetB3 with dropout (256x256)\n- EfficientNetB3 with dropout (only green channel) (256x256)\n\n\n4) **Final submission** I combined predictions from all 4 networks and get final predictions for each cell. The best result was with just an average of predictions from 4 models.\n\n5) **Training details**\nAll classifiers were trained with focal_loss + lovazh_loss (like in the winning solution of @bestfitting in previous HPA competition).\nOptimizer: Adam\nScheduler: ReduceOnPlatoue\nI also used oversampling for rare classes and undersampling for too common classes.\n\nHere is a summary:\n\n![Summary](https://i.ibb.co/VCns6cw/submission.png)\n\nThanks for reading and good luck in future competitions!)\n",
    "1305574": "gratz with good performance outside MADE 💪 :D",
    "1305031": "@mgurevich Congratulations  and Thanks for sharing the approach",
    "1304399": "Congratulations on Silver medal!",
    "1304143": "Thanks for sharing, nice summary figure!"
  }
}