Strip Surface Defect Detection Based on Improved YOLOv5
YANG Wei1,2,YANG Jun2,XU Congyuan2
1.School of Computer Science and Technology, Zhejiang Sci-Tech University, Hangzhou, Zhejiang 310018, China
2.School of Information Science and Engineering, Jiaxing University, Jiaxing, Zhejiang 314001, China
Abstract:Aiming at the problems of low detection accuracy and slow detection speed in strip surface defect detection methods, a strip surface defect detection method based on improved YOLOv5 is proposed. Firstly, the Content-Aware ReAssembly of FEatures (CARAFE) is used as the upsampling operator of multi-scale feature fusion, and the Channel Scaling-Adaptively Spatial Feature Fusion (CS-ASFF) is constructed to enhance multi-scale feature fusion and control model complexity. Secondly, the GSConv and VoVGSCSP modules are introduced into the convolutional layer and cross-layer structure of the model to reduce computation and improve detection accuracy. Finally, the Focal-GIOU Loss is used as the loss function to solve the problem of imbalance between difficult and easy samples in strip defect images, thereby improving the adaptability to complex data. Experimental results show that the method achieves 80.6% mean average precision (PmAP) on NEU-DET dataset, with a calculation amount of 14.8 GFLOPs. Compared with YOLOv5, PmAP is increased by 4.3% and the computation amount is reduced by 6.33%. Compared with the current mainstream object detection networks, this method has the highest detection accuracy with a lower calculation amount and can meet the real-time detection of surface defects on steel strips in real industrial scenarios.
YAO B, WEN X L, JIAO L B, et al. Improved YOLOv3 algorithm for surface defect detection of aluminum profile[J]. Acta Metrologica Sinica, 2022, 43(10): 1256-1261.
HU L, DUAN F J, DING K Q, et al. Study on In-line surface defect detection system for steel strip based on linear CCD sensor [J]. Acta Metrologica Sinica, 2005, 26(3): 200-203.
[4]
LI C F, XU A, CAI Y F, et al. Improved YOLOX-based Method for Steel Surface Defect Detection [C]//IAECST, 2023 5th International Academic Exchange Conference on Science and Technology Innovation, Guangzhou, China, 2023: 929-934
CUI W L, WANG Y J, KANG S Q, et al. Road lane line detection method Based on improved YOLOv3 algorithm[J]. Acta Automatica Sinica, 2022, 48(6): 1560-1568.
[7]
CHEN F, DENG M, GAO H, et al. ACA-Net: An adaptive convolution and anchor network for metallic surface defect detection[J]. Applied Sciences, 2022, 12(16): 8070.
[15]
LIU S, HUANG D, WANG Y. Learning spatial fusion for single-shot object detection[J/OL]. https: //arxiv. org/abs/1911. 09516, 2019.
[21]
LIU W, ANGUELOV D, ERHAN D, et al. Ssd: Single shot multibox detector[C]// ECCV. 2015 European Conference on Computer Vision. Amsterdam, NetherLands, 2016: 21-37.
FAN X Z, HE S G, YU B, et al. Analysis on causes leading to surface quality defects of steel strips and improvement measures[J]. Angang Technology, 2020(6): 52-55.
ZHAO W, CHEN F, HUANG H, et al. A new steel defect detection algorithm based on deep learning[J]. Computational Intelligence and Neuroscience, 2021, 2021: 1-13.
[10]
LI H, LI J, WEI H, et al. Slim-neck by GSConv: A better design paradigm of detector architectures for autonomous vehicles[J/OL]. https: //arxiv. org/abs/2206. 02424, 2022.
[12]
LIN T Y, DOLLAR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]//CVPR. 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, USA, 2017: 2117-2125
DENG S S, DI L, LIANG J Z, et al. Textile defect detection combining attention mechanism and adaptive memory fusion network [J]. Pattern Recognition and Artificial Intelligence, 2022, 35(6): 536-547.
[16]
CHOLLET F. Xception: deep learning with depthwise separable convolutions[C]// CVPR. 2018 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu, USA, 2017: 1251-1258.
[19]
HE Y, SONG K, MENG Q, 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.
[23]
WANG C Y, BOCHKOVSKIY A, LIAO H Y M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]// CVPR. 2023 IEEE Conference on Computer Vision and Pattern Recognition. Vancouver, Canada, 2023: 7464-7475.
[24]
GLENN J. YOLOv8[EB/OL]. (2023-01-10)[2024-03-04]. http: //github. com/ultralytics/ultralytics.
JI J J, WANG J, CHEN Y J, et al. Surface defect detection of hot rolled strip based on improved YOLO v4[J]. Computer Engineering and Design, 2023, 44(9): 2786-2793.
[11]
ZHANG Y F, REN W Q, ZHANG Z, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.
[13]
LIU S, QI L, QIN H, et al. Path aggregation network for instance segmentation[C]// CVPR. 2018 IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake City, USA, 2018: 8759-8768.
[17]
HOWARD A G, ZHU M, CHEN B, et al. Mobilenets: Efficient convolutional neural networks for mobile vision applications[J/OL]. https: //arxiv. org/abs/1704. 04861, 2017.
[20]
REN S, HE K, GIRSHICK R, et al. Faster r-cnn: Towards real-time object detection with region proposal networks[J]. Advances in neural information processing systems, 2015, 39: 1137-1149.
[22]
ZHOU X, WANG D, PHILIPP K. Objects as points[J/OL]. https: //arxiv. org/abs/1904. 07850, 2019.
[9]
WANG J Q, CHEN K, XU R, et al. Carafe: content-aware reassembly of features[C]. ICCV. 2019 the IEEE/CVF international conference on computer vision. Seoul, Korea, 2019: 3007-3016.
[18]
MA N, ZHANG X, ZHENG H T, et al. Shufflenet v2: Practical guidelines for efficient cnn architecture design[C]// ECCV. 2018 European Conference on Computer Vision. Munich, Germany, 2018: 116-131.