Global-Wheat-Detection
An efficient PyTorch library for Global Wheat Detection using YOLOv5. The project is based on this Kaggle competition Global Wheat Detection (May-Aug 2020).
Here's a description of the prediction task:
In this competition, you’ll detect wheat heads from outdoor images of wheat plants, including wheat datasets from around the globe. Using worldwide data, you will focus on a generalized solution to estimate the number and size of wheat heads. To better gauge the performance for unseen genotypes, environments, and observational conditions, the training dataset covers multiple regions. You will use more than 3,000 images from Europe (France, UK, Switzerland) and North America (Canada). The test data includes about 1,000 images from Australia, Japan, and China.
Installation
-
Create a virtual environment via
conda
.conda create -n wheat_detection python=3.7 conda activate wheat_detection
-
Install
torch
andtorchvision
.conda install pytorch cudatoolkit=10.1 torchvision -c pytorch
-
Install requirements.
pip install -r requirements.txt
Dataset
An overview is available here: https://www.kaggle.com/c/global-wheat-detection/data.
Wheat heads were from various sources:
A few labeled images are as shown: (Blue bounding boxes):
I used the following command to obtain the data:
kaggle competitions download -c global-wheat-detection
refer to pre_precessing.ipynb to preprocess the dataset:
- Handled the noisy labels (too big/small boxes etc.)
- Stratified 5 fold split based on source
Get Started
Please refer to YOLOv5.
Results
Following are the results we got from output files while our model was training.
Here is the PR curve of our model:
Acknowledgement
We thank for the inspiration from YOLOv5 and SENet
If you like our work and use the models for your research, please star our work.