Plants (Jul 2024)
Improvement of the YOLOv8 Model in the Optimization of the Weed Recognition Algorithm in Cotton Field
Abstract
Due to the existence of cotton weeds in a complex cotton field environment with many different species, dense distribution, partial occlusion, and small target phenomena, the use of the YOLO algorithm is prone to problems such as low detection accuracy, serious misdetection, etc. In this study, we propose a YOLOv8-DMAS model for the detection of cotton weeds in complex environments based on the YOLOv8 detection algorithm. To enhance the ability of the model to capture multi-scale features of different weeds, all the BottleNeck are replaced by the Dilation-wise Residual Module (DWR) in the C2f network, and the Multi-Scale module (MSBlock) is added in the last layer of the backbone. Additionally, a small-target detection layer is added to the head structure to avoid the omission of small-target weed detection, and the Adaptively Spatial Feature Fusion mechanism (ASFF) is used to improve the detection head to solve the spatial inconsistency problem of feature fusion. Finally, the original Non-maximum suppression (NMS) method is replaced with SoftNMS to improve the accuracy under dense weed detection. In comparison to YOLO v8s, the experimental results show that the improved YOLOv8-DMAS improves accuracy, recall, mAP0.5, and mAP0.5:0.95 by 1.7%, 3.8%, 2.1%, and 3.7%, respectively. Furthermore, compared to the mature target detection algorithms YOLOv5s, YOLOv7, and SSD, it improves 4.8%, 4.5%, and 5.9% on mAP0.5:0.95, respectively. The results show that the improved model could accurately detect cotton weeds in complex field environments in real time and provide technical support for intelligent weeding research.
Keywords