APP下载

基于改进YOLOv5s的苹果表面缺陷检测

2025-08-03吕利俊伊力哈木·亚尔买买提

山东农业科学 2025年6期
关键词:置信度注意力苹果

中图分类号:S126:TP391.4 文献标识号:A 文章编号:1001-4942(2025)06-0149-09

AbstractAiming at the problems of low detection accuracy and miss and 1 detection caused by overlapping or obscured apples in apple surface defects detection,an improved apple surface defect detection method with YOLOv5s algorithm was proposed in this study.Firstly,the convolutional block atention module (CBAM)was added to the Backbone part of the YOLOv5s model to enhance the detection model's attention to the information of important regions of images,so as to improve the model's abilityto detect defects on the surface of apple. Secondly,a weighted bidirectional feature pyramid network(BiFPN)was introduced to fully integrate the apple surface defect features at diferent scales in orderto reduce missed and 1 detections.Finally,the Soft-NMS algorithm was used instead of the NMS algorithm in the original network to optimize the redundant bounding box screening conditions and further reduce the miss detection rate of the model.The experimental results showed that the proposed algorithm in this paper achieved 95.5% of mean average precision (mAP),which improved by 3.3 percentage point compared to the original algorithm,and the recall rate was improved by 4.6 percentage points,so it could be beter used to detect the surface defects of apples.

KeywordsApple surface defect detection; YOLOv5s; Convolutional atention mechanism;Weightedbidirectional feature pyramid network(BiFPN)

苹果生长、采摘、运输以及筛选过程中常会遭遇鸟啄食、病虫害以及磕碰、腐烂等情况,严重影响苹果品质、产量及经济价值,因此对苹果表面缺陷进行精准检测有着重要的意义。但传统的人工检测费时费力,且受主观因素的影响,检测标准难以统一,精确度和检测效率均较低。随着计算机技术的不断发展,目标检测技术得到迅猛发展,现已广泛应用于工业生产检测、水果蔬菜检测、面容识别等多行业。在苹果表面缺陷检测中,基于深度学习的检测方法成为目前研究的热点之一。薛勇等[²为提高苹果表面缺陷的检测效率,提出利用GoogLeNet深度迁移模型进行检测,苹果表面缺陷识别准确率达到 91.91% ,与浅层卷积神经网络及传统机器学习方法相比具有更好的泛化能力与鲁棒性。Zhang等[³」为了解决苹果表面光线反射不规则导致的色调差异以及缺陷面积较小难以提取等问题,提出了一种基于模糊C均值算法和非线性规划遗传算法(FCM-NPGA)结合多元图像分析的苹果缺陷检测方法,缺陷苹果的检测准确率达到 95% 以上。周雨帆等4为了解决苹果表面缺陷检测准确率低的问题,提出一种基于轻量级卷积神经网络的苹果表面缺陷检测方法,在AlexNet网络结构的基础上引入深度可分离卷积代替原有网络中的标准卷积,然后利用全局平均池化代替原网络中的全连接层,改进后网络对苹果缺陷识别精度达到 98.57% ,训练速度提高32.67% ,在减少模型参数量的同时还保证了模型的检测精度和效率。……

登录APP查看全文

猜你喜欢

置信度注意力苹果
注意力不集中或是大脑在“做扫除”
基于改进Apriori算法的Java课程成绩关联分析与教学策略优化研究
注意力分配视角下对大学生碎片化学习注意力失焦现象的积极理解
基于扩展卡尔曼滤波的纵向车速与坡度估计
基于置信度估计的GPS轨迹拟合方法研究
基于多层级领域自适应网络和置信度约束的道路场景语义分割方法
不吃苹果的苹果奶牛
两个苹果
宛如苹果
巧插苹果