基于融合注意力和多尺度特征的热轧带钢表面缺陷检测方法

    Surface Defect Detection Method of Hot Rolled Strip Steel Based on Fusion Attention and Multi-scale Features

    • 摘要: 针对热扎带钢表面缺陷面积较小、形态多样、边界模糊且背景复杂的问题,提出一种热轧带钢表面缺陷检测模型SFSP-YOLOv7。首先,通过改进k-means++聚类算法调整先验框维度,使用交并比(intersection over union,IoU)替换欧氏距离度量,引入遗传算法(genetic algorithm,GA)获得更具代表性的锚框尺寸,提升模型的回归速度和小面积缺陷检测的准确率。其次,对于边界模糊且背景复杂的缺陷,提出一种目标检测边界框损失函数FocalSIoU,以减少模型中不必要的特征学习,加快检测速度,提升预测框的回归效果。最后,设计一种多尺度特征融合注意力模块(multi-scale feature fusion module,MFFM),通过多尺度信息融合增强模型特征提取能力,提高小目标的检测精确度,并改善模型检测误检率。在模型Head结构中引入空到深(space to depth,SPD)卷积模块对模型进行改进,避免细粒度信息的丢失,降低目标漏检率。通过NEU-DET数据集进行验证,结果表明,SFSP-YOLOv7模型检测的平均精确度均值(mean average precision,mAP)为78.25%,相比原YOLOv7模型提升了4.92个百分点,表明提出的检测方法具有有效性。

       

      Abstract: Aiming at the problems of small defect area,diverse shapes,blurred boundaries and complex,backgrounds of surface defects of hot-rolled strip steel,a surface defect detection model for hot rolled strip,named SFSP-YOLOv7,is proposed.First,by improving the k-means++clustering algorithm,the prior frame dimension is adjusted,the Euclidean distance metric is replaced by intersection over union (IoU),and a more representative anchor dimension is obtained by introducing genetic algorithm (GA).Enhancing the model's the regression speed and the accuracy of small area defect detection.Secondly,for the defects with fuzzy boundary and complex backgrounds,a new object detection boundary frame loss function FocalSIoU is proposed to reduce the learning of unnecessary features in the model,accelerate the detection speed,and improve the regression effect of the prediction frame.Finally,a multi-scale feature fusion attention module (MFFM) is designed to enhance the model's feature extraction capabilities through multi-scale information fusion,improve the detection accuracy of small targets,and improve the misdetection rate of model detection.The space to depth (SPD) convolution module is introduced into the model Head structure to improve the model to avoid the loss of fine-grained information and reduce the target miss detection rate.Through the verification of NEU-DET data set,the mean average detection accuracy (mAP) value of the SFSP-YOLOv7 model is 78.25%,which is 4.92% higher than the original YOLOv7 model,indicating the effectiveness of the detection method proposed.

       

    /

    返回文章
    返回