{
  "id": 229629,
  "title": "[10th place solution] YOLOv5 + VFNet + FasterRCNN",
  "url": "/competitions/vinbigdata-chest-xray-abnormalities-detection/discussion/229629",
  "author_name": "Kiet Chu",
  "post_date": "2021-03-31T03:00:08.341000",
  "votes": 49,
  "comment_count": 27,
  "views": 0,
  "content": "<p>Hello! Congratulations to all the winners. I am very excited to be in top 10 as this was my first competition on Kaggle. Thanks to <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> <a href=\"https://www.kaggle.com/corochann\" target=\"_blank\">@corochann</a> <a href=\"https://www.kaggle.com/dschettler8845\" target=\"_blank\">@dschettler8845</a> <a href=\"https://www.kaggle.com/sreevishnudamodaran\" target=\"_blank\">@sreevishnudamodaran</a> <a href=\"https://www.kaggle.com/quillio\" target=\"_blank\">@quillio</a> and <a href=\"https://www.kaggle.com/gauravsingh1\" target=\"_blank\">@gauravsingh1</a> for their amazing public notebooks. Thanks to Vingroup Big Data Institute and Kaggle for organizing this competition.</p>\n<p><strong>TLDR</strong></p>\n<ul>\n<li>I used weighted boxes fusion (WBF) by <a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> to preprocess the input.</li>\n<li>I used an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 6 VFNet models.</li>\n<li>I used WBF to ensemble the outputs.</li>\n<li>Source code: <a href=\"https://github.com/kc3222/Kaggle/tree/main/VinBigDataChestXRayAbnormalitiesDetection\" target=\"_blank\">https://github.com/kc3222/Kaggle/tree/main/VinBigDataChestXRayAbnormalitiesDetection</a></li>\n</ul>\n<p><strong>Models</strong></p>\n<ul>\n<li>5 Yolov5 models trained on 768x768 images (5 folds) based on:<br>\n<a href=\"https://www.kaggle.com/awsaf49/vinbigdata-cxr-ad-yolov5-14-class-train\" target=\"_blank\">https://www.kaggle.com/awsaf49/vinbigdata-cxr-ad-yolov5-14-class-train</a></li>\n<li>1 FasterRCNN model trained based on:<br>\n<a href=\"https://www.kaggle.com/corochann/vinbigdata-detectron2-train\" target=\"_blank\">https://www.kaggle.com/corochann/vinbigdata-detectron2-train</a></li>\n<li>6 VFNetmodels trained (5 folds + 1 random split) based on:<br>\n<a href=\"https://www.kaggle.com/gauravsingh1/mmdet-pytorch-framework-training-fasterrcnn-base\" target=\"_blank\">https://www.kaggle.com/gauravsingh1/mmdet-pytorch-framework-training-fasterrcnn-base</a></li>\n<li>I tried to train some classification models but none of them provides a better score than the classification by <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> so I decided to stick with their classification.</li>\n</ul>\n<p><strong>Preprocess</strong></p>\n<ul>\n<li>I applied WBF with iou=0.5 to the base bounding boxes.</li>\n</ul>\n<p><strong>Training Methods</strong></p>\n<ul>\n<li>For yolov5, I trained the base models with hyp.scratch.yaml for 50 epochs and finetune them with hyp.finetune.yaml for another 50 epochs (both of these hyperparameter settings are default in yolov5).</li>\n<li>For Faster RCNN, I trained the model based on the mentioned public notebook.</li>\n<li>For VFNet, I trained each model for 15 epochs with horizontal flip, random brightness contrast and slight rotation augmentations.</li>\n</ul>\n<p><strong>Postprocess Strategy</strong></p>\n<ul>\n<li>The ensemble technique I used is WBF with skip_box_threshold=0.3. The threshold is chosen based on the best public scores.</li>\n<li>The weight of each model is the mAP50 score on respective validation set of each model.</li>\n<li>Based on the input bounding boxes, 5 classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) have less than 1.5 bounding boxes per image on average and other classes have about 2 bounding boxes per image on average. Therefore, I decided to ensemble bounding boxes of the mentioned classes with iou = 0.4 (to reduce the number of boxes) and bounding boxes of other classes with iou = 0.5.</li>\n<li>The classification predictions are used on all VFNet models, Faster RCNN model and two Yolov5 models. Three yolov5 models are unfiltered as some classifications are wrong and yolov5 models produce relative small amount of bounding boxes even if the image is normal.</li>\n</ul>\n<p><strong>Side note</strong></p>\n<ul>\n<li>All submissions that I used to get my public scores are an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 1 VFNet model. Most of them also get high private scores (0.3-0.304). I didn't choose any of them because I thought that they would generalize worse than an ensemble of more models. I think that finding the balance between the number of models and the number of bounding boxes would result in a better score.</li>\n</ul>",
  "messages": [
    {
      "id": 1257671,
      "postDate": "2021-03-31T03:00:08.340Z",
      "content": "<p>Hello! Congratulations to all the winners. I am very excited to be in top 10 as this was my first competition on Kaggle. Thanks to <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> <a href=\"https://www.kaggle.com/corochann\" target=\"_blank\">@corochann</a> <a href=\"https://www.kaggle.com/dschettler8845\" target=\"_blank\">@dschettler8845</a> <a href=\"https://www.kaggle.com/sreevishnudamodaran\" target=\"_blank\">@sreevishnudamodaran</a> <a href=\"https://www.kaggle.com/quillio\" target=\"_blank\">@quillio</a> and <a href=\"https://www.kaggle.com/gauravsingh1\" target=\"_blank\">@gauravsingh1</a> for their amazing public notebooks. Thanks to Vingroup Big Data Institute and Kaggle for organizing this competition.</p>\n<p><strong>TLDR</strong></p>\n<ul>\n<li>I used weighted boxes fusion (WBF) by <a href=\"https://www.kaggle.com/zfturbo\" target=\"_blank\">@zfturbo</a> to preprocess the input.</li>\n<li>I used an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 6 VFNet models.</li>\n<li>I used WBF to ensemble the outputs.</li>\n<li>Source code: <a href=\"https://github.com/kc3222/Kaggle/tree/main/VinBigDataChestXRayAbnormalitiesDetection\" target=\"_blank\">https://github.com/kc3222/Kaggle/tree/main/VinBigDataChestXRayAbnormalitiesDetection</a></li>\n</ul>\n<p><strong>Models</strong></p>\n<ul>\n<li>5 Yolov5 models trained on 768x768 images (5 folds) based on:<br>\n<a href=\"https://www.kaggle.com/awsaf49/vinbigdata-cxr-ad-yolov5-14-class-train\" target=\"_blank\">https://www.kaggle.com/awsaf49/vinbigdata-cxr-ad-yolov5-14-class-train</a></li>\n<li>1 FasterRCNN model trained based on:<br>\n<a href=\"https://www.kaggle.com/corochann/vinbigdata-detectron2-train\" target=\"_blank\">https://www.kaggle.com/corochann/vinbigdata-detectron2-train</a></li>\n<li>6 VFNetmodels trained (5 folds + 1 random split) based on:<br>\n<a href=\"https://www.kaggle.com/gauravsingh1/mmdet-pytorch-framework-training-fasterrcnn-base\" target=\"_blank\">https://www.kaggle.com/gauravsingh1/mmdet-pytorch-framework-training-fasterrcnn-base</a></li>\n<li>I tried to train some classification models but none of them provides a better score than the classification by <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> so I decided to stick with their classification.</li>\n</ul>\n<p><strong>Preprocess</strong></p>\n<ul>\n<li>I applied WBF with iou=0.5 to the base bounding boxes.</li>\n</ul>\n<p><strong>Training Methods</strong></p>\n<ul>\n<li>For yolov5, I trained the base models with hyp.scratch.yaml for 50 epochs and finetune them with hyp.finetune.yaml for another 50 epochs (both of these hyperparameter settings are default in yolov5).</li>\n<li>For Faster RCNN, I trained the model based on the mentioned public notebook.</li>\n<li>For VFNet, I trained each model for 15 epochs with horizontal flip, random brightness contrast and slight rotation augmentations.</li>\n</ul>\n<p><strong>Postprocess Strategy</strong></p>\n<ul>\n<li>The ensemble technique I used is WBF with skip_box_threshold=0.3. The threshold is chosen based on the best public scores.</li>\n<li>The weight of each model is the mAP50 score on respective validation set of each model.</li>\n<li>Based on the input bounding boxes, 5 classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) have less than 1.5 bounding boxes per image on average and other classes have about 2 bounding boxes per image on average. Therefore, I decided to ensemble bounding boxes of the mentioned classes with iou = 0.4 (to reduce the number of boxes) and bounding boxes of other classes with iou = 0.5.</li>\n<li>The classification predictions are used on all VFNet models, Faster RCNN model and two Yolov5 models. Three yolov5 models are unfiltered as some classifications are wrong and yolov5 models produce relative small amount of bounding boxes even if the image is normal.</li>\n</ul>\n<p><strong>Side note</strong></p>\n<ul>\n<li>All submissions that I used to get my public scores are an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 1 VFNet model. Most of them also get high private scores (0.3-0.304). I didn't choose any of them because I thought that they would generalize worse than an ensemble of more models. I think that finding the balance between the number of models and the number of bounding boxes would result in a better score.</li>\n</ul>",
      "rawMarkdown": "Hello! Congratulations to all the winners. I am very excited to be in top 10 as this was my first competition on Kaggle. Thanks to @awsaf49 @corochann @dschettler8845 @sreevishnudamodaran @quillio and @gauravsingh1 for their amazing public notebooks. Thanks to Vingroup Big Data Institute and Kaggle for organizing this competition.\n\n**TLDR**\n- I used weighted boxes fusion (WBF) by @zfturbo to preprocess the input.\n- I used an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 6 VFNet models.\n- I used WBF to ensemble the outputs.\n- Source code: https://github.com/kc3222/Kaggle/tree/main/VinBigDataChestXRayAbnormalitiesDetection\n\n**Models**\n- 5 Yolov5 models trained on 768x768 images (5 folds) based on:\nhttps://www.kaggle.com/awsaf49/vinbigdata-cxr-ad-yolov5-14-class-train\n- 1 FasterRCNN model trained based on:\nhttps://www.kaggle.com/corochann/vinbigdata-detectron2-train\n- 6 VFNetmodels trained (5 folds + 1 random split) based on:\nhttps://www.kaggle.com/gauravsingh1/mmdet-pytorch-framework-training-fasterrcnn-base\n- I tried to train some classification models but none of them provides a better score than the classification by @awsaf49 so I decided to stick with their classification.\n\n**Preprocess**\n- I applied WBF with iou=0.5 to the base bounding boxes.\n\n**Training Methods**\n- For yolov5, I trained the base models with hyp.scratch.yaml for 50 epochs and finetune them with hyp.finetune.yaml for another 50 epochs (both of these hyperparameter settings are default in yolov5).\n- For Faster RCNN, I trained the model based on the mentioned public notebook.\n- For VFNet, I trained each model for 15 epochs with horizontal flip, random brightness contrast and slight rotation augmentations.\n\n**Postprocess Strategy**\n- The ensemble technique I used is WBF with skip_box_threshold=0.3. The threshold is chosen based on the best public scores.\n- The weight of each model is the mAP50 score on respective validation set of each model.\n- Based on the input bounding boxes, 5 classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) have less than 1.5 bounding boxes per image on average and other classes have about 2 bounding boxes per image on average. Therefore, I decided to ensemble bounding boxes of the mentioned classes with iou = 0.4 (to reduce the number of boxes) and bounding boxes of other classes with iou = 0.5.\n- The classification predictions are used on all VFNet models, Faster RCNN model and two Yolov5 models. Three yolov5 models are unfiltered as some classifications are wrong and yolov5 models produce relative small amount of bounding boxes even if the image is normal.\n\n**Side note**\n- All submissions that I used to get my public scores are an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 1 VFNet model. Most of them also get high private scores (0.3-0.304). I didn't choose any of them because I thought that they would generalize worse than an ensemble of more models. I think that finding the balance between the number of models and the number of bounding boxes would result in a better score.",
      "votes": 49
    },
    {
      "id": 1258394,
      "postDate": "2021-03-31T15:15:31.703Z",
      "content": "<p>Congrats my friend. I am a kind of a newbie in this field, could you share how to ensemble the multi-model of Yolov5?</p>",
      "rawMarkdown": "Congrats my friend. I am a kind of a newbie in this field, could you share how to ensemble the multi-model of Yolov5?",
      "votes": 1,
      "replies": [
        {
          "id": 1258451,
          "postDate": "2021-03-31T16:06:37.680Z",
          "content": "<p>Thank you! To ensemble the results, I predicted the test set using each individual model and formatted the predictions to the correct input for weighted boxes fusion. You can see the format in this github: <a href=\"https://github.com/ZFTurbo/Weighted-Boxes-Fusion\" target=\"_blank\">https://github.com/ZFTurbo/Weighted-Boxes-Fusion</a></p>",
          "rawMarkdown": "Thank you! To ensemble the results, I predicted the test set using each individual model and formatted the predictions to the correct input for weighted boxes fusion. You can see the format in this github: https://github.com/ZFTurbo/Weighted-Boxes-Fusion",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257924,
      "postDate": "2021-03-31T08:10:31.120Z",
      "content": "<p>Great to be part of it 😀</p>",
      "rawMarkdown": "Great to be part of it 😀",
      "votes": 1,
      "replies": [
        {
          "id": 1258299,
          "postDate": "2021-03-31T14:14:06.167Z",
          "content": "<p>Thank you very much! I couldn't have done it without your work.</p>",
          "rawMarkdown": "Thank you very much! I couldn't have done it without your work.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257869,
      "postDate": "2021-03-31T06:52:19.227Z",
      "content": "<p>Congratulations. Thanks for sharing your experience.</p>",
      "rawMarkdown": "Congratulations. Thanks for sharing your experience.",
      "votes": 1,
      "replies": [
        {
          "id": 1258300,
          "postDate": "2021-03-31T14:14:17.163Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257854,
      "postDate": "2021-03-31T06:38:20.593Z",
      "content": "<p>Congrats <a href=\"https://www.kaggle.com/kc3222\" target=\"_blank\">@kc3222</a> for solo gold! and thank you for utilizing my notebook ;)</p>",
      "rawMarkdown": "Congrats @kc3222 for solo gold! and thank you for utilizing my notebook ;)",
      "votes": 1,
      "replies": [
        {
          "id": 1258301,
          "postDate": "2021-03-31T14:15:10.173Z",
          "content": "<p>Thank you! Your notebooks are really detailed and helpful.</p>",
          "rawMarkdown": "Thank you! Your notebooks are really detailed and helpful."
        }
      ]
    },
    {
      "id": 1257844,
      "postDate": "2021-03-31T06:26:06.347Z",
      "content": "<p>Hi Congrats, Can I ask what is the best CV/LB of single yolov5 model did you get, and what about  CV/LB after ensembling 5 yolov5 models. Thank you</p>",
      "rawMarkdown": "Hi Congrats, Can I ask what is the best CV/LB of single yolov5 model did you get, and what about  CV/LB after ensembling 5 yolov5 models. Thank you",
      "votes": 1,
      "replies": [
        {
          "id": 1258309,
          "postDate": "2021-03-31T14:20:01.423Z",
          "content": "<p>Thank you! The best CV/LB of a single yolov5 model I got were 0.41 and 0.24. I didn't test the ensemble of the final 5 yolov5 models that I used because I decided to trust my CV. The ensemble with only yolov5 I tested is around 0.23 (both public and private).</p>",
          "rawMarkdown": "Thank you! The best CV/LB of a single yolov5 model I got were 0.41 and 0.24. I didn't test the ensemble of the final 5 yolov5 models that I used because I decided to trust my CV. The ensemble with only yolov5 I tested is around 0.23 (both public and private).",
          "votes": 1
        },
        {
          "id": 1258408,
          "postDate": "2021-03-31T15:24:24.187Z",
          "content": "<p>I didnt know why my ensemble model getting worse, one of my best fold with yolov4-p5 is around 0.5/0.238/0.256 for CV/LB/PV,,,,, but when I ensemble them LB increased to 0.274 but PV reduced to 0.231.</p>",
          "rawMarkdown": "I didnt know why my ensemble model getting worse, one of my best fold with yolov4-p5 is around 0.5/0.238/0.256 for CV/LB/PV,,,,, but when I ensemble them LB increased to 0.274 but PV reduced to 0.231."
        }
      ]
    },
    {
      "id": 1257836,
      "postDate": "2021-03-31T06:19:49.433Z",
      "content": "<p>Thanks for sharing! <br>\nI wonder one things that what is the single/ensemble score of VFNet? Also did you use mmdetection's default vfnet config file?<br>\nCongrats a lot :)</p>",
      "rawMarkdown": "Thanks for sharing! \nI wonder one things that what is the single/ensemble score of VFNet? Also did you use mmdetection's default vfnet config file?\nCongrats a lot :)",
      "votes": 1,
      "replies": [
        {
          "id": 1258314,
          "postDate": "2021-03-31T14:23:56.667Z",
          "content": "<p>The single scores of my VFNet models are about 0.23-0.24 for both public and private leaderboards. I didn't test the ensemble of only VFNets. Aside the augmentations that I mentioned, the lr I used is 0.01 and other settings are default.</p>",
          "rawMarkdown": "The single scores of my VFNet models are about 0.23-0.24 for both public and private leaderboards. I didn't test the ensemble of only VFNets. Aside the augmentations that I mentioned, the lr I used is 0.01 and other settings are default.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257772,
      "postDate": "2021-03-31T04:57:08.410Z",
      "content": "<p>Can you share private/public LB for your single yolov5 model? Thank you &lt;3 </p>",
      "rawMarkdown": "Can you share private/public LB for your single yolov5 model? Thank you <3 ",
      "votes": 1,
      "replies": [
        {
          "id": 1257790,
          "postDate": "2021-03-31T05:24:38.527Z",
          "content": "<p>The public scores for most of my single yolov5 models (after 2 class filter) are around 0.2-0.24 and the private scores for most of them are around 0.23-0.24.</p>",
          "rawMarkdown": "The public scores for most of my single yolov5 models (after 2 class filter) are around 0.2-0.24 and the private scores for most of them are around 0.23-0.24.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257711,
      "postDate": "2021-03-31T03:46:29.927Z",
      "content": "<p>Congrats my friend. Can I ask about the score improvement when you apply iou=0.4 for those classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) instead of the 0.5 one ?</p>",
      "rawMarkdown": "Congrats my friend. Can I ask about the score improvement when you apply iou=0.4 for those classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) instead of the 0.5 one ?",
      "votes": 1,
      "replies": [
        {
          "id": 1257737,
          "postDate": "2021-03-31T04:20:04.720Z",
          "content": "<p>Thank you! The highest public score I got before I separated the iou was 0.292 and the public score after I separated the iou was 0.31. For private leaderboard, the best ensemble with separated iou achieved only slightly better than the best ensemble without separated iou (0.304 vs 0.295). However, the best ensemble without separated iou I used a bigger skip_box_thr so it might be the factor.</p>",
          "rawMarkdown": "Thank you! The highest public score I got before I separated the iou was 0.292 and the public score after I separated the iou was 0.31. For private leaderboard, the best ensemble with separated iou achieved only slightly better than the best ensemble without separated iou (0.304 vs 0.295). However, the best ensemble without separated iou I used a bigger skip_box_thr so it might be the factor.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257683,
      "postDate": "2021-03-31T03:17:36.987Z",
      "content": "<p>Congrats on solo Gold medal and special prize (nhìn tên của ông chắc người Việt :V), I notice that the top solutions are the combination of various strong models using WBF. Your postprocessing steps are very interesting to me, especially merge boxes with different IOU threshold </p>",
      "rawMarkdown": "Congrats on solo Gold medal and special prize (nhìn tên của ông chắc người Việt :V), I notice that the top solutions are the combination of various strong models using WBF. Your postprocessing steps are very interesting to me, especially merge boxes with different IOU threshold ",
      "votes": 1,
      "replies": [
        {
          "id": 1257686,
          "postDate": "2021-03-31T03:20:14.563Z",
          "content": "<p>Cảm ơn :))</p>",
          "rawMarkdown": "Cảm ơn :))",
          "votes": 1
        }
      ]
    },
    {
      "id": 1257677,
      "postDate": "2021-03-31T03:11:41.593Z",
      "content": "<p><a href=\"https://www.kaggle.com/kc3222\" target=\"_blank\">@kc3222</a> Congratulations on Gold Finish and Thanks for sharing your approach</p>",
      "rawMarkdown": "@kc3222 Congratulations on Gold Finish and Thanks for sharing your approach",
      "votes": 1,
      "replies": [
        {
          "id": 1257689,
          "postDate": "2021-03-31T03:21:00.463Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        }
      ]
    },
    {
      "id": 1257687,
      "postDate": "2021-03-31T03:20:38.050Z",
      "content": "<p>Congrats on 10th place <a href=\"https://www.kaggle.com/kc3222\" target=\"_blank\">@kc3222</a> and thanks for sharing the writeup </p>",
      "rawMarkdown": "Congrats on 10th place @kc3222 and thanks for sharing the writeup ",
      "votes": 2,
      "replies": [
        {
          "id": 1257690,
          "postDate": "2021-03-31T03:21:34.993Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        }
      ]
    },
    {
      "id": 1257830,
      "postDate": "2021-03-31T06:12:29.063Z",
      "content": "<p>Congrats bro</p>",
      "rawMarkdown": "Congrats bro",
      "votes": 1,
      "replies": [
        {
          "id": 1258291,
          "postDate": "2021-03-31T14:11:46.617Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        }
      ]
    },
    {
      "id": 1258229,
      "postDate": "2021-03-31T13:15:06.307Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 1258292,
          "postDate": "2021-03-31T14:11:59.373Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1258394,
      "author_name": "Hoàng Gia Minh",
      "author_url": "",
      "post_date": "2021-03-31T15:15:31.703000",
      "content": "<p>Congrats my friend. I am a kind of a newbie in this field, could you share how to ensemble the multi-model of Yolov5?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258451,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T16:06:37.680000",
          "content": "<p>Thank you! To ensemble the results, I predicted the test set using each individual model and formatted the predictions to the correct input for weighted boxes fusion. You can see the format in this github: <a href=\"https://github.com/ZFTurbo/Weighted-Boxes-Fusion\" target=\"_blank\">https://github.com/ZFTurbo/Weighted-Boxes-Fusion</a></p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257924,
      "author_name": "Awsaf",
      "author_url": "",
      "post_date": "2021-03-31T08:10:31.120000",
      "content": "<p>Great to be part of it 😀</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258299,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:14:06.167000",
          "content": "<p>Thank you very much! I couldn't have done it without your work.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257869,
      "author_name": "Selman",
      "author_url": "",
      "post_date": "2021-03-31T06:52:19.227000",
      "content": "<p>Congratulations. Thanks for sharing your experience.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258300,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:14:17.163000",
          "content": "<p>Thank you!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257854,
      "author_name": "corochann",
      "author_url": "",
      "post_date": "2021-03-31T06:38:20.593000",
      "content": "<p>Congrats <a href=\"https://www.kaggle.com/kc3222\" target=\"_blank\">@kc3222</a> for solo gold! and thank you for utilizing my notebook ;)</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258301,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:15:10.173000",
          "content": "<p>Thank you! Your notebooks are really detailed and helpful.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1257844,
      "author_name": "David",
      "author_url": "",
      "post_date": "2021-03-31T06:26:06.347000",
      "content": "<p>Hi Congrats, Can I ask what is the best CV/LB of single yolov5 model did you get, and what about  CV/LB after ensembling 5 yolov5 models. Thank you</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258309,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:20:01.423000",
          "content": "<p>Thank you! The best CV/LB of a single yolov5 model I got were 0.41 and 0.24. I didn't test the ensemble of the final 5 yolov5 models that I used because I decided to trust my CV. The ensemble with only yolov5 I tested is around 0.23 (both public and private).</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1258408,
          "author_name": "David",
          "author_url": "",
          "post_date": "2021-03-31T15:24:24.187000",
          "content": "<p>I didnt know why my ensemble model getting worse, one of my best fold with yolov4-p5 is around 0.5/0.238/0.256 for CV/LB/PV,,,,, but when I ensemble them LB increased to 0.274 but PV reduced to 0.231.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1257836,
      "author_name": "Wonho Song",
      "author_url": "",
      "post_date": "2021-03-31T06:19:49.433000",
      "content": "<p>Thanks for sharing! <br>\nI wonder one things that what is the single/ensemble score of VFNet? Also did you use mmdetection's default vfnet config file?<br>\nCongrats a lot :)</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258314,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:23:56.667000",
          "content": "<p>The single scores of my VFNet models are about 0.23-0.24 for both public and private leaderboards. I didn't test the ensemble of only VFNets. Aside the augmentations that I mentioned, the lr I used is 0.01 and other settings are default.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257772,
      "author_name": "HungNT",
      "author_url": "",
      "post_date": "2021-03-31T04:57:08.410000",
      "content": "<p>Can you share private/public LB for your single yolov5 model? Thank you &lt;3 </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1257790,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T05:24:38.527000",
          "content": "<p>The public scores for most of my single yolov5 models (after 2 class filter) are around 0.2-0.24 and the private scores for most of them are around 0.23-0.24.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257711,
      "author_name": "Liam Nguyen",
      "author_url": "",
      "post_date": "2021-03-31T03:46:29.927000",
      "content": "<p>Congrats my friend. Can I ask about the score improvement when you apply iou=0.4 for those classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) instead of the 0.5 one ?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1257737,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T04:20:04.720000",
          "content": "<p>Thank you! The highest public score I got before I separated the iou was 0.292 and the public score after I separated the iou was 0.31. For private leaderboard, the best ensemble with separated iou achieved only slightly better than the best ensemble without separated iou (0.304 vs 0.295). However, the best ensemble without separated iou I used a bigger skip_box_thr so it might be the factor.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257683,
      "author_name": "Phat Tran",
      "author_url": "",
      "post_date": "2021-03-31T03:17:36.987000",
      "content": "<p>Congrats on solo Gold medal and special prize (nhìn tên của ông chắc người Việt :V), I notice that the top solutions are the combination of various strong models using WBF. Your postprocessing steps are very interesting to me, especially merge boxes with different IOU threshold </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1257686,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T03:20:14.563000",
          "content": "<p>Cảm ơn :))</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1257677,
      "author_name": "Tensor Girl",
      "author_url": "",
      "post_date": "2021-03-31T03:11:41.593000",
      "content": "<p><a href=\"https://www.kaggle.com/kc3222\" target=\"_blank\">@kc3222</a> Congratulations on Gold Finish and Thanks for sharing your approach</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1257689,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T03:21:00.463000",
          "content": "<p>Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1257687,
      "author_name": "KhanhVD",
      "author_url": "",
      "post_date": "2021-03-31T03:20:38.050000",
      "content": "<p>Congrats on 10th place <a href=\"https://www.kaggle.com/kc3222\" target=\"_blank\">@kc3222</a> and thanks for sharing the writeup </p>",
      "votes": 2,
      "replies": [
        {
          "id": 1257690,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T03:21:34.993000",
          "content": "<p>Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1257830,
      "author_name": "( ͡° ͜ʖ ͡°)",
      "author_url": "",
      "post_date": "2021-03-31T06:12:29.063000",
      "content": "<p>Congrats bro</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1258291,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:11:46.617000",
          "content": "<p>Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1258229,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-03-31T13:15:06.307000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1258292,
          "author_name": "Kiet Chu",
          "author_url": "",
          "post_date": "2021-03-31T14:11:59.373000",
          "content": "<p>Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1257671": "Hello! Congratulations to all the winners. I am very excited to be in top 10 as this was my first competition on Kaggle. Thanks to @awsaf49 @corochann @dschettler8845 @sreevishnudamodaran @quillio and @gauravsingh1 for their amazing public notebooks. Thanks to Vingroup Big Data Institute and Kaggle for organizing this competition.\n\n**TLDR**\n- I used weighted boxes fusion (WBF) by @zfturbo to preprocess the input.\n- I used an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 6 VFNet models.\n- I used WBF to ensemble the outputs.\n- Source code: https://github.com/kc3222/Kaggle/tree/main/VinBigDataChestXRayAbnormalitiesDetection\n\n**Models**\n- 5 Yolov5 models trained on 768x768 images (5 folds) based on:\nhttps://www.kaggle.com/awsaf49/vinbigdata-cxr-ad-yolov5-14-class-train\n- 1 FasterRCNN model trained based on:\nhttps://www.kaggle.com/corochann/vinbigdata-detectron2-train\n- 6 VFNetmodels trained (5 folds + 1 random split) based on:\nhttps://www.kaggle.com/gauravsingh1/mmdet-pytorch-framework-training-fasterrcnn-base\n- I tried to train some classification models but none of them provides a better score than the classification by @awsaf49 so I decided to stick with their classification.\n\n**Preprocess**\n- I applied WBF with iou=0.5 to the base bounding boxes.\n\n**Training Methods**\n- For yolov5, I trained the base models with hyp.scratch.yaml for 50 epochs and finetune them with hyp.finetune.yaml for another 50 epochs (both of these hyperparameter settings are default in yolov5).\n- For Faster RCNN, I trained the model based on the mentioned public notebook.\n- For VFNet, I trained each model for 15 epochs with horizontal flip, random brightness contrast and slight rotation augmentations.\n\n**Postprocess Strategy**\n- The ensemble technique I used is WBF with skip_box_threshold=0.3. The threshold is chosen based on the best public scores.\n- The weight of each model is the mAP50 score on respective validation set of each model.\n- Based on the input bounding boxes, 5 classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) have less than 1.5 bounding boxes per image on average and other classes have about 2 bounding boxes per image on average. Therefore, I decided to ensemble bounding boxes of the mentioned classes with iou = 0.4 (to reduce the number of boxes) and bounding boxes of other classes with iou = 0.5.\n- The classification predictions are used on all VFNet models, Faster RCNN model and two Yolov5 models. Three yolov5 models are unfiltered as some classifications are wrong and yolov5 models produce relative small amount of bounding boxes even if the image is normal.\n\n**Side note**\n- All submissions that I used to get my public scores are an ensemble of 5 Yolov5 models, 1 FasterRCNN model and 1 VFNet model. Most of them also get high private scores (0.3-0.304). I didn't choose any of them because I thought that they would generalize worse than an ensemble of more models. I think that finding the balance between the number of models and the number of bounding boxes would result in a better score.",
    "1258394": "Congrats my friend. I am a kind of a newbie in this field, could you share how to ensemble the multi-model of Yolov5?",
    "1257924": "Great to be part of it 😀",
    "1257869": "Congratulations. Thanks for sharing your experience.",
    "1257854": "Congrats @kc3222 for solo gold! and thank you for utilizing my notebook ;)",
    "1257844": "Hi Congrats, Can I ask what is the best CV/LB of single yolov5 model did you get, and what about  CV/LB after ensembling 5 yolov5 models. Thank you",
    "1257836": "Thanks for sharing! \nI wonder one things that what is the single/ensemble score of VFNet? Also did you use mmdetection's default vfnet config file?\nCongrats a lot :)",
    "1257772": "Can you share private/public LB for your single yolov5 model? Thank you <3 ",
    "1257711": "Congrats my friend. Can I ask about the score improvement when you apply iou=0.4 for those classes (Aortic enlargement, Atelectasis, Cardiomegaly, Consolidation and Pneumothorax) instead of the 0.5 one ?",
    "1257683": "Congrats on solo Gold medal and special prize (nhìn tên của ông chắc người Việt :V), I notice that the top solutions are the combination of various strong models using WBF. Your postprocessing steps are very interesting to me, especially merge boxes with different IOU threshold ",
    "1257677": "@kc3222 Congratulations on Gold Finish and Thanks for sharing your approach",
    "1257687": "Congrats on 10th place @kc3222 and thanks for sharing the writeup ",
    "1257830": "Congrats bro",
    "1258229": ""
  }
}