Approach
Our solution is a very standard object detection workflow. We experimented with a new SOTA model that was launched whilst the competition was going on.
- Model: We make use of rfdetr, a new SOTA real-time object detection model released by roboflow, that supports ONNX deployment natively.
- Data preparation(data-preparation.ipynb):We split the dataset into train and validation sets using StratifiedGroupKFold with k of 10. We use fold 0 for validation and the other folds for training.
We convert our split dataset into COCO format as required by the rfdetr
- Training(rfdetr-training.ipynb): We trained the rfdetr-large variant for 9 epochs using the following configuration: epochs: 9, batch size: 2, grad_accum_steps: 8, lr: 1e-4, resolution: 448
- Inference(rfdetr-inference.ipynb): RfDetr produces 2 checkpoints: regular weights and EMA-based weights. We made use of the EMA-based weights as those have better performance locally and on the leaderboard. We used a low confidence threshold of 0.02
- Ensembling(wbf.ipynb): We use wbf on the output from the inference notebook. We made use of the ensemble-boxes framework with the following parameters:conf_type: 'max, skip_box_thr: 0.0001, iou_thr: 0.6
Everything is explained in more details in the repo below:
Code Repo: https://github.com/DurojaiyeAbisoye/zindi-amini-cocoa-detection-challenge-4th-place-solution
PS: Thanks to others for also posting their solutions we've learned a couple of new approaches.
Thanks bro for sharing 🤝
Thanks for sharing! Nice that there is now another object detection framework that is easy to use. Also nice that it comes with EMA. Another tool to add in the toolbox for sure.
It also seems to have way faster convergence than most models, or at least that was the case in this competition.
More models to strap on! Thank you for sharing @Bisoye
Congrats @Bisoye