{
  "id": 674466,
  "title": "#8 Yolo and Faster R-CNN Ensemble",
  "url": "/competitions/dal-shemagh-detection-challenge/writeups/8-yolo-and-faster-r-cnn-ensemble",
  "author_name": "",
  "post_date": "2026-02-20T15:40:41.530Z",
  "votes": 4,
  "comment_count": 3,
  "views": 0,
  "content": "<h1>Summary</h1>\n<p>For object detection I'm using a weighted fusion ensemble of yolo11s and FasterRCNN. For the classification task I'm using logistic regression on BeIT embeddings of the pseudolabeled test dataset.</p>\n<h1>Object detection</h1>\n<p>Ensembling several models is always a good approach:</p>\n<ul>\n<li><p>Yolo11s with training parameters (epochs=80, imgsz=640, batch=16, freeze=10, optimizer='AdamW', lr0=0.001667, momentum=0.9, warmup_epochs=6, warmup_momentum=0.5, box=10) and prediction parameters (iou=0.2, conf=1e-8, batch=16, augment=True). I used the very low value for conf because the competition metric doesn't punish submissions with lots of low-confidence false positives. The model detected 252600 objects.</p></li>\n<li><p>FasterRCNN with horizontal flip for augmentation, pretrained weights FasterRCNN_MobileNet_V3_Large_FPN_Weights, num_epochs=30, batch_size=16, box_score_thresh=1e-8, learning rate=0.00125, some warmup, linear learning rate decay to a tenth of the starting value, and stochastic weight averaging. With the low box_score_thresh, the model detected 13802 objects.</p>\n<p>Postprocessing:</p>\n<ul>\n<li>For the four images which are duplicated between train and test, replace the models' predictions by the ground truth and set the confidence to 0.9999</li>\n<li>As the models often detect two objects (partial shemaghs) where there should be only one, merge overlapping shemagh detections:</li></ul></li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2Fe310cb72ea53adfb16432888deb9798e%2Fmerge1.png?generation=1771601721174857&amp;alt=media\" alt=\"merge1\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2F60d3564b08a369d77e6a8a607700dcfd%2Fmerge2.png?generation=1771601734663470&amp;alt=media\" alt=\"merge2\"></p>\n<ul>\n<li>Weighted fusion ensemble of the two models</li>\n</ul>\n<h1>Classification</h1>\n<ol>\n<li>Pseudolabel the test dataset based on the yolo detections and a simple heuristic similar to what has been described by other competition participants</li>\n<li>Embed the test images with BEiT</li>\n<li>Classify the test dataset with logistic regression, tuning the threshold for maximum f1 in cross-validation. (As an alternative approach, an RBF kernel SVM could be used for classification with similar results).</li>\n</ol>\n<h1>Acknowledgment</h1>\n<p>I thank the organizers for preparing this interesting challenge, <a href=\"https://www.kaggle.com/hmnshudhmn24\" target=\"_blank\">@hmnshudhmn24</a> for the yolo notebook and <a href=\"https://www.kaggle.com/asahli\" target=\"_blank\">@asahli</a> for the weighted fusion ensemble notebook!</p>",
  "messages": [
    {
      "id": "3408432",
      "postDate": "02/20/2026 15:40:07",
      "content": "<h1>Summary</h1>\n<p>For object detection I'm using a weighted fusion ensemble of yolo11s and FasterRCNN. For the classification task I'm using logistic regression on BeIT embeddings of the pseudolabeled test dataset.</p>\n<h1>Object detection</h1>\n<p>Ensembling several models is always a good approach:</p>\n<ul>\n<li><p>Yolo11s with training parameters (epochs=80, imgsz=640, batch=16, freeze=10, optimizer='AdamW', lr0=0.001667, momentum=0.9, warmup_epochs=6, warmup_momentum=0.5, box=10) and prediction parameters (iou=0.2, conf=1e-8, batch=16, augment=True). I used the very low value for conf because the competition metric doesn't punish submissions with lots of low-confidence false positives. The model detected 252600 objects.</p></li>\n<li><p>FasterRCNN with horizontal flip for augmentation, pretrained weights FasterRCNN_MobileNet_V3_Large_FPN_Weights, num_epochs=30, batch_size=16, box_score_thresh=1e-8, learning rate=0.00125, some warmup, linear learning rate decay to a tenth of the starting value, and stochastic weight averaging. With the low box_score_thresh, the model detected 13802 objects.</p>\n<p>Postprocessing:</p>\n<ul>\n<li>For the four images which are duplicated between train and test, replace the models' predictions by the ground truth and set the confidence to 0.9999</li>\n<li>As the models often detect two objects (partial shemaghs) where there should be only one, merge overlapping shemagh detections:</li></ul></li>\n</ul>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2Fe310cb72ea53adfb16432888deb9798e%2Fmerge1.png?generation=1771601721174857&amp;alt=media\" alt=\"merge1\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2F60d3564b08a369d77e6a8a607700dcfd%2Fmerge2.png?generation=1771601734663470&amp;alt=media\" alt=\"merge2\"></p>\n<ul>\n<li>Weighted fusion ensemble of the two models</li>\n</ul>\n<h1>Classification</h1>\n<ol>\n<li>Pseudolabel the test dataset based on the yolo detections and a simple heuristic similar to what has been described by other competition participants</li>\n<li>Embed the test images with BEiT</li>\n<li>Classify the test dataset with logistic regression, tuning the threshold for maximum f1 in cross-validation. (As an alternative approach, an RBF kernel SVM could be used for classification with similar results).</li>\n</ol>\n<h1>Acknowledgment</h1>\n<p>I thank the organizers for preparing this interesting challenge, <a href=\"https://www.kaggle.com/hmnshudhmn24\" target=\"_blank\">@hmnshudhmn24</a> for the yolo notebook and <a href=\"https://www.kaggle.com/asahli\" target=\"_blank\">@asahli</a> for the weighted fusion ensemble notebook!</p>",
      "rawMarkdown": "# Summary\n\nFor object detection I'm using a weighted fusion ensemble of yolo11s and FasterRCNN. For the classification task I'm using logistic regression on BeIT embeddings of the pseudolabeled test dataset.\n\n# Object detection\n\nEnsembling several models is always a good approach:\n\n- Yolo11s with training parameters (epochs=80, imgsz=640, batch=16, freeze=10, optimizer='AdamW', lr0=0.001667, momentum=0.9, warmup_epochs=6, warmup_momentum=0.5, box=10) and prediction parameters (iou=0.2, conf=1e-8, batch=16, augment=True). I used the very low value for conf because the competition metric doesn't punish submissions with lots of low-confidence false positives. The model detected 252600 objects.\n\n- FasterRCNN with horizontal flip for augmentation, pretrained weights FasterRCNN_MobileNet_V3_Large_FPN_Weights, num_epochs=30, batch_size=16, box_score_thresh=1e-8, learning rate=0.00125, some warmup, linear learning rate decay to a tenth of the starting value, and stochastic weight averaging. With the low box_score_thresh, the model detected 13802 objects.\n\n Postprocessing:\n  - For the four images which are duplicated between train and test, replace the models' predictions by the ground truth and set the confidence to 0.9999\n  - As the models often detect two objects (partial shemaghs) where there should be only one, merge overlapping shemagh detections:\n\n![merge1](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2Fe310cb72ea53adfb16432888deb9798e%2Fmerge1.png?generation=1771601721174857&alt=media)\n\n![merge2](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2F60d3564b08a369d77e6a8a607700dcfd%2Fmerge2.png?generation=1771601734663470&alt=media)\n\n- Weighted fusion ensemble of the two models\n\n# Classification\n\n1. Pseudolabel the test dataset based on the yolo detections and a simple heuristic similar to what has been described by other competition participants\n2. Embed the test images with BEiT\n3. Classify the test dataset with logistic regression, tuning the threshold for maximum f1 in cross-validation. (As an alternative approach, an RBF kernel SVM could be used for classification with similar results).\n\n# Acknowledgment\n\nI thank the organizers for preparing this interesting challenge, @hmnshudhmn24 for the yolo notebook and @asahli for the weighted fusion ensemble notebook!",
      "votes": null
    },
    {
      "id": "3408792",
      "postDate": "02/21/2026 10:18:16",
      "content": "<p>Nice work! And, I noticed you chose Faster R-CNN, which is a relatively older model. What was your reasoning for selecting it, and what advantages does it offer?</p>",
      "rawMarkdown": "Nice work! And, I noticed you chose Faster R-CNN, which is a relatively older model. What was your reasoning for selecting it, and what advantages does it offer?",
      "votes": null
    },
    {
      "id": "3408912",
      "postDate": "02/21/2026 16:12:26",
      "content": "<p>Nice work!!</p>",
      "rawMarkdown": "Nice work!!",
      "votes": null
    },
    {
      "id": "3408998",
      "postDate": "02/21/2026 19:56:29",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/act18l\" target=\"_blank\">@act18l</a>, it was a spontaneous decision, and it probably was the wrong decision: my yolo model has a much better score than my Faster R-CNN model. Maybe Faster R-CNN has the advantage that it can be trained in less time than a transformer model.</p>",
      "rawMarkdown": "Hi @act18l, it was a spontaneous decision, and it probably was the wrong decision: my yolo model has a much better score than my Faster R-CNN model. Maybe Faster R-CNN has the advantage that it can be trained in less time than a transformer model.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3408792,
      "author_name": "act18l",
      "author_url": "",
      "post_date": "02/21/2026 10:18:16",
      "content": "<p>Nice work! And, I noticed you chose Faster R-CNN, which is a relatively older model. What was your reasoning for selecting it, and what advantages does it offer?</p>",
      "votes": null,
      "replies": [
        {
          "id": 3408998,
          "author_name": "ambrosm",
          "author_url": "",
          "post_date": "02/21/2026 19:56:29",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/act18l\" target=\"_blank\">@act18l</a>, it was a spontaneous decision, and it probably was the wrong decision: my yolo model has a much better score than my Faster R-CNN model. Maybe Faster R-CNN has the advantage that it can be trained in less time than a transformer model.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3408912,
      "author_name": "bhaweshsinha07",
      "author_url": "",
      "post_date": "02/21/2026 16:12:26",
      "content": "<p>Nice work!!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3408432": "# Summary\n\nFor object detection I'm using a weighted fusion ensemble of yolo11s and FasterRCNN. For the classification task I'm using logistic regression on BeIT embeddings of the pseudolabeled test dataset.\n\n# Object detection\n\nEnsembling several models is always a good approach:\n\n- Yolo11s with training parameters (epochs=80, imgsz=640, batch=16, freeze=10, optimizer='AdamW', lr0=0.001667, momentum=0.9, warmup_epochs=6, warmup_momentum=0.5, box=10) and prediction parameters (iou=0.2, conf=1e-8, batch=16, augment=True). I used the very low value for conf because the competition metric doesn't punish submissions with lots of low-confidence false positives. The model detected 252600 objects.\n\n- FasterRCNN with horizontal flip for augmentation, pretrained weights FasterRCNN_MobileNet_V3_Large_FPN_Weights, num_epochs=30, batch_size=16, box_score_thresh=1e-8, learning rate=0.00125, some warmup, linear learning rate decay to a tenth of the starting value, and stochastic weight averaging. With the low box_score_thresh, the model detected 13802 objects.\n\n Postprocessing:\n  - For the four images which are duplicated between train and test, replace the models' predictions by the ground truth and set the confidence to 0.9999\n  - As the models often detect two objects (partial shemaghs) where there should be only one, merge overlapping shemagh detections:\n\n![merge1](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2Fe310cb72ea53adfb16432888deb9798e%2Fmerge1.png?generation=1771601721174857&alt=media)\n\n![merge2](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F7917824%2F60d3564b08a369d77e6a8a607700dcfd%2Fmerge2.png?generation=1771601734663470&alt=media)\n\n- Weighted fusion ensemble of the two models\n\n# Classification\n\n1. Pseudolabel the test dataset based on the yolo detections and a simple heuristic similar to what has been described by other competition participants\n2. Embed the test images with BEiT\n3. Classify the test dataset with logistic regression, tuning the threshold for maximum f1 in cross-validation. (As an alternative approach, an RBF kernel SVM could be used for classification with similar results).\n\n# Acknowledgment\n\nI thank the organizers for preparing this interesting challenge, @hmnshudhmn24 for the yolo notebook and @asahli for the weighted fusion ensemble notebook!",
    "3408792": "Nice work! And, I noticed you chose Faster R-CNN, which is a relatively older model. What was your reasoning for selecting it, and what advantages does it offer?",
    "3408912": "Nice work!!",
    "3408998": "Hi @act18l, it was a spontaneous decision, and it probably was the wrong decision: my yolo model has a much better score than my Faster R-CNN model. Maybe Faster R-CNN has the advantage that it can be trained in less time than a transformer model."
  },
  "source": "meta"
}