{
  "id": 172546,
  "title": "185th place solution",
  "url": "/competitions/global-wheat-detection/writeups/zunaed-rafi-185th-place-solution",
  "author_name": "",
  "post_date": "2020-08-19T21:38:52.550Z",
  "votes": 22,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Thanks to the organizers and kaggle team for hosting this competition! Also great thanks to <a href=\"https://www.kaggle.com/rwightman\" target=\"_blank\">@rwightman</a> for his efficientdet-pytorch repo, <a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> for his weighted-box-fusion repo, to <a href=\"https://www.kaggle.com/shonenkov\" target=\"_blank\">@shonenkov</a> for his amazing public notebook based on which I started this competition and to everyone who has been active in the discussion forum during the competition. Finally congratulations to all the fair prize winners and to the fair medal winners.</p>\n<p><strong>Summary:</strong></p>\n<ul>\n<li>5 fold d2 trained on 1024x1024 + 5 fold d4 trained on 512x512</li>\n<li>Heavy augmentations (Added more augmentations along with the alex's public kernel augmentations for example: Noise augment, Scale and crop, this gave me 0.01x-0.2x boost)</li>\n<li>Used weighted-boxes-fusion for ensemble</li>\n<li>5xTTA</li>\n<li>Pseudo labeling(1 epoch, 1 round, training data + 2x pseudo test data)</li>\n</ul>\n<p>All models ensemble with 5xTTA and wbf achieve 0.7563 public LB/ 0.6956 private LB. Adding pseudo labeling improves the score to 0.7595 public Lb/ 0.7050 private LB.  </p>\n<p><strong>Did not work for me:</strong></p>\n<ul>\n<li>Cleaning the bounding boxes</li>\n<li>Gradient accumulation</li>\n<li>Cutmix and Mixup scores were not as good as the models without them</li>\n<li>WBF threshold Tweaking </li>\n<li>Tweaking efficientdet loss function hyper-parameters </li>\n</ul>",
  "messages": [
    {
      "id": "959305",
      "postDate": "08/05/2020 13:40:16",
      "content": "<p>Thanks to the organizers and kaggle team for hosting this competition! Also great thanks to <a href=\"https://www.kaggle.com/rwightman\" target=\"_blank\">@rwightman</a> for his efficientdet-pytorch repo, <a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> for his weighted-box-fusion repo, to <a href=\"https://www.kaggle.com/shonenkov\" target=\"_blank\">@shonenkov</a> for his amazing public notebook based on which I started this competition and to everyone who has been active in the discussion forum during the competition. Finally congratulations to all the fair prize winners and to the fair medal winners.</p>\n<p><strong>Summary:</strong></p>\n<ul>\n<li>5 fold d2 trained on 1024x1024 + 5 fold d4 trained on 512x512</li>\n<li>Heavy augmentations (Added more augmentations along with the alex's public kernel augmentations for example: Noise augment, Scale and crop, this gave me 0.01x-0.2x boost)</li>\n<li>Used weighted-boxes-fusion for ensemble</li>\n<li>5xTTA</li>\n<li>Pseudo labeling(1 epoch, 1 round, training data + 2x pseudo test data)</li>\n</ul>\n<p>All models ensemble with 5xTTA and wbf achieve 0.7563 public LB/ 0.6956 private LB. Adding pseudo labeling improves the score to 0.7595 public Lb/ 0.7050 private LB.  </p>\n<p><strong>Did not work for me:</strong></p>\n<ul>\n<li>Cleaning the bounding boxes</li>\n<li>Gradient accumulation</li>\n<li>Cutmix and Mixup scores were not as good as the models without them</li>\n<li>WBF threshold Tweaking </li>\n<li>Tweaking efficientdet loss function hyper-parameters </li>\n</ul>",
      "rawMarkdown": "Thanks to the organizers and kaggle team for hosting this competition! Also great thanks to @rwightman for his efficientdet-pytorch repo, @zfturbo for his weighted-box-fusion repo, to @shonenkov for his amazing public notebook based on which I started this competition and to everyone who has been active in the discussion forum during the competition. Finally congratulations to all the fair prize winners and to the fair medal winners.\n\n**Summary:**\n* 5 fold d2 trained on 1024x1024 + 5 fold d4 trained on 512x512\n* Heavy augmentations (Added more augmentations along with the alex's public kernel augmentations for example: Noise augment, Scale and crop, this gave me 0.01x-0.2x boost)\n* Used weighted-boxes-fusion for ensemble\n* 5xTTA\n* Pseudo labeling(1 epoch, 1 round, training data + 2x pseudo test data)\n\nAll models ensemble with 5xTTA and wbf achieve 0.7563 public LB/ 0.6956 private LB. Adding pseudo labeling improves the score to 0.7595 public Lb/ 0.7050 private LB.  \n\n**Did not work for me:**\n* Cleaning the bounding boxes\n* Gradient accumulation\n* Cutmix and Mixup scores were not as good as the models without them\n* WBF threshold Tweaking \n* Tweaking efficientdet loss function hyper-parameters",
      "votes": null
    },
    {
      "id": "959312",
      "postDate": "08/05/2020 13:42:52",
      "content": "<p>Congrats for your achievement <a href=\"/mohammadzunaed\">@mohammadzunaed</a> . Very well deserved 👍 </p>",
      "rawMarkdown": "Congrats for your achievement @mohammadzunaed . Very well deserved 👍",
      "votes": null
    },
    {
      "id": "960054",
      "postDate": "08/06/2020 05:32:36",
      "content": "<p>Congrats <a href=\"/mohammadzunaed\">@mohammadzunaed</a>!</p>\n\n<p>May I ask that why you just use 2 epochs for pseudo labeling?\nAnd is it round=1 for pseudo labeling?</p>",
      "rawMarkdown": "Congrats @mohammadzunaed!\n\nMay I ask that why you just use 2 epochs for pseudo labeling?\nAnd is it round=1 for pseudo labeling?",
      "votes": null
    },
    {
      "id": "960339",
      "postDate": "08/06/2020 10:14:24",
      "content": "<p>Thanks <a href=\"/piantic\">@piantic</a>. Yes, it is round=1. A minor update has been made to the post. I actually have up-sampled the pseudo test data twice and trained for 1 epoch. This took more than 7 hours. So running more than 1 epoch would have resulted in notebook timeout error(&gt;9h).</p>",
      "rawMarkdown": "Thanks @piantic. Yes, it is round=1. A minor update has been made to the post. I actually have up-sampled the pseudo test data twice and trained for 1 epoch. This took more than 7 hours. So running more than 1 epoch would have resulted in notebook timeout error(&gt;9h).",
      "votes": null
    },
    {
      "id": "960414",
      "postDate": "08/06/2020 11:24:22",
      "content": "<p>So you ensembled 10 models total or one one fold from each ?</p>",
      "rawMarkdown": "So you ensembled 10 models total or one one fold from each ?",
      "votes": null
    },
    {
      "id": "960445",
      "postDate": "08/06/2020 12:08:49",
      "content": "<p>If you are asking about in which way I have done the ensemble:\nStep 1: Generate prediction1 from 5 fold d2 (used wbf)\nStep 2: Generate prediction2 from 5 fold d4 (used wbf)\nStep 3: Finally generate the final prediction by merging prediction1 and prediction2 (used wbf)\nOne one fold also worked but achieved slightly less score than the above method( 0.7591 compared to 0.7595 public LB)</p>",
      "rawMarkdown": "If you are asking about in which way I have done the ensemble:\nStep 1: Generate prediction1 from 5 fold d2 (used wbf)\nStep 2: Generate prediction2 from 5 fold d4 (used wbf)\nStep 3: Finally generate the final prediction by merging prediction1 and prediction2 (used wbf)\nOne one fold also worked but achieved slightly less score than the above method( 0.7591 compared to 0.7595 public LB)",
      "votes": null
    },
    {
      "id": "960953",
      "postDate": "08/06/2020 20:10:30",
      "content": "<p><a href=\"https://www.kaggle.com/mohammadzunaed\" target=\"_blank\">@mohammadzunaed</a> <br>\nI'm really missing this competition, couldn't manage time for it. Anyway, big congrats. -)</p>",
      "rawMarkdown": "mohammadzunaed \nI'm really missing this competition, couldn't manage time for it. Anyway, big congrats. -)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 960953,
      "author_name": "ipythonx",
      "author_url": "",
      "post_date": "08/06/2020 20:10:30",
      "content": "<p><a href=\"https://www.kaggle.com/mohammadzunaed\" target=\"_blank\">@mohammadzunaed</a> <br>\nI'm really missing this competition, couldn't manage time for it. Anyway, big congrats. -)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 959312,
      "author_name": "jagadish13",
      "author_url": "",
      "post_date": "08/05/2020 13:42:52",
      "content": "<p>Congrats for your achievement <a href=\"/mohammadzunaed\">@mohammadzunaed</a> . Very well deserved 👍 </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 960054,
      "author_name": "piantic",
      "author_url": "",
      "post_date": "08/06/2020 05:32:36",
      "content": "<p>Congrats <a href=\"/mohammadzunaed\">@mohammadzunaed</a>!</p>\n\n<p>May I ask that why you just use 2 epochs for pseudo labeling?\nAnd is it round=1 for pseudo labeling?</p>",
      "votes": null,
      "replies": [
        {
          "id": 960339,
          "author_name": "mohammadzunaed",
          "author_url": "",
          "post_date": "08/06/2020 10:14:24",
          "content": "<p>Thanks <a href=\"/piantic\">@piantic</a>. Yes, it is round=1. A minor update has been made to the post. I actually have up-sampled the pseudo test data twice and trained for 1 epoch. This took more than 7 hours. So running more than 1 epoch would have resulted in notebook timeout error(&gt;9h).</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 960414,
      "author_name": "marcinczelej",
      "author_url": "",
      "post_date": "08/06/2020 11:24:22",
      "content": "<p>So you ensembled 10 models total or one one fold from each ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 960445,
          "author_name": "mohammadzunaed",
          "author_url": "",
          "post_date": "08/06/2020 12:08:49",
          "content": "<p>If you are asking about in which way I have done the ensemble:\nStep 1: Generate prediction1 from 5 fold d2 (used wbf)\nStep 2: Generate prediction2 from 5 fold d4 (used wbf)\nStep 3: Finally generate the final prediction by merging prediction1 and prediction2 (used wbf)\nOne one fold also worked but achieved slightly less score than the above method( 0.7591 compared to 0.7595 public LB)</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "959305": "Thanks to the organizers and kaggle team for hosting this competition! Also great thanks to @rwightman for his efficientdet-pytorch repo, @zfturbo for his weighted-box-fusion repo, to @shonenkov for his amazing public notebook based on which I started this competition and to everyone who has been active in the discussion forum during the competition. Finally congratulations to all the fair prize winners and to the fair medal winners.\n\n**Summary:**\n* 5 fold d2 trained on 1024x1024 + 5 fold d4 trained on 512x512\n* Heavy augmentations (Added more augmentations along with the alex's public kernel augmentations for example: Noise augment, Scale and crop, this gave me 0.01x-0.2x boost)\n* Used weighted-boxes-fusion for ensemble\n* 5xTTA\n* Pseudo labeling(1 epoch, 1 round, training data + 2x pseudo test data)\n\nAll models ensemble with 5xTTA and wbf achieve 0.7563 public LB/ 0.6956 private LB. Adding pseudo labeling improves the score to 0.7595 public Lb/ 0.7050 private LB.  \n\n**Did not work for me:**\n* Cleaning the bounding boxes\n* Gradient accumulation\n* Cutmix and Mixup scores were not as good as the models without them\n* WBF threshold Tweaking \n* Tweaking efficientdet loss function hyper-parameters",
    "959312": "Congrats for your achievement @mohammadzunaed . Very well deserved 👍",
    "960054": "Congrats @mohammadzunaed!\n\nMay I ask that why you just use 2 epochs for pseudo labeling?\nAnd is it round=1 for pseudo labeling?",
    "960339": "Thanks @piantic. Yes, it is round=1. A minor update has been made to the post. I actually have up-sampled the pseudo test data twice and trained for 1 epoch. This took more than 7 hours. So running more than 1 epoch would have resulted in notebook timeout error(&gt;9h).",
    "960414": "So you ensembled 10 models total or one one fold from each ?",
    "960445": "If you are asking about in which way I have done the ensemble:\nStep 1: Generate prediction1 from 5 fold d2 (used wbf)\nStep 2: Generate prediction2 from 5 fold d4 (used wbf)\nStep 3: Finally generate the final prediction by merging prediction1 and prediction2 (used wbf)\nOne one fold also worked but achieved slightly less score than the above method( 0.7591 compared to 0.7595 public LB)",
    "960953": "mohammadzunaed \nI'm really missing this competition, couldn't manage time for it. Anyway, big congrats. -)"
  },
  "source": "existing_discussion",
  "complete": true,
  "competition_id": 19989,
  "competition_slug": "global-wheat-detection",
  "team_id": 4972530,
  "solution_url": "/competitions/global-wheat-detection/writeups/zunaed-rafi-185th-place-solution"
}