School of Electrical and Electronic Engineering, Hubei University of Technology, Wuhan 430000, China
Show less
文章历史+
Received
Published
Revised
2024-11-05
2028-07-28
2025-10-15
Online Date
2026-09-20
PDF (9843K)
摘要
为解决钢材缺陷检测精度低、模型参数量大以及多尺寸目标检测困难等问题,提出了一种基于改进YOLOv7-tiny(you only look once v7-tiny)网络的钢材缺陷检测算法。首先引入鬼影混洗卷积模块(group shuffle convolution,GSConv),减少标准卷积块带来的冗余计算;其次引入加权双向特征金字塔网(bidirectional feature pyramid network,BiFPN)结构,增强模型多尺度特征融合;之后设计SPPEC(SPPELAN-CBAM)模块,提升检测速度捕捉细节信息;最后采用K-means++IoU(intersection over union)算法重新划定锚框,降低网络对于钢材缺陷检测的漏检率。在NEU-DET数据集上实验表明,改进后检测算法相对于原网络mAP(mean average precision)值提高了6.8%,参数量减少为4.71 M,检测速度提升为123 f/s(frame per second),实现了更加实时、准确的钢材缺陷检测需求。
Abstract
To solve the problems of low detection accuracy of steel defects, large number of model parameters, and difficulty in detecting multiple-sized targets, a steel defect detection algorithm based on an improved YOLOv7-tiny network was proposed. The method first introduced GSConv(group shuffle convolution) module to reduce the redundant computations caused by standard convolutional blocks; further the multi-scale feature fusion of the model was further enhanced by embedding BiFPN(bidirectional feature pyramid network). The SPPEC(SPPELAN-CBAM) module was designed to increase the detection speed and enhance the information extraction capability; the K-means++IoU(intersection over union) algorithm was employed to redefine new anchor boxes adapted to steel defects, thereby reducing the missed detection rate. Experiments on NEU-DET dataset show that compared with the original network, the improved detection algorithm has increased the mAP(mean average precision) value by 6.8%, reduced the number of parameters to 4.71 M, and increased the detection speed to 123 f/s(frame per second), achieving more real-time and accurate steel defect detection requirements.
而单阶段检测算法以YOLO(you only look once)系列[10-12]为代表,直接在网络中同时预测类别和位置,大大减少了计算资源的消耗。与两阶段算法相比具备明显的速度优势,适合工业实时检测场景[13-14]。其中,得益于简单的网络架构和高效的性能表现,YOLO系列检测算法在缺陷检测领域获得广泛的应用[15]。
为定量判断分析YOLOv7-tiny对于钢材缺陷的检测效果,采用检测精度与速率作为模型的衡量指标,其中指标包含精确率P(precision)、召回率R(recall)、平均精度均值(mean average precision,mAP)、每秒检测帧数FPS(frames per second)、浮点运算次数GFLOPS(giga floating-point operations per second)以及且参数量(params),以上指标计算公式为
CzimmermannT, CiutiG, MilazzoM, et al. Visual-based defect detection and classification approaches for industrial applications: a survey[J]. Sensors, 2020, 20(5): 1459.
YangChuanli, ZhangXiuqing. A review of material defect detection applications based on machine vision and deep learning[J]. Material Review, 2022, 36 (16): 226-234.
CaoYiqin, WuMinglin, XuLu. Steel surface defect detection based on improved YOLOv5 algorithm[J]. Journal of Graphic Science, 2023, 44(2): 335-345.
[6]
ChaY J, ChoiW, BuyukozturkO. Deep learning-based crack damage detection using convolutional neural networks.[J]Computer-Aided Civil And Infrastructure Engineering, 2017, 32(5): 361-378.
YangZeqing, ZhangMingxuan, ChenYingshu, et al. Research progress on surface defect detection methods based on machine vision[J] Modern Manufacturing Engineering, 2023(4): 143-156.
[9]
RenS Q, HeK M, GirshickR, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2016, 39(6): 1137-1149.
DanMingtao, GaoWeiwei, YangYile, et al. Brake component defect detection algorithm based on improved Faster R-CNN[J]. Foreign Electronic Measurement Technology, 2022, 41(4): 22-28.
[12]
ZhaoW, ChenF, HuangH, et al. A new steel defect detection algorithm based on deep learning[J]. Computational Intelligence and Neuroscience, 2021(1): 5592878.
[13]
FuH, SongQ, GongJ, et al. Automatic detection and pixel-level quantification of surface microcracks in ceramics grinding: an exploration with Mask R-CNN and TransUNet[J]. Measurement, 2024, 224: 113895.
[14]
RedmonJ, DivvalaS, GirshickR, et al. You only look once:unified, real-time object detection[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Las Vegas: IEEE, 2016: 779-788.
BochkovskiyA, WangC, LiaoH. YOLOv4: optimal speed and accuracy of object detection.[J] arXiv Preprint, arXiv: 2004. 10934, 2020.
[17]
GuoZ, WangC, YangG, et al. MSFT-YOLO: improved YOLOV5 based on transforme for detecting defects of steel surface[J]. Sensors, 2022, 22(9): 3467.
[18]
GeZ, LiuS, WangF, et al. YOLOX: exceeding YOLO Series in 2021[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2022). New Orleans: IEEE, 2022: 2415-2424.
[19]
WangC Y, BochkovskiyA, LiaoH Y M. YOLOv7: trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2023: 7464-7475.
[20]
LiJ Y, SuZ F, GengJ H, et al. Real-time detection of steel strip surface defects based on improved YOLO detection network[J]. IFAC-Papers on Line, 2018, 51(21): 76-81.
[21]
HeY, SongK, MengQ, et al. An end-to-end steel surface defect detection approach via fusing multiple hierarchical features[J]. IEEE Transactions on Instrumentation and Measurement, 2019, 69(4): 1493-1504.
XuQiang, ZhuHongjin, FanHonghui, et al. Research on improved YOLOv3 network for defect detection on steel plate surface[J] Computer Engineering and Applications, 2020, 56 (16): 265-272.
MaYanting, ZhaoHongdong, YanChao, et al. Improved YOLOv5 network for surface defect detection of strip steel[J]. Journal of Electronic Measurement and Instrumentation, 2022, 36(8): 150-157.
[26]
ChenH, DuY, FuY, et al. DCAM-Net: a rapid detection network for strip steel surface defects based on deformable convolution and attention mechanism[J]. IEEE Transactions on Instrumentation Measurement, 2023, 72: 112.
[27]
WangR, LiangF, MouX, et al. Development of an improved YOLOv7-based model for detecting defects on strip steel surfaces[J]. Coatings, 2023, 13: 536.
ZhouMengran, WangHaonan, GaoLipeng, et al. Steel surface defect detection based on YOLOv5s-FCS[J]. Science Technology and Engineering, 2024, 24(14): 5901-5910.
[30]
LüB, DuanB, ZhangY, et al. Research on surface defect detection of strip steel based on improved YOLOv7[J]. Sensors, 2024, 24, 2667.
[31]
LiH L, LiJ, WeiH B, et al. Slim-neck by gsconv: a better design paradigm of detector architectures for autonomous vehicles[EB/OL]. arXiv Preprint, arXiv:2206. 02424. 2022.
[32]
LinT Y, DollsarP, GirshickR, et al. Feature pyramid networks for object detection[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2017: 2117-2125.
[33]
LiuS, QiL, QinH, et al. Path aggregation network for instance segmentation[J]. arXiv Preprint, arXiv: 18030. 1534, 2018.
[34]
WooS, ParkJ, LeeJ Y, et al. Cbam: convolutional block attention module[C]// Proceedings of the European Conference on Computer Vision (ECCV). New York: IEEE, 2018: 3-19.
HongBihui, LiWenbin, ZhuWei, et al. Research on object detection based on improved YOLOv3 SPP algorithm[J]. Journal of Weapon Equipment Engineering, 2023, 44(4): 268-274.