{
  "id": 238527,
  "title": "simple idea of 5th, tito's part",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/238527",
  "author_name": "tito",
  "post_date": "2021-05-12T13:12:26.578000",
  "votes": 49,
  "comment_count": 14,
  "views": 0,
  "content": "<p>First of all I would like to thank my teammates <a href=\"https://www.kaggle.com/narsil\" target=\"_blank\">@narsil</a> and <a href=\"https://www.kaggle.com/tivfrvqhs5\" target=\"_blank\">@tivfrvqhs5</a>. I have had a very exciting 3 weeks teaming up with you guys.</p>\n<p>I would like to share my model idea briefly here.</p>\n<h2>Classifier</h2>\n<p>I created a classification model that predicts labels for each image (not for each cell).</p>\n<p>For inference, I extracted the cells one by one and made their augmented images:<br>\n<img src=\"https://pbs.twimg.com/media/E1LWd4_VoAEzCUB?format=png&amp;name=900x900\" alt=\"inference image\"></p>\n<p>This allowed me to solve this weakly supervised task as a normal classification task which is same as HPA2018 competition.<br>\nThis makes things very simple and allows me to reuse the HPA2018 solution.</p>\n<h2>Segmenter</h2>\n<p>The official segmenter is inaccurate for cells near the boundary (cells with no visible nucleus tend to be connected to other cells).<br>\nTo avoid this effect, I created a mmdetection model using cropped segmentation image.<br>\n<img src=\"https://pbs.twimg.com/media/E1Q3UZHUcAcSgPv?format=jpg&amp;name=small\" alt=\"segmentation for training image\"><br>\nEven using official segmenter as traing label, score of this mmdetection mode is improved.<br>\nIn addition, this improved the inference speed and more ensembles enabled.</p>",
  "messages": [
    {
      "id": 1304162,
      "postDate": "2021-05-12T13:12:26.577Z",
      "content": "<p>First of all I would like to thank my teammates <a href=\"https://www.kaggle.com/narsil\" target=\"_blank\">@narsil</a> and <a href=\"https://www.kaggle.com/tivfrvqhs5\" target=\"_blank\">@tivfrvqhs5</a>. I have had a very exciting 3 weeks teaming up with you guys.</p>\n<p>I would like to share my model idea briefly here.</p>\n<h2>Classifier</h2>\n<p>I created a classification model that predicts labels for each image (not for each cell).</p>\n<p>For inference, I extracted the cells one by one and made their augmented images:<br>\n<img src=\"https://pbs.twimg.com/media/E1LWd4_VoAEzCUB?format=png&amp;name=900x900\" alt=\"inference image\"></p>\n<p>This allowed me to solve this weakly supervised task as a normal classification task which is same as HPA2018 competition.<br>\nThis makes things very simple and allows me to reuse the HPA2018 solution.</p>\n<h2>Segmenter</h2>\n<p>The official segmenter is inaccurate for cells near the boundary (cells with no visible nucleus tend to be connected to other cells).<br>\nTo avoid this effect, I created a mmdetection model using cropped segmentation image.<br>\n<img src=\"https://pbs.twimg.com/media/E1Q3UZHUcAcSgPv?format=jpg&amp;name=small\" alt=\"segmentation for training image\"><br>\nEven using official segmenter as traing label, score of this mmdetection mode is improved.<br>\nIn addition, this improved the inference speed and more ensembles enabled.</p>",
      "rawMarkdown": "First of all I would like to thank my teammates @narsil and @tivfrvqhs5. I have had a very exciting 3 weeks teaming up with you guys.\n\nI would like to share my model idea briefly here.\n\n## Classifier\nI created a classification model that predicts labels for each image (not for each cell).\n\nFor inference, I extracted the cells one by one and made their augmented images:\n![inference image](https://pbs.twimg.com/media/E1LWd4_VoAEzCUB?format=png&name=900x900)\n\nThis allowed me to solve this weakly supervised task as a normal classification task which is same as HPA2018 competition.\nThis makes things very simple and allows me to reuse the HPA2018 solution.\n\n\n## Segmenter\nThe official segmenter is inaccurate for cells near the boundary (cells with no visible nucleus tend to be connected to other cells).\nTo avoid this effect, I created a mmdetection model using cropped segmentation image.\n![segmentation for training image](https://pbs.twimg.com/media/E1Q3UZHUcAcSgPv?format=jpg&name=small)\nEven using official segmenter as traing label, score of this mmdetection mode is improved.\nIn addition, this improved the inference speed and more ensembles enabled.\n",
      "votes": 48
    },
    {
      "id": 1305745,
      "postDate": "2021-05-13T12:59:03.517Z",
      "content": "<p>Quite clever and simple! It will be interesting to test your augmented images in other solutions to get the best of all.</p>",
      "rawMarkdown": "Quite clever and simple! It will be interesting to test your augmented images in other solutions to get the best of all.",
      "votes": 1
    },
    {
      "id": 1305025,
      "postDate": "2021-05-13T04:26:03Z",
      "content": "<p><a href=\"https://www.kaggle.com/its7171\" target=\"_blank\">@its7171</a> Congratulations  and Thanks for sharing the approach</p>",
      "rawMarkdown": "@its7171 Congratulations  and Thanks for sharing the approach",
      "votes": 1
    },
    {
      "id": 1304798,
      "postDate": "2021-05-12T22:14:56.010Z",
      "content": "<p>Congrats! Interesting approach!</p>",
      "rawMarkdown": "Congrats! Interesting approach!",
      "votes": 1
    },
    {
      "id": 1304629,
      "postDate": "2021-05-12T18:41:17.730Z",
      "content": "<p>Congrats on the amazing performance and thanks for sharing, <a href=\"https://www.kaggle.com/its7171\" target=\"_blank\">@its7171</a> ! Elegant!<br>\nReminded me of a quote by Leonardo da Vinci: \"Simplicity is the ultimate sophistication\"</p>",
      "rawMarkdown": "Congrats on the amazing performance and thanks for sharing, @its7171 ! Elegant!\nReminded me of a quote by Leonardo da Vinci: \"Simplicity is the ultimate sophistication\"",
      "votes": 1
    },
    {
      "id": 1304554,
      "postDate": "2021-05-12T17:35:24.493Z",
      "content": "<p>Nice! When we tried tiling a plot with a cropped cell and classifying such an image, we did not really see an improve in score. Should have done the resizing and rotations, apparently :-)</p>",
      "rawMarkdown": "Nice! When we tried tiling a plot with a cropped cell and classifying such an image, we did not really see an improve in score. Should have done the resizing and rotations, apparently :-)",
      "votes": 1
    },
    {
      "id": 1304450,
      "postDate": "2021-05-12T16:18:06.960Z",
      "content": "<p>Excellent solution!  How long does it take to infer the private test dataset?</p>",
      "rawMarkdown": "Excellent solution!  How long does it take to infer the private test dataset?",
      "votes": 1,
      "replies": [
        {
          "id": 1304918,
          "postDate": "2021-05-13T01:51:29.173Z",
          "content": "<p>It took about 3-4 hours for 10 models.</p>",
          "rawMarkdown": "It took about 3-4 hours for 10 models.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1304254,
      "postDate": "2021-05-12T14:09:36.387Z",
      "content": "<p>It was great working together! </p>",
      "rawMarkdown": "It was great working together! ",
      "votes": 1
    },
    {
      "id": 1304243,
      "postDate": "2021-05-12T14:04:28.587Z",
      "content": "<p>Congratulations!!! This is amazing - we did the same thing, but didn't think about resizing, after looking at your example it seems obvious!</p>",
      "rawMarkdown": "Congratulations!!! This is amazing - we did the same thing, but didn't think about resizing, after looking at your example it seems obvious!",
      "votes": 1
    },
    {
      "id": 1304168,
      "postDate": "2021-05-12T13:17:38.520Z",
      "content": "<p>Thanks for sharing.  simple but powerful approach.</p>",
      "rawMarkdown": "Thanks for sharing.  simple but powerful approach.",
      "votes": 1
    },
    {
      "id": 1304449,
      "postDate": "2021-05-12T16:16:52.870Z",
      "content": "<p>Very creative approach! Cool!<br>\nBut how did you deal with the long inference time, if you made each cell a whole image?</p>",
      "rawMarkdown": "Very creative approach! Cool!\nBut how did you deal with the long inference time, if you made each cell a whole image?",
      "votes": 2,
      "replies": [
        {
          "id": 1304573,
          "postDate": "2021-05-12T17:48:40.613Z",
          "content": "<p>Actually, as one of our approaches we also classified every single cell (with other cells masked) on a 512x512 image and I think it took around 3-4 h to run the full prediction with 10 models (EfficientNet-b5 and v2s, eca-nfnet-l0 and l1). So, apparently the number of cells in the test set was small enough to fit in the 9 h.</p>",
          "rawMarkdown": "Actually, as one of our approaches we also classified every single cell (with other cells masked) on a 512x512 image and I think it took around 3-4 h to run the full prediction with 10 models (EfficientNet-b5 and v2s, eca-nfnet-l0 and l1). So, apparently the number of cells in the test set was small enough to fit in the 9 h.",
          "votes": 2
        },
        {
          "id": 1304919,
          "postDate": "2021-05-13T01:51:51.447Z",
          "content": "<p>Almost same inference time as Ilya's team.</p>\n<pre><code>inference time: 3-4 hours for 10 models\nmodels: efficientnet-b0, inceptionv3, densenet121\nresolushon: 512, 960, 1280\n</code></pre>",
          "rawMarkdown": "Almost same inference time as Ilya's team.\n\n```\ninference time: 3-4 hours for 10 models\nmodels: efficientnet-b0, inceptionv3, densenet121\nresolushon: 512, 960, 1280\n```",
          "votes": 2
        }
      ]
    },
    {
      "id": 1340617,
      "postDate": "2021-06-08T06:23:55.523Z",
      "content": "<p>Congratulations ! Would you be able to possibly share your code ? Will be nice to learn from. Thanks. </p>",
      "rawMarkdown": "Congratulations ! Would you be able to possibly share your code ? Will be nice to learn from. Thanks. "
    }
  ],
  "comments": [
    {
      "id": 1305745,
      "author_name": "MPWARE",
      "author_url": "",
      "post_date": "2021-05-13T12:59:03.517000",
      "content": "<p>Quite clever and simple! It will be interesting to test your augmented images in other solutions to get the best of all.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1305025,
      "author_name": "Tensor Girl",
      "author_url": "",
      "post_date": "2021-05-13T04:26:03",
      "content": "<p><a href=\"https://www.kaggle.com/its7171\" target=\"_blank\">@its7171</a> Congratulations  and Thanks for sharing the approach</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304798,
      "author_name": "corochann",
      "author_url": "",
      "post_date": "2021-05-12T22:14:56.010000",
      "content": "<p>Congrats! Interesting approach!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304629,
      "author_name": "Raman",
      "author_url": "",
      "post_date": "2021-05-12T18:41:17.730000",
      "content": "<p>Congrats on the amazing performance and thanks for sharing, <a href=\"https://www.kaggle.com/its7171\" target=\"_blank\">@its7171</a> ! Elegant!<br>\nReminded me of a quote by Leonardo da Vinci: \"Simplicity is the ultimate sophistication\"</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304554,
      "author_name": "Ilya Makarov",
      "author_url": "",
      "post_date": "2021-05-12T17:35:24.493000",
      "content": "<p>Nice! When we tried tiling a plot with a cropped cell and classifying such an image, we did not really see an improve in score. Should have done the resizing and rotations, apparently :-)</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304450,
      "author_name": "Taku Hiraiwa",
      "author_url": "",
      "post_date": "2021-05-12T16:18:06.960000",
      "content": "<p>Excellent solution!  How long does it take to infer the private test dataset?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1304918,
          "author_name": "tito",
          "author_url": "",
          "post_date": "2021-05-13T01:51:29.173000",
          "content": "<p>It took about 3-4 hours for 10 models.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1304254,
      "author_name": "narsil (jobs-in-data.com)",
      "author_url": "",
      "post_date": "2021-05-12T14:09:36.387000",
      "content": "<p>It was great working together! </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304243,
      "author_name": "Darek Kłeczek",
      "author_url": "",
      "post_date": "2021-05-12T14:04:28.587000",
      "content": "<p>Congratulations!!! This is amazing - we did the same thing, but didn't think about resizing, after looking at your example it seems obvious!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304168,
      "author_name": "yuvaramsingh",
      "author_url": "",
      "post_date": "2021-05-12T13:17:38.520000",
      "content": "<p>Thanks for sharing.  simple but powerful approach.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1304449,
      "author_name": "Guanshuo Xu",
      "author_url": "",
      "post_date": "2021-05-12T16:16:52.870000",
      "content": "<p>Very creative approach! Cool!<br>\nBut how did you deal with the long inference time, if you made each cell a whole image?</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1304573,
          "author_name": "Ilya Makarov",
          "author_url": "",
          "post_date": "2021-05-12T17:48:40.613000",
          "content": "<p>Actually, as one of our approaches we also classified every single cell (with other cells masked) on a 512x512 image and I think it took around 3-4 h to run the full prediction with 10 models (EfficientNet-b5 and v2s, eca-nfnet-l0 and l1). So, apparently the number of cells in the test set was small enough to fit in the 9 h.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1304919,
          "author_name": "tito",
          "author_url": "",
          "post_date": "2021-05-13T01:51:51.447000",
          "content": "<p>Almost same inference time as Ilya's team.</p>\n<pre><code>inference time: 3-4 hours for 10 models\nmodels: efficientnet-b0, inceptionv3, densenet121\nresolushon: 512, 960, 1280\n</code></pre>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1340617,
      "author_name": "Krishna ",
      "author_url": "",
      "post_date": "2021-06-08T06:23:55.523000",
      "content": "<p>Congratulations ! Would you be able to possibly share your code ? Will be nice to learn from. Thanks. </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1304162": "First of all I would like to thank my teammates @narsil and @tivfrvqhs5. I have had a very exciting 3 weeks teaming up with you guys.\n\nI would like to share my model idea briefly here.\n\n## Classifier\nI created a classification model that predicts labels for each image (not for each cell).\n\nFor inference, I extracted the cells one by one and made their augmented images:\n![inference image](https://pbs.twimg.com/media/E1LWd4_VoAEzCUB?format=png&name=900x900)\n\nThis allowed me to solve this weakly supervised task as a normal classification task which is same as HPA2018 competition.\nThis makes things very simple and allows me to reuse the HPA2018 solution.\n\n\n## Segmenter\nThe official segmenter is inaccurate for cells near the boundary (cells with no visible nucleus tend to be connected to other cells).\nTo avoid this effect, I created a mmdetection model using cropped segmentation image.\n![segmentation for training image](https://pbs.twimg.com/media/E1Q3UZHUcAcSgPv?format=jpg&name=small)\nEven using official segmenter as traing label, score of this mmdetection mode is improved.\nIn addition, this improved the inference speed and more ensembles enabled.\n",
    "1305745": "Quite clever and simple! It will be interesting to test your augmented images in other solutions to get the best of all.",
    "1305025": "@its7171 Congratulations  and Thanks for sharing the approach",
    "1304798": "Congrats! Interesting approach!",
    "1304629": "Congrats on the amazing performance and thanks for sharing, @its7171 ! Elegant!\nReminded me of a quote by Leonardo da Vinci: \"Simplicity is the ultimate sophistication\"",
    "1304554": "Nice! When we tried tiling a plot with a cropped cell and classifying such an image, we did not really see an improve in score. Should have done the resizing and rotations, apparently :-)",
    "1304450": "Excellent solution!  How long does it take to infer the private test dataset?",
    "1304254": "It was great working together! ",
    "1304243": "Congratulations!!! This is amazing - we did the same thing, but didn't think about resizing, after looking at your example it seems obvious!",
    "1304168": "Thanks for sharing.  simple but powerful approach.",
    "1304449": "Very creative approach! Cool!\nBut how did you deal with the long inference time, if you made each cell a whole image?",
    "1340617": "Congratulations ! Would you be able to possibly share your code ? Will be nice to learn from. Thanks. "
  }
}