{
  "id": 232550,
  "title": "How to win object detection competetion",
  "url": "/competitions/global-wheat-detection/discussion/232550",
  "author_name": "Sohag Ahammed Siyam",
  "post_date": "2021-04-14T09:21:09.854000",
  "votes": 33,
  "comment_count": 15,
  "views": 0,
  "content": "<p>Object detection is a very challenging computer vision task to solve. To solve the object detection problem, we have to take several steps:</p>\n<ol>\n<li>Analyze the Dataset.</li>\n<li>Use Different augmentation techniques.</li>\n<li>Select an appropriate object detection model.</li>\n<li>Train the object detection model.</li>\n<li>Experiment with different hyperparameters.</li>\n<li>Use pseudo labeling on test data using a well-trained model.</li>\n<li>Train the different models with the best hyperparameters.</li>\n<li>Ensemble the best models and use TTA (Test time augmentation) during testing and prediction.</li>\n</ol>\n<p>Reference notebook: <a href=\"https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\" target=\"_blank\">https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt</a></p>\n<h1>1. Analyze the Dataset:</h1>\n<p>Read some EDA to understand the dataset. Check your dataset if there is any mislabelled dataset, consistency of the labels, unlabelled data, imbalanced data.<br>\n<img src=\"https://i.ibb.co/gmdBq3r/labels-1.jpg\" alt=\"Imbalanced Dataset Example\"><br>\nTry to remove the faulty data and fix mislabelled data. You can some external data to solve the imbalance problem. Data augmentation might also help.</p>\n<h1>2. Use Different augmentation techniques:</h1>\n<p>Deep learning models don't converge well with fewer data. To mitigate this issue, we can use different augmentation like rotation, shear, perspective, horizontal flip, vertical flip.<br>\nApart from them, there are some advanced augmentation techniques like cutmix augmentation and mosaic augmentation, and mixup.<br>\nThese two augmentation helps a lot to detect small and overlapped objects.<br>\n<img src=\"https://i.imgur.com/waxJLOR.png\" alt=\"Augmentation\"></p>\n<h1>3. Select an appropriate object detection model.</h1>\n<p>In recent days, yolov5 has surpassed the previous state-of-the-art model efficietdet in terms of accuracy and training time. You should try out both of them.<br>\n<img src=\"https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png\" alt=\"Models\"></p>\n<h1>4. Train the object detection model:</h1>\n<p>Object detection models are very hardware demanding. So, never forget to select gpu during training, select the appropriate batch size according to your dataset.</p>\n<h1>5. Experiment with different hyperparameters:</h1>\n<p>Selecting proper image size, learning rate, momentum, anchor box, and epochs is very important. There is no fixed number for these parameters. You have to experiment with different values according to your hardware.</p>\n<h1>6. Use pseudo labeling on test data using a well-trained model:</h1>\n<p>The pseudo-labeling method uses a small set of labeled data along with a large amount of unlabeled data to improve a model's performance. We can use our trained model to generate labels for our test data and use them for training. It will boost the overall accuracy.<br>\n<img src=\"https://www.researchgate.net/profile/Bayu-Adhi-Tama/publication/341813397/figure/fig2/AS:898930028068866@1591333028818/Schematic-diagram-of-pseudo-labeling.ppm\" alt=\"pseudo labeling\"></p>\n<h1>7. Train the different models with the best hyperparameters:</h1>\n<p>Best hyperparameters will help your model to reach the desired accuracy within a limited training time.</p>\n<h1>8. Testing ensembling and TTA:</h1>\n<p><strong>Ensembling:</strong> Ensemble modeling is a process where multiple diverse models are created to predict an outcome, either by using many different modeling algorithms or using different training data sets. The ensemble model then aggregates the prediction of each base model and results in one final prediction for the unseen data.<br>\n<img src=\"https://i.imgur.com/L2Jaqm8.png\" alt=\"Ensemble\"><br>\n<strong>Test Time Augmentation:</strong> The image data augmentation technique can also be applied when making predictions with a fit model in order to allow the model to make predictions for multiple different versions of each image in the test dataset. The predictions on the augmented images can be averaged, which can result in better predictive performance.</p>\n<p>Relevant notebooks: </p>\n<ol>\n<li><a href=\"https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\" target=\"_blank\">https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt</a></li>\n<li><a href=\"https://www.kaggle.com/aleksandradeis/globalwheatdetection-eda\" target=\"_blank\">https://www.kaggle.com/aleksandradeis/globalwheatdetection-eda</a></li>\n<li><a href=\"https://www.kaggle.com/nvnnghia/yolov5-pseudo-labeling\" target=\"_blank\">https://www.kaggle.com/nvnnghia/yolov5-pseudo-labeling</a></li>\n<li><a href=\"https://www.kaggle.com/shonenkov/training-efficientdet\" target=\"_blank\">https://www.kaggle.com/shonenkov/training-efficientdet</a></li>\n</ol>",
  "messages": [
    {
      "id": 1273363,
      "postDate": "2021-04-14T09:21:09.853Z",
      "content": "<p>Object detection is a very challenging computer vision task to solve. To solve the object detection problem, we have to take several steps:</p>\n<ol>\n<li>Analyze the Dataset.</li>\n<li>Use Different augmentation techniques.</li>\n<li>Select an appropriate object detection model.</li>\n<li>Train the object detection model.</li>\n<li>Experiment with different hyperparameters.</li>\n<li>Use pseudo labeling on test data using a well-trained model.</li>\n<li>Train the different models with the best hyperparameters.</li>\n<li>Ensemble the best models and use TTA (Test time augmentation) during testing and prediction.</li>\n</ol>\n<p>Reference notebook: <a href=\"https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\" target=\"_blank\">https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt</a></p>\n<h1>1. Analyze the Dataset:</h1>\n<p>Read some EDA to understand the dataset. Check your dataset if there is any mislabelled dataset, consistency of the labels, unlabelled data, imbalanced data.<br>\n<img src=\"https://i.ibb.co/gmdBq3r/labels-1.jpg\" alt=\"Imbalanced Dataset Example\"><br>\nTry to remove the faulty data and fix mislabelled data. You can some external data to solve the imbalance problem. Data augmentation might also help.</p>\n<h1>2. Use Different augmentation techniques:</h1>\n<p>Deep learning models don't converge well with fewer data. To mitigate this issue, we can use different augmentation like rotation, shear, perspective, horizontal flip, vertical flip.<br>\nApart from them, there are some advanced augmentation techniques like cutmix augmentation and mosaic augmentation, and mixup.<br>\nThese two augmentation helps a lot to detect small and overlapped objects.<br>\n<img src=\"https://i.imgur.com/waxJLOR.png\" alt=\"Augmentation\"></p>\n<h1>3. Select an appropriate object detection model.</h1>\n<p>In recent days, yolov5 has surpassed the previous state-of-the-art model efficietdet in terms of accuracy and training time. You should try out both of them.<br>\n<img src=\"https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png\" alt=\"Models\"></p>\n<h1>4. Train the object detection model:</h1>\n<p>Object detection models are very hardware demanding. So, never forget to select gpu during training, select the appropriate batch size according to your dataset.</p>\n<h1>5. Experiment with different hyperparameters:</h1>\n<p>Selecting proper image size, learning rate, momentum, anchor box, and epochs is very important. There is no fixed number for these parameters. You have to experiment with different values according to your hardware.</p>\n<h1>6. Use pseudo labeling on test data using a well-trained model:</h1>\n<p>The pseudo-labeling method uses a small set of labeled data along with a large amount of unlabeled data to improve a model's performance. We can use our trained model to generate labels for our test data and use them for training. It will boost the overall accuracy.<br>\n<img src=\"https://www.researchgate.net/profile/Bayu-Adhi-Tama/publication/341813397/figure/fig2/AS:898930028068866@1591333028818/Schematic-diagram-of-pseudo-labeling.ppm\" alt=\"pseudo labeling\"></p>\n<h1>7. Train the different models with the best hyperparameters:</h1>\n<p>Best hyperparameters will help your model to reach the desired accuracy within a limited training time.</p>\n<h1>8. Testing ensembling and TTA:</h1>\n<p><strong>Ensembling:</strong> Ensemble modeling is a process where multiple diverse models are created to predict an outcome, either by using many different modeling algorithms or using different training data sets. The ensemble model then aggregates the prediction of each base model and results in one final prediction for the unseen data.<br>\n<img src=\"https://i.imgur.com/L2Jaqm8.png\" alt=\"Ensemble\"><br>\n<strong>Test Time Augmentation:</strong> The image data augmentation technique can also be applied when making predictions with a fit model in order to allow the model to make predictions for multiple different versions of each image in the test dataset. The predictions on the augmented images can be averaged, which can result in better predictive performance.</p>\n<p>Relevant notebooks: </p>\n<ol>\n<li><a href=\"https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\" target=\"_blank\">https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt</a></li>\n<li><a href=\"https://www.kaggle.com/aleksandradeis/globalwheatdetection-eda\" target=\"_blank\">https://www.kaggle.com/aleksandradeis/globalwheatdetection-eda</a></li>\n<li><a href=\"https://www.kaggle.com/nvnnghia/yolov5-pseudo-labeling\" target=\"_blank\">https://www.kaggle.com/nvnnghia/yolov5-pseudo-labeling</a></li>\n<li><a href=\"https://www.kaggle.com/shonenkov/training-efficientdet\" target=\"_blank\">https://www.kaggle.com/shonenkov/training-efficientdet</a></li>\n</ol>",
      "rawMarkdown": "Object detection is a very challenging computer vision task to solve. To solve the object detection problem, we have to take several steps:\n1. Analyze the Dataset.\n2. Use Different augmentation techniques.\n3. Select an appropriate object detection model.\n4. Train the object detection model.\n5. Experiment with different hyperparameters.\n6. Use pseudo labeling on test data using a well-trained model.\n7. Train the different models with the best hyperparameters.\n8. Ensemble the best models and use TTA (Test time augmentation) during testing and prediction.\n\nReference notebook: https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\n\n# 1. Analyze the Dataset:\nRead some EDA to understand the dataset. Check your dataset if there is any mislabelled dataset, consistency of the labels, unlabelled data, imbalanced data.\n![Imbalanced Dataset Example](https://i.ibb.co/gmdBq3r/labels-1.jpg)\nTry to remove the faulty data and fix mislabelled data. You can some external data to solve the imbalance problem. Data augmentation might also help.\n\n# 2. Use Different augmentation techniques:\nDeep learning models don't converge well with fewer data. To mitigate this issue, we can use different augmentation like rotation, shear, perspective, horizontal flip, vertical flip.\nApart from them, there are some advanced augmentation techniques like cutmix augmentation and mosaic augmentation, and mixup.\nThese two augmentation helps a lot to detect small and overlapped objects.\n![Augmentation](https://i.imgur.com/waxJLOR.png)\n# 3. Select an appropriate object detection model.\nIn recent days, yolov5 has surpassed the previous state-of-the-art model efficietdet in terms of accuracy and training time. You should try out both of them.\n![Models](https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png)\n# 4. Train the object detection model:\nObject detection models are very hardware demanding. So, never forget to select gpu during training, select the appropriate batch size according to your dataset.\n\n# 5. Experiment with different hyperparameters:\nSelecting proper image size, learning rate, momentum, anchor box, and epochs is very important. There is no fixed number for these parameters. You have to experiment with different values according to your hardware.\n\n# 6. Use pseudo labeling on test data using a well-trained model:\nThe pseudo-labeling method uses a small set of labeled data along with a large amount of unlabeled data to improve a model's performance. We can use our trained model to generate labels for our test data and use them for training. It will boost the overall accuracy.\n![pseudo labeling](https://www.researchgate.net/profile/Bayu-Adhi-Tama/publication/341813397/figure/fig2/AS:898930028068866@1591333028818/Schematic-diagram-of-pseudo-labeling.ppm)\n# 7. Train the different models with the best hyperparameters:\nBest hyperparameters will help your model to reach the desired accuracy within a limited training time.\n\n# 8. Testing ensembling and TTA:\n**Ensembling:** Ensemble modeling is a process where multiple diverse models are created to predict an outcome, either by using many different modeling algorithms or using different training data sets. The ensemble model then aggregates the prediction of each base model and results in one final prediction for the unseen data.\n![Ensemble](https://i.imgur.com/L2Jaqm8.png)\n**Test Time Augmentation:** The image data augmentation technique can also be applied when making predictions with a fit model in order to allow the model to make predictions for multiple different versions of each image in the test dataset. The predictions on the augmented images can be averaged, which can result in better predictive performance.\n\nRelevant notebooks: \n1. https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\n2. https://www.kaggle.com/aleksandradeis/globalwheatdetection-eda\n3. https://www.kaggle.com/nvnnghia/yolov5-pseudo-labeling\n4. https://www.kaggle.com/shonenkov/training-efficientdet",
      "votes": 33
    },
    {
      "id": 1330110,
      "postDate": "2021-05-31T15:37:46.393Z",
      "content": "<p>Great list, thanks for sharing <a href=\"https://www.kaggle.com/espsiyam\" target=\"_blank\">@espsiyam</a> </p>",
      "rawMarkdown": "Great list, thanks for sharing @espsiyam ",
      "votes": 1
    },
    {
      "id": 1279665,
      "postDate": "2021-04-21T06:21:57.213Z",
      "content": "<p>Great documentary </p>",
      "rawMarkdown": "Great documentary ",
      "votes": 1,
      "replies": [
        {
          "id": 1294325,
          "postDate": "2021-05-05T14:54:01.707Z",
          "content": "<p>Thank you vhaiya.</p>",
          "rawMarkdown": "Thank you vhaiya.\n",
          "votes": 1
        }
      ]
    },
    {
      "id": 1274884,
      "postDate": "2021-04-15T17:30:19.330Z",
      "content": "<p>Amazing post!</p>",
      "rawMarkdown": "Amazing post!",
      "votes": 1,
      "replies": [
        {
          "id": 1274890,
          "postDate": "2021-04-15T17:31:36.533Z",
          "content": "<p>Thank you.</p>",
          "rawMarkdown": "Thank you."
        }
      ]
    },
    {
      "id": 1274845,
      "postDate": "2021-04-15T16:57:40.503Z",
      "content": "<p>And most important tip: have lots of GPU. 😁 </p>\n<p>Joke aside, that's a good list. 👌 </p>",
      "rawMarkdown": "And most important tip: have lots of GPU. 😁 \n\nJoke aside, that's a good list. 👌 ",
      "votes": 1,
      "replies": [
        {
          "id": 1274888,
          "postDate": "2021-04-15T17:31:14.870Z",
          "content": "<p>GPU is the main point to push the accuracy.<br>\nMy pleasure.</p>",
          "rawMarkdown": "GPU is the main point to push the accuracy.\nMy pleasure."
        }
      ]
    },
    {
      "id": 1277211,
      "postDate": "2021-04-18T14:24:14.460Z",
      "content": "<p>Thx, for this info but sorry i have a little questions <br>\n1- yolov3 from darknet can i pip install it in kaggle notebook or i should run it locally on my machine ?<br>\n2- you use YOLOv5 in PyTorch &gt; ONNX &gt; CoreML or something else ?<br>\nThanks in advance </p>",
      "rawMarkdown": "Thx, for this info but sorry i have a little questions \n1- yolov3 from darknet can i pip install it in kaggle notebook or i should run it locally on my machine ?\n2- you use YOLOv5 in PyTorch > ONNX > CoreML or something else ?\nThanks in advance ",
      "votes": 2,
      "replies": [
        {
          "id": 1278810,
          "postDate": "2021-04-20T09:46:19.847Z",
          "content": "<p>You might do both. I ran yolov3 on my local machine dew times.<br>\nI've used YOLOv5 in PyTorch. You can convert them to ONNX or CoreML.</p>",
          "rawMarkdown": "You might do both. I ran yolov3 on my local machine dew times.\nI've used YOLOv5 in PyTorch. You can convert them to ONNX or CoreML.",
          "votes": 1
        },
        {
          "id": 1278932,
          "postDate": "2021-04-20T12:38:10.820Z",
          "content": "<p>Thanks 👍👍👍</p>",
          "rawMarkdown": "Thanks 👍👍👍"
        }
      ]
    },
    {
      "id": 1767273,
      "postDate": "2022-04-25T08:03:08.037Z",
      "content": "<p>I like your post so much. I learned many things from it. Thanks!!</p>",
      "rawMarkdown": "I like your post so much. I learned many things from it. Thanks!!"
    },
    {
      "id": 1279256,
      "postDate": "2021-04-20T18:38:24.873Z",
      "content": "<p>This is one of the best object detection explanations I have ever seen. Very concise and easy to understand. Thank you <a href=\"https://www.kaggle.com/espsiyam\" target=\"_blank\">@espsiyam</a></p>",
      "rawMarkdown": "This is one of the best object detection explanations I have ever seen. Very concise and easy to understand. Thank you @espsiyam",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 1279352,
          "postDate": "2021-04-20T19:49:42.383Z",
          "content": "<p>Thank you so much. I got my first gold medal for this. I'm really greatful.</p>",
          "rawMarkdown": "Thank you so much. I got my first gold medal for this. I'm really greatful."
        }
      ]
    },
    {
      "id": 1376858,
      "postDate": "2021-07-05T11:46:52.207Z",
      "content": "<p>It is very helpful summary👍<br>\nThank you!</p>",
      "rawMarkdown": "It is very helpful summary👍\nThank you!",
      "votes": 1
    },
    {
      "id": 1329502,
      "postDate": "2021-05-31T07:32:34.923Z",
      "content": "<p>Great explanation. Thanks!! </p>",
      "rawMarkdown": "Great explanation. Thanks!! ",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 1330110,
      "author_name": "Javier Ayala Rojas",
      "author_url": "",
      "post_date": "2021-05-31T15:37:46.393000",
      "content": "<p>Great list, thanks for sharing <a href=\"https://www.kaggle.com/espsiyam\" target=\"_blank\">@espsiyam</a> </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1279665,
      "author_name": "Harun-Ur-Rashid",
      "author_url": "",
      "post_date": "2021-04-21T06:21:57.213000",
      "content": "<p>Great documentary </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1294325,
          "author_name": "Sohag Ahammed Siyam",
          "author_url": "",
          "post_date": "2021-05-05T14:54:01.707000",
          "content": "<p>Thank you vhaiya.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1274884,
      "author_name": "Abhishek252",
      "author_url": "",
      "post_date": "2021-04-15T17:30:19.330000",
      "content": "<p>Amazing post!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1274890,
          "author_name": "Sohag Ahammed Siyam",
          "author_url": "",
          "post_date": "2021-04-15T17:31:36.533000",
          "content": "<p>Thank you.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1274845,
      "author_name": "Yassine Alouini",
      "author_url": "",
      "post_date": "2021-04-15T16:57:40.503000",
      "content": "<p>And most important tip: have lots of GPU. 😁 </p>\n<p>Joke aside, that's a good list. 👌 </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1274888,
          "author_name": "Sohag Ahammed Siyam",
          "author_url": "",
          "post_date": "2021-04-15T17:31:14.870000",
          "content": "<p>GPU is the main point to push the accuracy.<br>\nMy pleasure.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1277211,
      "author_name": "Mohamed Ahmed",
      "author_url": "",
      "post_date": "2021-04-18T14:24:14.460000",
      "content": "<p>Thx, for this info but sorry i have a little questions <br>\n1- yolov3 from darknet can i pip install it in kaggle notebook or i should run it locally on my machine ?<br>\n2- you use YOLOv5 in PyTorch &gt; ONNX &gt; CoreML or something else ?<br>\nThanks in advance </p>",
      "votes": 2,
      "replies": [
        {
          "id": 1278810,
          "author_name": "Sohag Ahammed Siyam",
          "author_url": "",
          "post_date": "2021-04-20T09:46:19.847000",
          "content": "<p>You might do both. I ran yolov3 on my local machine dew times.<br>\nI've used YOLOv5 in PyTorch. You can convert them to ONNX or CoreML.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1278932,
          "author_name": "Mohamed Ahmed",
          "author_url": "",
          "post_date": "2021-04-20T12:38:10.820000",
          "content": "<p>Thanks 👍👍👍</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1767273,
      "author_name": "quinguyen",
      "author_url": "",
      "post_date": "2022-04-25T08:03:08.037000",
      "content": "<p>I like your post so much. I learned many things from it. Thanks!!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1279256,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-04-20T18:38:24.873000",
      "content": "<p>This is one of the best object detection explanations I have ever seen. Very concise and easy to understand. Thank you <a href=\"https://www.kaggle.com/espsiyam\" target=\"_blank\">@espsiyam</a></p>",
      "votes": 1,
      "replies": [
        {
          "id": 1279352,
          "author_name": "Sohag Ahammed Siyam",
          "author_url": "",
          "post_date": "2021-04-20T19:49:42.383000",
          "content": "<p>Thank you so much. I got my first gold medal for this. I'm really greatful.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1376858,
      "author_name": "J.H.Lee",
      "author_url": "",
      "post_date": "2021-07-05T11:46:52.207000",
      "content": "<p>It is very helpful summary👍<br>\nThank you!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1329502,
      "author_name": "first_b",
      "author_url": "",
      "post_date": "2021-05-31T07:32:34.923000",
      "content": "<p>Great explanation. Thanks!! </p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1273363": "Object detection is a very challenging computer vision task to solve. To solve the object detection problem, we have to take several steps:\n1. Analyze the Dataset.\n2. Use Different augmentation techniques.\n3. Select an appropriate object detection model.\n4. Train the object detection model.\n5. Experiment with different hyperparameters.\n6. Use pseudo labeling on test data using a well-trained model.\n7. Train the different models with the best hyperparameters.\n8. Ensemble the best models and use TTA (Test time augmentation) during testing and prediction.\n\nReference notebook: https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\n\n# 1. Analyze the Dataset:\nRead some EDA to understand the dataset. Check your dataset if there is any mislabelled dataset, consistency of the labels, unlabelled data, imbalanced data.\n![Imbalanced Dataset Example](https://i.ibb.co/gmdBq3r/labels-1.jpg)\nTry to remove the faulty data and fix mislabelled data. You can some external data to solve the imbalance problem. Data augmentation might also help.\n\n# 2. Use Different augmentation techniques:\nDeep learning models don't converge well with fewer data. To mitigate this issue, we can use different augmentation like rotation, shear, perspective, horizontal flip, vertical flip.\nApart from them, there are some advanced augmentation techniques like cutmix augmentation and mosaic augmentation, and mixup.\nThese two augmentation helps a lot to detect small and overlapped objects.\n![Augmentation](https://i.imgur.com/waxJLOR.png)\n# 3. Select an appropriate object detection model.\nIn recent days, yolov5 has surpassed the previous state-of-the-art model efficietdet in terms of accuracy and training time. You should try out both of them.\n![Models](https://user-images.githubusercontent.com/26833433/114313216-f0a5e100-9af5-11eb-8445-c682b60da2e3.png)\n# 4. Train the object detection model:\nObject detection models are very hardware demanding. So, never forget to select gpu during training, select the appropriate batch size according to your dataset.\n\n# 5. Experiment with different hyperparameters:\nSelecting proper image size, learning rate, momentum, anchor box, and epochs is very important. There is no fixed number for these parameters. You have to experiment with different values according to your hardware.\n\n# 6. Use pseudo labeling on test data using a well-trained model:\nThe pseudo-labeling method uses a small set of labeled data along with a large amount of unlabeled data to improve a model's performance. We can use our trained model to generate labels for our test data and use them for training. It will boost the overall accuracy.\n![pseudo labeling](https://www.researchgate.net/profile/Bayu-Adhi-Tama/publication/341813397/figure/fig2/AS:898930028068866@1591333028818/Schematic-diagram-of-pseudo-labeling.ppm)\n# 7. Train the different models with the best hyperparameters:\nBest hyperparameters will help your model to reach the desired accuracy within a limited training time.\n\n# 8. Testing ensembling and TTA:\n**Ensembling:** Ensemble modeling is a process where multiple diverse models are created to predict an outcome, either by using many different modeling algorithms or using different training data sets. The ensemble model then aggregates the prediction of each base model and results in one final prediction for the unseen data.\n![Ensemble](https://i.imgur.com/L2Jaqm8.png)\n**Test Time Augmentation:** The image data augmentation technique can also be applied when making predictions with a fit model in order to allow the model to make predictions for multiple different versions of each image in the test dataset. The predictions on the augmented images can be averaged, which can result in better predictive performance.\n\nRelevant notebooks: \n1. https://www.kaggle.com/espsiyam/yolov5-ensemble-tta-transfer-learning-hpt\n2. https://www.kaggle.com/aleksandradeis/globalwheatdetection-eda\n3. https://www.kaggle.com/nvnnghia/yolov5-pseudo-labeling\n4. https://www.kaggle.com/shonenkov/training-efficientdet",
    "1330110": "Great list, thanks for sharing @espsiyam ",
    "1279665": "Great documentary ",
    "1274884": "Amazing post!",
    "1274845": "And most important tip: have lots of GPU. 😁 \n\nJoke aside, that's a good list. 👌 ",
    "1277211": "Thx, for this info but sorry i have a little questions \n1- yolov3 from darknet can i pip install it in kaggle notebook or i should run it locally on my machine ?\n2- you use YOLOv5 in PyTorch > ONNX > CoreML or something else ?\nThanks in advance ",
    "1767273": "I like your post so much. I learned many things from it. Thanks!!",
    "1279256": "This is one of the best object detection explanations I have ever seen. Very concise and easy to understand. Thank you @espsiyam",
    "1376858": "It is very helpful summary👍\nThank you!",
    "1329502": "Great explanation. Thanks!! "
  }
}