HAD-YOLO: An Accurate and Effective Weed Detection Model Based on Improved YOLOV5 Network - Long Deng; Zhonghua Miao; Xueguan Zhao; Shuo Yang; Yuanyuan Gao; Changyuan Zhai; Chunjiang Zhao (Agronomy)
Weeds significantly impact crop yields and quality, necessitating strict control. Effective weed identification is essential to precision weeding in the field. Existing detection methods struggle with the inconsistent size scales of weed targets and the issue of small targets, making it difficult to achieve efficient detection, and they are unable to satisfy both the speed and accuracy requirements for detection at the same time. Therefore, this study, focusing on three common types of weeds in the field—Amaranthus retroflexus, Eleusine indica, and Chenopodium—proposes the HAD-YOLO model. With the purpose of improving the model’s capacity to extract features and making it more lightweight, this algorithm employs the HGNetV2 as its backbone network. The Scale Sequence Feature Fusion Module (SSFF) and Triple Feature Encoding Module (TFE) from the ASF-YOLO are introduced to improve the model’s capacity to extract features across various scales, and on this basis, to improve the model’s capacity to detect small targets, a P2 feature layer is included. Finally, a target detection head with an attention mechanism, Dynamic head (Dyhead), is utilized to improve the detection head’s capacity for representation. Experimental results show that on the dataset collected in the greenhouse, the mAP for weed detection is 94.2%; using this as the pre-trained weight, on the dataset collected in the field environment, the mAP for weed detection is 96.2%, and the detection FPS is 30.6. Overall, the HAD-YOLO model has effectively addressed the requirements for accurate weed identification, offering both theoretical and technical backing for automatic weed control. Future efforts will involve collecting more weed data from various agricultural field scenarios to validate and enhance the generalization capabilities of the HAD-YOLO model.