首页|基于YOLO v7-ST-ASFF的复杂果园环境下苹果成熟度检测方法

基于YOLO v7-ST-ASFF的复杂果园环境下苹果成熟度检测方法

扫码查看
针对复杂果园环境下目标检测算法参数量大、鲁棒性差等问题,本文提出一种改进的YOLO v7网络模型用于苹果成熟度(未成熟、半成熟、成熟)检测.以YOLO v7为基线网络,在特征提取结构中引入窗口多头自注意力机制(Swin transformer,ST),极大地降低网络参数量与计算量;为提高模型对远景图像中小目标的检测能力,在特征融合结构中引入自适应空间特征融合(Adaptively spatial feature fusion,ASFF)模块优化Head部分,有效利用图像的浅层特征和深层特征,加强特征尺度不变性;采用WIoU(Wise intersection over union)代替原始CIoU(Complete intersection over union)损失函数,在提高检测准确率的同时加快模型收敛速度.试验结果表明,本文改进的YOLO v7-ST-ASFF模型在苹果图像测试集上的检测速度和准确率均有显著提高,不同成熟度检测精确率、召回率和平均精度均值可达 92.5%、84.2%和 93.6%,均优于 Faster R-CNN、SSD、YOLO v3、YOLO v5、YOLO v7 以及 YOLO v8目标检测模型;针对多目标、单目标、顺光、逆光、远景、近景以及套袋、未套袋苹果目标的检测效果都较好;本文网络模型内存占用量为53.4 MB,模型平均检测时间(Average detection time,ADT)为45 ms,均优于其他目标检测模型.改进的YOLO v7-ST-ASFF模型能够满足复杂果园环境下苹果目标的检测,可为果蔬机器人自动化采摘提供技术支撑.
Maturity Detection of Apple in Complex Orchard Environment Based on YOLO v7-ST-ASFF
In response to large number of parameters and poor robustness of object detection algorithms in complex orchard environment,an improved YOLO v7 network for apple maturity(immature,semimature,mature)detection was proposed.With YOLO v7 as the baseline network,a window multi-head self-attention mechanism(Swin transformer,ST)was adopted into the feature extraction structure to greatly reduce the parameters and computational complexity.In order to improve the ability of the model for detecting small targets in distant images,adaptively spatial feature fusion(ASFF)module was adopted into the feature fusion structure to optimize the Head part,effectively utilizing shallow and deep features and enhancing the performance of the feature scale invariance.Wise intersection over union(WIoU)was used to replace the original complete intersection over union(CIoU)loss function,thus accelerating the convergence speed and detection accuracy.The experimental results showed that the improved YOLO v7-ST-ASFF model had significantly improved the detection speed and accuracy on the test set of the apple images.The average detection precision,recall,mean average precision(mAP)for different maturity levels can reach 92.5%,84.2%and 93.6%,all of which were better than that of Faster R-CNN,SSD,YOLO v3,YOLO v5,YOLO v7 and YOLO v8 object detection models.The detection effects were good for multi,single,front-light,backlight,distant and close targets,as well as bagged and unpacked targets.The size of the model was 53.4 MB,and the ADT was 45 ms,which was also better than that of other models.The improved YOLO v7-ST-ASFF model can meet the detection of apple targets in complex orchard environment,providing effective exploration for automated fruit and vegetable picking by robots.

applematurity detectioncomplex orchard environmentYOLO v7STASFF

苗荣慧、李港澳、黄宗宝、李志伟、杜慧玲

展开 >

山西农业大学信息科学与工程学院,太谷 030801

山西农业大学农业工程学院,太谷 030801

山西农业大学基础部,太谷 030801

苹果 成熟度检测 复杂果园环境 YOLO v7 窗口多头自注意力机制 ASFF

财政部和农业农村部:国家现代农业产业技术体系建设项目中央引导地方科技发展资金项目山西省谷子现代农业产业技术体系建设项目山西省重点研发重大项目山西省基础研究计划项目

CARS-06-14.5-A21YDZJSX20231A0422023CYJSTX04-042022ZDYF119202203021212428

2024

农业机械学报
中国农业机械学会 中国农业机械化科学研究院

农业机械学报

CSTPCD北大核心
影响因子:1.904
ISSN:1000-1298
年,卷(期):2024.55(6)