作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

基于改进Yolov7-tiny的带钢表面缺陷检测算法

  • 发布日期:2024-04-15

Strip Steel Surface Defect Detection Algorithm based on Improved Yolov7-tiny

  • Published:2024-04-15

摘要: 针对带钢表面缺陷检测任务存在小目标检测效率低、缺陷定位不准确、检测算法参数量大、难以运用在终端设备上等问题,提出一种改进的YOLOv7-tiny检测算法。首先,使用GSConv替换颈部网络中的标准卷积,再基于GSConv设计一种改进的高效聚合网络(ELAN-G),保证带钢表面缺陷特征信息被充分融合的同时降低算法的参数量;其次,在预测头和颈部网络之间增加针对低分辨率和小缺陷的SPDConv模块,模块先生成一个中间特征图,通过对中间特征图中的小缺陷特征信息过滤学习得到最终特征图,以此提高预测头对小缺陷的检测精度;最后,引入MPDIoU损失函数,合理利用边界回归框的几何性质,简化损失函数计算过程并提高缺陷定位精度。实验结果表明,在NEU-DET数据集上,改进算法比其他6种先进目标检测算法效果更好,性能更均衡,改进算法的平均精度均值(mAP)可达74.1%,且参数量和计算量低于所有对比算法,可布置在工业坏境中的带钢表面缺陷检测系统上。

Abstract: To address the problems of low efficiency of small target detection, inaccurate defect localization, large number of parameters in the detection algorithm, and difficult to use the model on the terminal equipment, in the task of detecting surface defects on strip steel, an improved YOLOv7-tiny detection algorithm is proposed. Firstly, the GSConv is used to replace the standard convolution in the Neck network, and then an improved and efficient aggregation network (ELAN-G) is designed based on GSConv, which reduces the parameter amounts of the model while ensuring that the information of the strip steel surface defect features is adequately fused; secondly, the SPDConv module for low-resolution and small defects is added between the Head and the Neck network, and the module is first generated into an intermediate feature map, the final feature map is obtained by filtering and learning the small defect feature information in the intermediate feature map, to improve the detection accuracy of the Head for small defects; finally, the MPDIoU loss function is adopted, and the geometric properties of the bounding regression box are reasonably utilized to simplify the calculation process of the loss function and improve the accuracy of defect localization. The experimental results show that the improved algorithm is better than the other six advanced target detection algorithms on the NEU-DET dataset, with more balanced performance, the mean average accuracy (mAP) of the improved algorithm can reach up to 74.1%, and the parameter amounts and computation is lower than that of all the comparative algorithms, which can be arranged on steel surface defects detection system in the industrial environment.