摘要
针对玉米田间环境下幼苗与杂草检测实时性不足、识别模型结构复杂、识别精度欠佳及移动端部署困难等问题,提出一种基于改进YOLOv5s的玉米田间杂草检测方法。通过嵌入轻量化的GhostNetV3模块减少模型的计算量和参数量,提升运行速率以适配移动端部署要求;在主干特征提取网络中引入CA(Coordinate attention)注意力机制,通过空间维度特征强化提升有效特征表达能力,在强化特征提取能力的同时,抑制无关信息干扰,进而提升模型的检测精度;引入高效交并比损失函数EIoU(Efficient intersection over union)替代模型传统的GIoU(Generalized intersection over union),通过改进边界框回归策略提升目标定位精度、收敛效率和回归精度;采用数据增强技术拓展训练样本的多样性,有效解决样本数据不足和复杂背景干扰问题,进一步提升模型的鲁棒性。试验结果表明,该方法在玉米田杂草检测任务中性能显著提升,相比基准模型,精确率、召回率和平均精度分别提高3.7%、7.7%和3.4%,达到95.9%、85.8%、88.6%,浮点运算量、参数量和模型大小分别减少了54.3%、53.9%、50%,在保证检测精度的前提下实现了模型的轻量化与高效性。
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.
作者
王宁
尚忠
陈康
吕昊暾
贾麟
姚渝
WANG Ning;SHANG Zhong;CHEN Kang;LYU Haotun;JIA Lin;YAO Yu(College of Engineering,China Agricultural University,Beijing 100083,China;Yantai Agricultural Technology Extension Center,Yantai 264001,China)
出处
《中国农业大学学报》
北大核心
2026年第2期192-204,共13页
Journal of China Agricultural University
基金
保护性耕作与沃土耕层构建新装备研制与应用(2024YFD1500405)
京郊农业生产规模化作业配套智能化管控关键技术研究(2025年度)(NY2502290125)。
关键词
杂草检测
轻量化
注意力机制
损失函数
图像识别
weed detection
lightweight
attention mechanism
loss function
image recognition