{
  "id": 217395,
  "title": "[macro f1 publicLB0.43, mAP publicLB0.34] weakly supervised segmentation",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/217395",
  "author_name": "phalanx",
  "post_date": "2021-02-06T15:37:17.920000",
  "votes": 99,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I share my baseline solution.<br>\nI think 2-stage instance segmentation, such as mask-rcnn, make this task diificult, so I try weakly supervised semantic segmentation + hpasegmentor solution.</p>\n<ul>\n<li>model<ul>\n<li>puzzle-cam(backbone: efficientnet-b3)<ul>\n<li><a href=\"https://arxiv.org/abs/2101.11253\" target=\"_blank\">Puzzle-CAM: Improved localization via matching partial and full features</a></li></ul></li>\n<li>hpasegmentor</li></ul></li>\n</ul>\n<p>training: </p>\n<ul>\n<li>data split: multi label stratified, single fold</li>\n<li>loss<ul>\n<li>reconstruction loss: l1 loss</li>\n<li>classification loss: lovasz hinge, binary cross entropy loss</li></ul></li>\n<li>optimier: adam(5e-4)</li>\n<li>scheduler: reducelronplateau</li>\n<li>augmentaion: <ul>\n<li>horizontal/vertical flip, random crop(384x384)</li></ul></li>\n<li>epoch: 30<br>\n<img src=\"https://i.ibb.co/sCR59K7/Untitled-Diagram-10.jpg\"></li>\n</ul>\n<p>inference: </p>\n<p>I use only resized image, not tiled image. After inputting the image into the puzzle_cam model and obtaining the activation map, I calculate the element product of activation map with the nuclei prediction of hpasegmentor. With this process, we can localize nuclei belonging to the target class.<br>\nAfter that, we can get the instance segmentation result of the target class by finding cell corresponding to nuclei.<br>\n<img src=\"https://i.ibb.co/NsTvZPb/Untitled-Diagram-Page-2-1.jpg\"></p>\n<p>single fold result</p>\n<ul>\n<li>marcro f1 public LB: 0.43</li>\n<li>mAP public LB: 0.34 (optimize threshold)</li>\n</ul>\n<p>I disagree with metric change, so I leave competition and wait for CVPR 2021 competition.<br>\nGood lack all!</p>",
  "messages": [
    {
      "id": 1188938,
      "postDate": "2021-02-06T15:37:17.920Z",
      "content": "<p>I share my baseline solution.<br>\nI think 2-stage instance segmentation, such as mask-rcnn, make this task diificult, so I try weakly supervised semantic segmentation + hpasegmentor solution.</p>\n<ul>\n<li>model<ul>\n<li>puzzle-cam(backbone: efficientnet-b3)<ul>\n<li><a href=\"https://arxiv.org/abs/2101.11253\" target=\"_blank\">Puzzle-CAM: Improved localization via matching partial and full features</a></li></ul></li>\n<li>hpasegmentor</li></ul></li>\n</ul>\n<p>training: </p>\n<ul>\n<li>data split: multi label stratified, single fold</li>\n<li>loss<ul>\n<li>reconstruction loss: l1 loss</li>\n<li>classification loss: lovasz hinge, binary cross entropy loss</li></ul></li>\n<li>optimier: adam(5e-4)</li>\n<li>scheduler: reducelronplateau</li>\n<li>augmentaion: <ul>\n<li>horizontal/vertical flip, random crop(384x384)</li></ul></li>\n<li>epoch: 30<br>\n<img src=\"https://i.ibb.co/sCR59K7/Untitled-Diagram-10.jpg\"></li>\n</ul>\n<p>inference: </p>\n<p>I use only resized image, not tiled image. After inputting the image into the puzzle_cam model and obtaining the activation map, I calculate the element product of activation map with the nuclei prediction of hpasegmentor. With this process, we can localize nuclei belonging to the target class.<br>\nAfter that, we can get the instance segmentation result of the target class by finding cell corresponding to nuclei.<br>\n<img src=\"https://i.ibb.co/NsTvZPb/Untitled-Diagram-Page-2-1.jpg\"></p>\n<p>single fold result</p>\n<ul>\n<li>marcro f1 public LB: 0.43</li>\n<li>mAP public LB: 0.34 (optimize threshold)</li>\n</ul>\n<p>I disagree with metric change, so I leave competition and wait for CVPR 2021 competition.<br>\nGood lack all!</p>",
      "rawMarkdown": "I share my baseline solution.\nI think 2-stage instance segmentation, such as mask-rcnn, make this task diificult, so I try weakly supervised semantic segmentation + hpasegmentor solution.\n \n- model\n  - puzzle-cam(backbone: efficientnet-b3)\n     - [Puzzle-CAM: Improved localization via matching partial and full features](https://arxiv.org/abs/2101.11253)\n  - hpasegmentor\n\ntraining: \n- data split: multi label stratified, single fold\n- loss\n  - reconstruction loss: l1 loss\n  - classification loss: lovasz hinge, binary cross entropy loss\n- optimier: adam(5e-4)\n- scheduler: reducelronplateau\n- augmentaion: \n  - horizontal/vertical flip, random crop(384x384)\n- epoch: 30\n<img src=https://i.ibb.co/sCR59K7/Untitled-Diagram-10.jpg>\n\ninference: \n\nI use only resized image, not tiled image. After inputting the image into the puzzle_cam model and obtaining the activation map, I calculate the element product of activation map with the nuclei prediction of hpasegmentor. With this process, we can localize nuclei belonging to the target class.\nAfter that, we can get the instance segmentation result of the target class by finding cell corresponding to nuclei.\n<img src=https://i.ibb.co/NsTvZPb/Untitled-Diagram-Page-2-1.jpg>\n\nsingle fold result\n- marcro f1 public LB: 0.43\n- mAP public LB: 0.34 (optimize threshold)\n\nI disagree with metric change, so I leave competition and wait for CVPR 2021 competition.\nGood lack all!",
      "votes": 98
    },
    {
      "id": 1196986,
      "postDate": "2021-02-11T20:33:58.677Z",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>,<br>\nWe're sorry to see that you're leaving this competition. As Phil already replied, due to confusion around the metric we decided to change to mAP to make it easier to participate. Thanks for your contribution and for sharing the work you you've done! You're very welcome back should you change your mind :)<br>\nAll the best,<br>\nEmma and the HPA team</p>",
      "rawMarkdown": "Dear @phalanx,\nWe're sorry to see that you're leaving this competition. As Phil already replied, due to confusion around the metric we decided to change to mAP to make it easier to participate. Thanks for your contribution and for sharing the work you you've done! You're very welcome back should you change your mind :)\nAll the best,\nEmma and the HPA team",
      "votes": 6
    },
    {
      "id": 1195500,
      "postDate": "2021-02-10T21:09:02.267Z",
      "content": "<p>Nice Work <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a> </p>",
      "rawMarkdown": "Nice Work @phalanx ",
      "votes": 1
    },
    {
      "id": 1192112,
      "postDate": "2021-02-09T00:25:34.853Z",
      "content": "<p>fyi, some of the  CVPR 2021 competition already out.</p>",
      "rawMarkdown": "fyi, some of the  CVPR 2021 competition already out.",
      "votes": 2
    },
    {
      "id": 1194180,
      "postDate": "2021-02-10T04:44:42.340Z",
      "content": "<p>Thank you Phalanx! I have learned lots from your methods and overviews in discussions. Sad to see you leaving this competition, stay safe in this difficult time. Also, for your loss function, why not use bi-tempered loss? Have you tried it? If so, what was CV? If not, why so? I believe it is more robust than binary crossentropy. Would that benefit? Thanks!</p>",
      "rawMarkdown": "Thank you Phalanx! I have learned lots from your methods and overviews in discussions. Sad to see you leaving this competition, stay safe in this difficult time. Also, for your loss function, why not use bi-tempered loss? Have you tried it? If so, what was CV? If not, why so? I believe it is more robust than binary crossentropy. Would that benefit? Thanks!"
    },
    {
      "id": 1188947,
      "postDate": "2021-02-06T15:42:08.953Z",
      "content": "<p>Great work <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>!! </p>",
      "rawMarkdown": "Great work @phalanx!! "
    },
    {
      "id": 1189084,
      "postDate": "2021-02-06T17:45:42.403Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    },
    {
      "id": 1198662,
      "postDate": "2021-02-13T07:45:10.367Z",
      "content": "<p>Great work!<br>\nThanks for sharing!</p>",
      "rawMarkdown": "Great work!\nThanks for sharing!",
      "votes": -1
    }
  ],
  "comments": [
    {
      "id": 1196986,
      "author_name": "Emma Lundberg",
      "author_url": "",
      "post_date": "2021-02-11T20:33:58.677000",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>,<br>\nWe're sorry to see that you're leaving this competition. As Phil already replied, due to confusion around the metric we decided to change to mAP to make it easier to participate. Thanks for your contribution and for sharing the work you you've done! You're very welcome back should you change your mind :)<br>\nAll the best,<br>\nEmma and the HPA team</p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 1195500,
      "author_name": "Sanskar Hasija",
      "author_url": "",
      "post_date": "2021-02-10T21:09:02.267000",
      "content": "<p>Nice Work <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a> </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1192112,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2021-02-09T00:25:34.853000",
      "content": "<p>fyi, some of the  CVPR 2021 competition already out.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1194180,
      "author_name": "Andy Jian Zhou",
      "author_url": "",
      "post_date": "2021-02-10T04:44:42.340000",
      "content": "<p>Thank you Phalanx! I have learned lots from your methods and overviews in discussions. Sad to see you leaving this competition, stay safe in this difficult time. Also, for your loss function, why not use bi-tempered loss? Have you tried it? If so, what was CV? If not, why so? I believe it is more robust than binary crossentropy. Would that benefit? Thanks!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1188947,
      "author_name": "cayala",
      "author_url": "",
      "post_date": "2021-02-06T15:42:08.953000",
      "content": "<p>Great work <a href=\"https://www.kaggle.com/phalanx\" target=\"_blank\">@phalanx</a>!! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1189084,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-02-06T17:45:42.403000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1198662,
      "author_name": "Zahid Ali",
      "author_url": "",
      "post_date": "2021-02-13T07:45:10.367000",
      "content": "<p>Great work!<br>\nThanks for sharing!</p>",
      "votes": -1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1188938": "I share my baseline solution.\nI think 2-stage instance segmentation, such as mask-rcnn, make this task diificult, so I try weakly supervised semantic segmentation + hpasegmentor solution.\n \n- model\n  - puzzle-cam(backbone: efficientnet-b3)\n     - [Puzzle-CAM: Improved localization via matching partial and full features](https://arxiv.org/abs/2101.11253)\n  - hpasegmentor\n\ntraining: \n- data split: multi label stratified, single fold\n- loss\n  - reconstruction loss: l1 loss\n  - classification loss: lovasz hinge, binary cross entropy loss\n- optimier: adam(5e-4)\n- scheduler: reducelronplateau\n- augmentaion: \n  - horizontal/vertical flip, random crop(384x384)\n- epoch: 30\n<img src=https://i.ibb.co/sCR59K7/Untitled-Diagram-10.jpg>\n\ninference: \n\nI use only resized image, not tiled image. After inputting the image into the puzzle_cam model and obtaining the activation map, I calculate the element product of activation map with the nuclei prediction of hpasegmentor. With this process, we can localize nuclei belonging to the target class.\nAfter that, we can get the instance segmentation result of the target class by finding cell corresponding to nuclei.\n<img src=https://i.ibb.co/NsTvZPb/Untitled-Diagram-Page-2-1.jpg>\n\nsingle fold result\n- marcro f1 public LB: 0.43\n- mAP public LB: 0.34 (optimize threshold)\n\nI disagree with metric change, so I leave competition and wait for CVPR 2021 competition.\nGood lack all!",
    "1196986": "Dear @phalanx,\nWe're sorry to see that you're leaving this competition. As Phil already replied, due to confusion around the metric we decided to change to mAP to make it easier to participate. Thanks for your contribution and for sharing the work you you've done! You're very welcome back should you change your mind :)\nAll the best,\nEmma and the HPA team",
    "1195500": "Nice Work @phalanx ",
    "1192112": "fyi, some of the  CVPR 2021 competition already out.",
    "1194180": "Thank you Phalanx! I have learned lots from your methods and overviews in discussions. Sad to see you leaving this competition, stay safe in this difficult time. Also, for your loss function, why not use bi-tempered loss? Have you tried it? If so, what was CV? If not, why so? I believe it is more robust than binary crossentropy. Would that benefit? Thanks!",
    "1188947": "Great work @phalanx!! ",
    "1189084": "",
    "1198662": "Great work!\nThanks for sharing!"
  }
}