首页|基于改进YOLO v7轻量化模型的自然果园环境下苹果识别方法

基于改进YOLO v7轻量化模型的自然果园环境下苹果识别方法

扫码查看
针对自然果园环境下苹果果实识别中,传统的目标检测算法往往很难在检测模型的检测精度、速度和轻量化方面实现平衡,提出了一种基于改进YOLO v7的轻量化苹果检测模型.首先,引入部分卷积(Partial convolution,PConv)替换多分支堆叠模块中的部分常规卷积进行轻量化改进,以降低模型的参数量和计算量;其次,添加轻量化的高效通道注意力(Efficient channel attention,ECA)模块以提高网络的特征提取能力,改善复杂环境下遮挡目标的错检漏检问题;在模型训练过程中采用基于麻雀搜索算法(Sparrow search algorithm,SSA)的学习率优化策略来进一步提高模型的检测精度.试验结果显示:相比于YOLO v7原始模型,改进后模型的精确率、召回率和平均精度分别提高4.15、0.38、1.39个百分点,其参数量和计算量分别降低22.93%和27.41%,在GPU和CPU上检测单幅图像的平均用时分别减少0.003 s和0.014 s.结果表明,改进后的模型可以实时准确地识别复杂果园环境中的苹果,模型参数量和计算量较小,适合部署于苹果采摘机器人的嵌入式设备上,为实现苹果的无人化智能采摘奠定了基础.
Lightweight Apple Recognition Method in Natural Orchard Environment Based on Improved YOLO v7 Model
In the task of apple recognition in natural orchard environments,it is difficult for traditional object detection algorithms to achieve a balance between the accuracy,speed,and lightweight of the detection model.Therefore,a lightweight apple detection model based on improved YOLO v7 model was proposed.Firstly,partial convolution(PConv)was introduced in the multi branch stacking module to replace regular convolution,in order to reduce the parameter and computation of the model.Then a lightweight efficient channel attention(ECA)module was introduced to enhance the feature extraction ability and improve the problem of false and missed detection of occluded targets in complex environments.Finally,a learning rate optimization strategy based on sparrow search algorithm(SSA)was adopted in model training to further increase the detection accuracy of the model.The experimental results showed that compared with the original YOLO v7 model,the precision,recall,and average accuracy of the improved model was raised by 4.15 percentage points,0.38 percentage points and 1.39 percentage points respectively;the number of parameters and computations were decreased by 22.93%and 27.41%,respectively;and the average time to detect each image under GPU and CPU was decreased by 0.003 s and 0.014 s,respectively.The results indicated that the improved model can quickly and accurately detect apple fruits in natural orchard environments,and the number of parameters and computations were less,which was suitable to be deployed on the embedded devices of apple harvesting robots,and laying the foundation for unmanned intelligent apple picking.

apple recognitionnatural orchard environmentsYOLO v7PConvefficient channel attention modulesparrow search algorithm

张震、周俊、江自真、韩宏琪

展开 >

南京农业大学工学院,南京 210031

苹果识别 自然果园环境 YOLO v7 PConv 高效通道注意力机制 麻雀搜索算法

江苏省重点研发计划国家自然科学基金

BE201737031471419

2024

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

农业机械学报

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