{
  "id": 172485,
  "title": "Some tricks worked (just a little) for my CenterNet",
  "url": "/competitions/global-wheat-detection/discussion/172485",
  "author_name": "",
  "post_date": "2020-08-05T08:21:11.794742800Z",
  "votes": 17,
  "comment_count": 4,
  "views": 0,
  "content": "<p>It seems like that I was the one of the few Kagglers who chose CenterNet as final model, so I think it's better to share some insights. My 0.6975/0.7590 submission is based on 3-fold CenterNets with TTAx6 (Original &amp; FlipLR &amp; FlipUD on 1.35x and 1.25x scale images) without pseudo label</p>\n\n<p><strong>Backbone</strong>\nEfficientNet-b5 (noisy-student pretrained) + 3 BiFPN + <a href=\"/pavel92\">@pavel92</a>'s FPN decoder <a href=\"https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/fpn/decoder.py\">here</a> to 1/4 feature map </p>\n\n<p>3xBiFPN (P2-P6) &gt; PAFPN (P2-P5) &gt; FPN (P2-P5). Maybe repeated PAFPN would give comparable results as repeated BiFPN, but I didn't try</p>\n\n<p>I tried deconv module from <a href=\"https://github.com/HRNet/HigherHRNet-Human-Pose-Estimation\">HigherHRNet</a> to upsample feature map to 1/2, but it didn't help.</p>\n\n<p><strong>Augmentation</strong>\n1. Mosaic first</p>\n\n<ol>\n<li><p>Random resize to [512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048], then crop to 512. This boosted my single fold ResNeSt50-FPN CenterNet from ~0.68 to ~0.715</p></li>\n<li><p>Then I applied affine transform, HSV, cutout, noise, etc...</p></li>\n</ol>\n\n<p><strong>Inference</strong>\nLarger resolution is better. Ensemble of (1.35x + 1.25x) &gt; (1.35x + 1.25x + 1.1x) &gt; (1.25x + 1.1x) &gt; (1.25x + 1x) &gt; (1.25x + 1x + 0.75x)</p>\n\n<p><strong>Pseudo Label</strong>\nI didn't make it work unfortunately. The best submission gave me 0.0002 boost on private but I didn't select it because it reduced my public score.</p>",
  "messages": [
    {
      "id": "958935",
      "postDate": "08/05/2020 08:21:11",
      "content": "<p>It seems like that I was the one of the few Kagglers who chose CenterNet as final model, so I think it's better to share some insights. My 0.6975/0.7590 submission is based on 3-fold CenterNets with TTAx6 (Original &amp; FlipLR &amp; FlipUD on 1.35x and 1.25x scale images) without pseudo label</p>\n\n<p><strong>Backbone</strong>\nEfficientNet-b5 (noisy-student pretrained) + 3 BiFPN + <a href=\"/pavel92\">@pavel92</a>'s FPN decoder <a href=\"https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/fpn/decoder.py\">here</a> to 1/4 feature map </p>\n\n<p>3xBiFPN (P2-P6) &gt; PAFPN (P2-P5) &gt; FPN (P2-P5). Maybe repeated PAFPN would give comparable results as repeated BiFPN, but I didn't try</p>\n\n<p>I tried deconv module from <a href=\"https://github.com/HRNet/HigherHRNet-Human-Pose-Estimation\">HigherHRNet</a> to upsample feature map to 1/2, but it didn't help.</p>\n\n<p><strong>Augmentation</strong>\n1. Mosaic first</p>\n\n<ol>\n<li><p>Random resize to [512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048], then crop to 512. This boosted my single fold ResNeSt50-FPN CenterNet from ~0.68 to ~0.715</p></li>\n<li><p>Then I applied affine transform, HSV, cutout, noise, etc...</p></li>\n</ol>\n\n<p><strong>Inference</strong>\nLarger resolution is better. Ensemble of (1.35x + 1.25x) &gt; (1.35x + 1.25x + 1.1x) &gt; (1.25x + 1.1x) &gt; (1.25x + 1x) &gt; (1.25x + 1x + 0.75x)</p>\n\n<p><strong>Pseudo Label</strong>\nI didn't make it work unfortunately. The best submission gave me 0.0002 boost on private but I didn't select it because it reduced my public score.</p>",
      "rawMarkdown": "It seems like that I was the one of the few Kagglers who chose CenterNet as final model, so I think it's better to share some insights. My 0.6975/0.7590 submission is based on 3-fold CenterNets with TTAx6 (Original &amp; FlipLR &amp; FlipUD on 1.35x and 1.25x scale images) without pseudo label\n\n**Backbone**\nEfficientNet-b5 (noisy-student pretrained) + 3 BiFPN + @pavel92's FPN decoder [here](https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/fpn/decoder.py) to 1/4 feature map \n\n3xBiFPN (P2-P6) &gt; PAFPN (P2-P5) &gt; FPN (P2-P5). Maybe repeated PAFPN would give comparable results as repeated BiFPN, but I didn't try\n\nI tried deconv module from [HigherHRNet](https://github.com/HRNet/HigherHRNet-Human-Pose-Estimation) to upsample feature map to 1/2, but it didn't help.\n\n\n**Augmentation**\n1. Mosaic first\n\n2. Random resize to [512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048], then crop to 512. This boosted my single fold ResNeSt50-FPN CenterNet from ~0.68 to ~0.715\n\n3. Then I applied affine transform, HSV, cutout, noise, etc...\n\n\n**Inference**\nLarger resolution is better. Ensemble of (1.35x + 1.25x) &gt; (1.35x + 1.25x + 1.1x) &gt; (1.25x + 1.1x) &gt; (1.25x + 1x) &gt; (1.25x + 1x + 0.75x)\n\n**Pseudo Label**\nI didn't make it work unfortunately. The best submission gave me 0.0002 boost on private but I didn't select it because it reduced my public score.",
      "votes": null
    },
    {
      "id": "959167",
      "postDate": "08/05/2020 11:53:15",
      "content": "<p>Thanks for sharing! <a href=\"/jihangz\">@jihangz</a> </p>",
      "rawMarkdown": "Thanks for sharing! @jihangz",
      "votes": null
    },
    {
      "id": "959949",
      "postDate": "08/06/2020 03:52:19",
      "content": "<p>can you share your code in github? thank you</p>",
      "rawMarkdown": "can you share your code in github? thank you",
      "votes": null
    },
    {
      "id": "960730",
      "postDate": "08/06/2020 16:29:23",
      "content": "<p>I mainly trained my models using Google Colab so probably it's not possible to share my code in github. I may upload it as a Kaggle notebook later :)</p>",
      "rawMarkdown": "I mainly trained my models using Google Colab so probably it's not possible to share my code in github. I may upload it as a Kaggle notebook later :)",
      "votes": null
    },
    {
      "id": "961006",
      "postDate": "08/06/2020 20:57:52",
      "content": "<p>Awesome work! I love to see CenterNet shine here, too. </p>",
      "rawMarkdown": "Awesome work! I love to see CenterNet shine here, too.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 959167,
      "author_name": "piantic",
      "author_url": "",
      "post_date": "08/05/2020 11:53:15",
      "content": "<p>Thanks for sharing! <a href=\"/jihangz\">@jihangz</a> </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 959949,
      "author_name": "yangpeng1995",
      "author_url": "",
      "post_date": "08/06/2020 03:52:19",
      "content": "<p>can you share your code in github? thank you</p>",
      "votes": null,
      "replies": [
        {
          "id": 960730,
          "author_name": "jihangz",
          "author_url": "",
          "post_date": "08/06/2020 16:29:23",
          "content": "<p>I mainly trained my models using Google Colab so probably it's not possible to share my code in github. I may upload it as a Kaggle notebook later :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 961006,
      "author_name": "ilu000",
      "author_url": "",
      "post_date": "08/06/2020 20:57:52",
      "content": "<p>Awesome work! I love to see CenterNet shine here, too. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "958935": "It seems like that I was the one of the few Kagglers who chose CenterNet as final model, so I think it's better to share some insights. My 0.6975/0.7590 submission is based on 3-fold CenterNets with TTAx6 (Original &amp; FlipLR &amp; FlipUD on 1.35x and 1.25x scale images) without pseudo label\n\n**Backbone**\nEfficientNet-b5 (noisy-student pretrained) + 3 BiFPN + @pavel92's FPN decoder [here](https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/fpn/decoder.py) to 1/4 feature map \n\n3xBiFPN (P2-P6) &gt; PAFPN (P2-P5) &gt; FPN (P2-P5). Maybe repeated PAFPN would give comparable results as repeated BiFPN, but I didn't try\n\nI tried deconv module from [HigherHRNet](https://github.com/HRNet/HigherHRNet-Human-Pose-Estimation) to upsample feature map to 1/2, but it didn't help.\n\n\n**Augmentation**\n1. Mosaic first\n\n2. Random resize to [512, 640, 768, 896, 1024, 1280, 1536, 1792, 2048], then crop to 512. This boosted my single fold ResNeSt50-FPN CenterNet from ~0.68 to ~0.715\n\n3. Then I applied affine transform, HSV, cutout, noise, etc...\n\n\n**Inference**\nLarger resolution is better. Ensemble of (1.35x + 1.25x) &gt; (1.35x + 1.25x + 1.1x) &gt; (1.25x + 1.1x) &gt; (1.25x + 1x) &gt; (1.25x + 1x + 0.75x)\n\n**Pseudo Label**\nI didn't make it work unfortunately. The best submission gave me 0.0002 boost on private but I didn't select it because it reduced my public score.",
    "959167": "Thanks for sharing! @jihangz",
    "959949": "can you share your code in github? thank you",
    "960730": "I mainly trained my models using Google Colab so probably it's not possible to share my code in github. I may upload it as a Kaggle notebook later :)",
    "961006": "Awesome work! I love to see CenterNet shine here, too."
  },
  "source": "meta"
}