首页|基于改进YOLOv7-tiny的橡胶密封圈缺陷检测方法

基于改进YOLOv7-tiny的橡胶密封圈缺陷检测方法

扫码查看
针对橡胶密封圈表面缺陷传统检测效率低下的问题,提出一种改进YOLOv7-tiny的橡胶密封圈表面缺陷检测算法.在主干特征提取网络中引入 PConv 优化 ELAN 结构,增强算法特征提取能力,并减少参数量;在特征融合网络中引入全局注意力机制(GAM),利用每一对三维通道、空间宽度和空间高度之间的注意力权重,在 3 个维度上捕捉重要特征来提高效率,增强算法特征融合能力;使用WIoU损失函数优化原边界框损失函数,通过符合情况的梯度增益分配策略,增强算法对检测目标的定位能力;增加 P2 小目标检测层,加强深层与浅层特征信息的融合,增强算法对小目标缺陷的检测能力.在O-Rings数据集进行实验对比,改进后的算法与YOLOv7-tiny算法比较,mAP提升了 7.8%,达到了 90.9%的检测精度,能够满足实际工业生产需求.
Defect detection method of rubber seal ring based on improved YOLOv7-tiny
Aiming at the problem of low efficiency in traditional detection of surface defects of rubber seal rings,an improved YOLOv7-tiny algorithm for surface defect detection of rubber seal rings was proposed.The PConv optimized ELAN structure was introduced into the backbone feature extraction network to enhance the algorithm's feature extraction capability and to reduce the number of parameters.The global attention mechanism(GAM)was introduced into the feature fusion network,utilizing the attention weights between each pair of 3D channels,spatial widths,and spatial heights to improve efficiency by capturing the important features in three dimensions,thus enhancing the algorithm's feature fusion capability.The WIoU loss function was employed to optimize the original bounding box loss function,enhancing the algorithm's ability to locate the detected targets through a situation-compliant gradient gain allocation strategy.Additionally,a P2 small-target detection layer was added to strengthen the fusion of the deep and shallow feature information,thereby enhancing the algorithm's ability to detect small-target defects.Experimental comparisons were conducted using the O-Rings dataset.The improved algorithm was compared with the YOLOv7-tiny algorithm,resulting in a 7.8%improvement in mAP and achieving a detection accuracy of 90.9%,meeting the needs of actual industrial production.

YOLOv7-tinyrubber seal ringdefect detectionattention mechanismsmall target detection layer

张相胜、杨骁

展开 >

江南大学轻工过程先进控制教育部重点实验室,江苏 无锡 214122

YOLOv7-tiny 橡胶密封圈 缺陷检测 注意力机制 小目标检测层

2024

图学学报
中国图学学会

图学学报

CSTPCD北大核心
影响因子:0.73
ISSN:2095-302X
年,卷(期):2024.45(3)
  • 19