
This repo contains the source code of the 1st place solution for Global Wheat Detection Challenge. In this competition, you’ll detect wheat heads from outdoor images of wheat plants, including wheat datasets from around the globe. Below you can find a outline of how to reproduce my solution.


$ conda create -n wheat_env python=3.7.6
$ conda activate wheat_env
$ pip install -r requirements.txt
$ cd dataset
$ unzip spike-wheat.zip
$ unzip wheat2017.zip
./dataset folder structure should be:
dataset
├── sample_submission.csv
├── test
│ ├── 2fd875eaa.jpg
│ ├── ...
├── train
│ ├── 00333207f.jpg
│ ├── ...
├── trainset.csv
├── wheat2017
│ ├── wheat2017_0001.jpg
│ ├── ...
├── wheat2017.csv
├── spike-wheat
│ ├── spike0000.jpg
│ ├── ...
├── spike-wheat.csv
$ cd effdet-pretrained && bash download.sh && cd ..
$ python effdet_train.py --folds 0 1 2 3 4 --backbone ed7 --img-size 768 --batch-size 8 --workers 16 --use-amp True
$ python effdet_train.py --folds 1 3 --backbone ed7 --img-size 1024 --batch-size 4 --workers 16 --use-amp True
$ python effdet_train.py --folds 4 --backbone ed5 --img-size 512 --batch-size 20 --workers 16 --use-amp True
$ python effdet_train.py --folds 1 --backbone ed6 --img-size 640 --batch-size 12 --workers 16 --use-amp True
$ python faster_rcnn_fpn_train.py --folds 1 --backbone resnet152 --img-size 1024 --batch-size 20 --workers 16
python evaluate.py --folds 0 --network effdet --backbone ed7 --img-size 768 --batch-size 16 --workers 8
python evaluate.py --folds 1 --network fasterrcnn --backbone resnet152 --img-size 1024 --batch-size 16 --workers 8
| Network | image-size | Fold | Valid AP |
|---|---|---|---|
| EfficientDet-D7 | 768 | 0 | 0.710 |
| EfficientDet-D7 | 768 | 1 | 0.716 |
| EfficientDet-D7 | 768 | 2 | 0.707 |
| EfficientDet-D7 | 768 | 3 | 0.716 |
| EfficientDet-D7 | 768 | 4 | 0.713 |
| EfficientDet-D7 | 1024 | 1 | 0.718 |
| EfficientDet-D7 | 1024 | 3 | 0.720 |
| EfficientDet-D5 | 512 | 4 | 0.702 |
| EfficientDet-D6 | 640 | 1 | 0.716 |
| FasterRCNN-FPN-resnet152 | 1024 | 1 | 0.695 |
$ claude mcp add Global-Wheat-Dection-1st-Place \
-- python -m otcore.mcp_server <graph>