中国农业大学学报2026,Vol.31Issue(2):192-204,13.DOI:10.11841/j.issn.1007-4333.2026.02.17
基于改进YOLOv5s的玉米田间杂草检测方法
Corn field weed detection method based on improved YOLOv5s
摘要
Abstract
To address the challenges of insufficient real-time performance,complex model structures,low detection accuracy,and difficulties in mobile deployment for seedling and weed detection in maize fields,this study proposes an improved YOLOv5s-based weed detection method.A lightweight GhostNetV3 module was embedded to reduce computational cost and parameter size to accelerate inference speed and meet mobile deployment requirements.A coordinate attention(CA)mechanism was introduced into the backbone feature extraction network to enhance the representation of effective features by strengthening spatial information while suppressing irrelevant interference,thus improving detection accuracy.Furthermore,the efficient intersection over union(EIoU)loss was adopted to replace the traditional generalized intersection over union(GIoU)loss,improving bounding box regression precision,convergence efficiency,and localization accuracy.Data augmentation techniques were also applied to increase the diversity of training samples,effectively alleviating the problems of insufficient data and complex background interference,and enhancing model robustness.Experimental results demonstrate that the proposed method significantly improves the performance in maize field weed detection.Compared with the baseline YOLOv5s model,the precision,recall,and mean average precision of the proposed method increased by 3.7%,7.7%,and 3.4%,and reached 95.9%,85.8%,and 88.6%,respectively.Its floating-point operations,parameter size,and model size were reduced by 54.3%,53.9%,and 50%.These results indicate that the proposed method achieves both lightweight and high efficiency while maintaining detection accuracy.关键词
杂草检测/轻量化/注意力机制/损失函数/图像识别Key words
weed detection/lightweight/attention mechanism/loss function/image recognition分类
信息技术与安全科学引用本文复制引用
王宁,尚忠,陈康,吕昊暾,贾麟,姚渝..基于改进YOLOv5s的玉米田间杂草检测方法[J].中国农业大学学报,2026,31(2):192-204,13.基金项目
保护性耕作与沃土耕层构建新装备研制与应用(2024YFD1500405) (2024YFD1500405)
京郊农业生产规模化作业配套智能化管控关键技术研究(2025年度)(NY2502290125) (2025年度)