Weeds are among major threats to crop production including cotton. Traditional weed control that relies on broadcast, repeated application of herbicides, is facing challenges with managing herbicide-resistance of weeds while reducing impacts on environments. Machine vision (MV)-based weed control offers a promising weeding solution based on the recognition of weeds in images followed by localized, precision treatments for weed removal. Artificial intelligence (AI) through deep learning (DL) is emerging as a key driver to the development of MV technology for weed detection and control. To realize the potential of AI for weed control requires a systematic evaluation of DL models with large-scaled, ground-truthed weed datasets for weed detection. In this study, we present a novel benchmark DeepCottonWeeds (DCW), of DL techniques for weed detection tasks in cotton production systems. The DCW is extensible modular, and unified; it standardizes the process of weed recognition tasks by: 1) developing a scalable and diverse dataset, 2) modularizing DL implementations, and 3) unifying the evaluation protocol. A comprehensive benchmark of state-of-art deep learning algorithms for weed detection will be established. By leveraging the DCW pipeline, end users can readily focus on the development of robust deep learning models with automated data processing and experimental evaluations. Datasets and source codes will be made publicly available.
conda create -n cottonweeddetection python=3.8 -y
conda activate cottonweeddetection
pip install -r requirements.txt
python commons/vig2yolov5.py
python commons/yolov52coco.py
(You may need to partition the dataset first)python commons/pationing_dataset_yolov5.py --outputDir [USE ABOSULTE ADDRESS]/DCW/datasets/Dataset_final
, for example:
python commons/pationing_dataset_yolov5.py --outputDir /home/dong9/PycharmProjects/DCW/datasets/Dataset_final
Data_augmentation/data_augmentation_v1.py
datasets/Data_aug/
, one can use Data_augmentation/data_augmentation.py
to generate examples.python commons/dataset_analysis.py
.python commons/dataset_analysis_top12.py --imageDir datasets/Dataset_final/DATA_0/val
.yolov3.pt
, yolov3-spp.pt
and yolov3-tiny.pt
under the YOLOV3/ folder.train_cudax.sh
files. For instance, to run the 0st data folder, we can run:
bash -i train_cuda0.sh
.bash -i test0.sh
.The YOLO algorithms[1-6] used for our experiments are not maintained by us, please give credit to the authors of the YOLO algorithms[1-6].
The video demos can be accessed at [Video Demos]
If you find the models and or the dataset useful, consider citing the follow article:
Dang, F., Chen, D., Lu, Y., Li, Z., 2023. YOLOWeeds: A novel benchmark of YOLO object detectors for multi-class weed detection in cotton production systems. Computers and Electronics in Agriculture. https://doi.org/10.1016/j.compag.2023.107655.