首页|基于改进YOLOv7的表面缺陷检测研究

基于改进YOLOv7的表面缺陷检测研究

扫码查看
工业生产过程中,产品表面经常会出现一些缺陷,产品表面的缺陷会影响产品的美观度、舒适度与使用性能.因此,解决传统产品表面缺陷检测方法检测准确率低的问题的关键在于检测缺陷,针对该问题提出了一种基于改进的YOLOv7的表面缺陷检测算法.通过DCNv2对主干网络进行改进,在卷积过程中引入可变形卷积,在捕捉特征时可以对感受野进行动态调整,从而更好地适应不规则形状的缺陷,并提高检测精度和鲁棒性.通过引入极化自注意力机制,可以更好地捕捉特征之间的长距离依赖关系,并加强对重要特征的关注和利用,从而提高检测准确性和鲁棒性.通过归一化Wasserstein距离对原损失函数进行优化,能够更好地处理不均匀类别分布的问题,并在训练过程中平衡不同类别之间的权重,从而提高模型对各种缺陷类型的检测效果.经过以上技术改进,实验结果表明,改进后的模型具有更高的性能和可靠性,能够以更高的准确率在工业生产过程中进行缺陷检测.基于实验,在GC10-DET数据集上取得了70.4%的准确率,优于其他现有模型.
Research on surface defect detectionbased on improved YOLOv7
In industrial production processes,surface defects often occur on products,which can affect their aesthetics,com-fort,and performance.Therefore,the key to addressing the low detection accuracy of traditional surface defect detection methods lies in defect detection.To address this issue,an improved surface defect detection algorithm based on YOLOv7 is proposed.The main network is enhanced using DCNv2,which introduces deformable convolutions in the convolution process.This allows for dynamic adjustment of the receptive field when capturing features,better adapting to irregularly shaped defects,and improving detection accuracy and robustness.By introducing polarized self-attention mechanism,long-range dependencies between features can be better captured,enhancing the focus and utilization of important features,thereby improving detection accuracy and robust-ness.Furthermore,optimizing the original loss function using normalized Wasserstein distance enables better handling of the prob-lem of uneven class distribution and balancing the weights between different classes during the training process,thereby improving the model's detection performance for various defect types.Experimental results demonstrate that the improved model achieves higher performance and reliability,enabling defect detection in industrial production processes with higher accuracy.Based on experiments,it achieves an accuracy of 70.4%on the GC10-DET dataset,outperforming other existing models.

machine visionobject detectionYOLOv7attention mechanism

董子铭、陈洪刚、孙承行、谢建斌、卿粼波

展开 >

四川大学电子信息学院,成都 610041

四川省隆鑫科技包装有限公司,遂宁 629000

机器视觉 目标检测 YOLOv7 注意力机制

中央高校基本科研业务费专项

2022CDSN-15-SCU

2024

现代计算机
中大控股

现代计算机

影响因子:0.292
ISSN:1007-1423
年,卷(期):2024.30(2)
  • 22