摘要
为实现复杂环境下刺梨果实的高精度、快速识别,针对果实重叠、枝叶遮挡、光照不均等非结构化环境因素以及现有模型检测准确率低、速度慢等问题,本研究在真实采摘场景下采集图像建立刺梨果实的样本数据集,并基于改进YOLOv8n提出了一种刺梨果实识别模型YOLOv8n-UCD。首先,引入UniRepLKNet卷积模块替换传统的C2f中的Bottleneck模块,增强了特征提取和目标定位的能力。其次,在模型中添加卷积块注意力模块(CBAM),并建立Head层Detect模块与Neck层部分Concat模块的连接,提高了模型对图像中目标区域的关注度。再次,引入Dynamic Head检测头模块,该检测头综合应用了尺度、空间和任务三种注意力机制,显著提升了对刺梨果实的检测性能。最后,采用基于辅助边框损失函数的Inner-IOU思想改进引入边界框回归的损失函数(MPDIoU),以Inner-MPDIoU代替原损失函数,增强了模型对困难样本的学习能力。实验结果表明,改进后的模型检测平均精度均值(mAP@0.5)和准确率分别为93.2%和90.4%,平均单张图片检测时间为136.8 ms,权重文件大小为8.2 MB,模型整体性能优于对比的7种主流目标检测算法模型(ResNet50、VGG、YOLOv3-tiny、YOLOv5n、YOLOv6n、YOLOv8n、YOLOv10n),可为刺梨果实的自动化采摘提供技术支持。
To achieve high-precision and rapid recognition of Rosa roxburghii in complex environments,addressing unstructured environmental factors such as fruit overlap,foliage occlusion and uneven lighting,as well as issues of low detection accuracy and slow speed in existing models,this study collected images in real-world picking scenarios to establish the sample dataset of R.roxburghii,and also proposed a R.roxburghii fruit recognition model named YOLOv8n-UCD based on improving YOLOv8n.Firstly,the UniRepLKNet convolu-tion module was introduced to replace the traditional Bottleneck module in C2f,enhancing the capabilities of feature extraction and target localization.Secondly,adding the Convolutional Block Attention Module(CBAM)to the model and establishing connections between the Detect module in the Head layer and some Concat modules in the Neck layer to improve the model’s attention to target regions in images.Thirdly,the Dy-namic Head detection module was integrated,which comprehensively applied three attention mechanisms(scale,spatial and task attention),significantly enhancing the R.roxburghii fruit detection performance.Fi-nally,the loss function for bounding box regression(MPDIoU)was improved using the Inner-IOU idea based on the auxiliary bounding box loss function,and replacing the original loss function with Inner-MPDIoU to strengthen the model’s ability to learn from complex samples.The experimental results showed that the im-proved model achieved a mean average precision(mAP@0.5)of 93.2%and an accuracy of 90.4%with an av-erage detection time of 136.8 ms per image and a weight file size of 8.2 MB.The overall performance of the proposed model outperformed seven mainstream comparative target detection algorithms(ResNet50,VGG,YOLOv3-tiny,YOLOv5n,YOLOv6n,YOLOv8n and YOLOv10n),providing technical support for the automa-ted picking of R.roxburghii.
作者
李云鹏
南新元
蔡鑫
梁胤杰
勾海光
Li Yunpeng;Nan Xinyuan;Cai Xin;Liang Yinjie;Gou Haiguang(College of Electrical Engineering,Xinjiang University,Urumqi 830017,China)
出处
《山东农业科学》
北大核心
2025年第11期159-169,共11页
Shandong Agricultural Sciences
基金
国家自然科学基金项目(62303394)。