Primary competition visual

Amini Cocoa Contamination Challenge

Helping Ghana
$7 000 USD
Completed (11 months ago)
Computer Vision
Object Detection
928 joined
255 active
Starti
Feb 14, 25
Closei
May 11, 25
Reveali
May 12, 25
User avatar
Bisoye
Federal University of Technology Akure
4th Place Solution
Notebooks · 1 Jun 2025, 12:07 · 5

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.

Discussion 5 answers
User avatar
Koleshjr
Multimedia university of kenya

Thanks bro for sharing 🤝

1 Jun 2025, 12:10
Upvotes 1
User avatar
nymfree

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.

1 Jun 2025, 12:22
Upvotes 2
User avatar
Bisoye
Federal University of Technology Akure

It also seems to have way faster convergence than most models, or at least that was the case in this competition.

User avatar
CodeJoe

More models to strap on! Thank you for sharing @Bisoye

Congrats @Bisoye

1 Jun 2025, 13:54
Upvotes 1