首页|基于改进YOLOv7的复杂环境下苹果目标检测

基于改进YOLOv7的复杂环境下苹果目标检测

扫码查看
采摘机器人在不稳定光照、果实多样性和树叶遮挡等复杂自然环境下识别苹果时,检测模型难以捕获关键特征,导致采摘效率和准确性较低。提出基于YOLOv7模型的针对复杂场景下苹果目标检测的改进算法。通过限制对比度自适应直方图均衡化算法增强苹果图像对比度,以减少背景干扰,增强目标轮廓清晰度;提出多尺度混合自适应注意力机制,通过特征解构与重构,协同整合空间和通道维度的注意力导向,优化多层次特征的长短距离建模,增强模型对苹果特征的提取能力与抗背景干扰能力;引入全维度动态卷积,通过精细化的注意力机制优化特征选择过程;增加检测头个数,解决小目标检测问题;采用Meta-ACON激活函数,优化特征提取过程中的关注度分配。结果表明,改进后的YOLOv7模型对苹果的平均检测准确率和召回率分别为85。7%、87。0%,相比于Faster R-CNN、SSD、YOLOv5、YOLOv7,平均检测精度分别提高了15。2、7。5、4。5、2。5个百分比,平均召回率分别提高了13。7、6。5、3。6、1。3个百分比。模型效果表现优异,为苹果生长监测及机械摘果研究提供了坚实的技术支撑。
Improved YOLOv7 based apple target detection in complex environment
Robotic harvesters face challenges in identifying apples under complex natural conditions such as unstable lighting,high fruit diversity,and severe leaf occlusion,which impedes the capture of key features,reducing harvesting efficiency and accuracy.An enhanced apple detection algorithm based on the YOLOv7 model for complex scenarios was proposed.A limited contrast adaptive histogram equalization technique was employed to enhance the contrast of apple images,reducing the background interference and clarifying the target contours.A multi-scale hybrid adaptive attention mechanism was introduced.The features were decomposed and reconstructed,and the spatial and channel attention directives were synergistically integrated to optimize multi-layer feature modeling over various distances,thereby boosting the model's capability to extract apple features and resist background noise.Full-dimensional dynamic convolution was implemented to refine the feature selection process through a meticulous attention mechanism.The number of detection heads was increased to address the challenges of detecting small targets.The Meta-ACON activation function was used to optimize the attention allocation during feature extraction process.Experimental results demonstrated that the improved YOLOv7 model,achieved average accuracy and recall rates of 85.7% and 87.0%,respectively.Compared to Faster R-CNN,SSD,YOLOv5,and the original YOLOv7,the average detection precision was improved by 15.2,7.5,4.5,and 2.5 percentage points,and the average recall was improved by 13.7,6.5,3.6,and 1.3 percentage points,respectively.The model exhibits exceptional performance,providing robust technical support for apple growth monitoring and mechanical harvesting research.

apple target detectionYOLOv7attention mechanismsmall target detectionactivation functionGrad-CAM

莫恒辉、魏霖静

展开 >

甘肃农业大学信息科学技术学院,甘肃兰州 730070

苹果目标检测 YOLOv7 注意力机制 小目标检测 激活函数 Grad-CAM

2024

浙江大学学报(工学版)
浙江大学

浙江大学学报(工学版)

CSTPCD北大核心
影响因子:0.625
ISSN:1008-973X
年,卷(期):2024.58(12)