To improve the accuracy of steel defect detection, a defect detection algorithm YOLOv5s-FNCE based on YOLOv5s is proposed. Firstly, a novel NAMAttention attention mechanism is added to the backbone feature extraction network to improve the perception and differentiation of the target; and a new C3-Faster is proposed to extract the features; the positional convolutional CoordConvs is introduced in the feature fusion network and at the output to enhance the semantic perception ability and global perception ability of the target; and finally, a new loss function Focal-EIoU is introduced to accelerate the convergence speed and improve the regression accuracy. Experimental results show that the mean average accuracy of the YOLOv5s-FNCE algorithm on the steel surface defects dataset reaches 75.1%, which is 1.7% higher than that of the original YOLOv5s, the detection speed is increased by 20.5%, which proves that the algorithm can effectively improve the detection speed and accuracy in steel defect detection.
给定输入,其中通道数量为、通道的高度为、通道宽度为,其中代表的是卷积的运算,是偏差项,R代表特征图,则表示输出了通道数为的特征图,并且输出的通道高度为、通道宽度为,表示大小为的个卷积操作.卷积神经网络的时间复杂度可以用浮点运算量(floating point of operations, FLOPS)表示,如式(6)所示,在卷积的过程中,卷积核的数量和通道数的数量很多,导致一般的FLOPS都非常大.
LIS B, YANGJ, WANGZ,et al .Review of development and application of defect detection technology[J].Acta Automatica Sinica,2020,46(11):2319-2336.(in Chinese)
KANGS, CHENC Z, LUOY Q, et al. Study on infrared detection edge enhancement of wind turbine blade defects based on differential morphology gradient[J]. Acta Energiae Solaris Sinica,2021,42(6):432-437.(in Chinese)
XUP, GENGM, FANGZ,et al. Study on high-speed rail defect detection method based on combination of EC and MFL testing[J]. Journal of Mechanical Engineering, 2021, 57(18): 57-65.(in Chinese)
ZHUY L, ZHAOY S, FANGY, et al .Rotating eddy current testing for inspection of cracks at hole edge[J]. China Mechanical Engineering, 2023, 34(8): 883-891. (in Chinese)
[9]
GIRSHICKR, DONAHUEJ, DARRELLT,et al .Rich feature hierarchies for accurate object detection and semantic segmentation[C]//2014 IEEE Conference on Computer Vision and Pattern Recognition.Columbus,OH,USA. IEEE,2014:580-587.
[10]
HEK M, ZHANGX Y, RENS Q,et al .Spatial pyramid pooling in deep convolutional networks for visual recognition[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2015,37(9): 1904-1916.
[11]
GIRSHICKR. Fast R-CNN[C]//2015 IEEE International Conference on Computer Vision (ICCV). Santiago, Chile. IEEE, 2015: 1440-1448.
[12]
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,NV,USA. IEEE,2016:779-788.
PENGY, TUX Y, YANGQ Q,et al .Lightweight UAV detection algorithm based on improved YOLOv5[J]. Journal of Hunan University (Natural Sciences),2023,50(12):28-38.(in Chinese)
[15]
LIUW, ANGUELOVD, ERHAND,et al .SSD:single shot MultiBox detector[C]// Computer Vision-ECCV 2016.Cham:Springer International Publishing,2016:21-37.
CHENGJ Y, DUANX H, ZHUW .Research on metal surface defect detection by improved YOLOv3[J]. Computer Engineering and Applications,2021,57(19):252-258.(in Chinese)
SHENX Z, WUD .Detection of small defects on aluminum profile surface based on YOLO[J].Journal of Zhejiang University of Technology,2022,50(4):372-380.(in Chinese)
SHENC G, LIH W, JINGT,et al. Application of deep learning-based surface defect recognition of plate in small sample dataset[J]. Steel Rolling, 2022, 39(2): 82-86.(in Chinese)
WANGY L, SUY Y, LUOY,et al .Design of steel strip surface defect detection system based on SSD model[J].Journal of Chongqing University of Science and Technology (Natural Sciences Edition),2021,23(3):95-98.(in Chinese)
[24]
GEZ, LIUS T, WANGF,et al .YOLOX:exceeding YOLO series in 2021[EB/OL].2021:2107.08430.org/abs/2107.08430v2.
[25]
ZHUX K, LYUS C, WANGX,et al .TPH-YOLOv5:improved YOLOv5 based on transformer prediction head for object detection on drone-captured scenarios[C]//2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW). Montreal,BC,Canada. IEEE,2021:2778-2788.
[26]
FARHADIA, REDMONJ. Yolov3: An incremental improvement[C]//Computer Vision and Pattern Recognition. Berlin/Heidelberg, Germany. Springer, 2018: 1804-2767.
[27]
BOCHKOVSKIYA, WANGC Y, LIAOH M .YOLOv4:optimal speed and accuracy of object detection[EB/OL]. 2020:2004.10934.
[28]
WANGC Y, BOCHKOVSKIYA, LIAOH M .YOLOv7:trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]//2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Vancouver,BC,Canada. IEEE, 2023: 7464-7475.
CHENJ R, KAOS H, HEH,et al .Run,don’t walk:chasing higher FLOPS for faster neural networks[EB/OL]. 2023:2303.03667.org/abs/2303.03667v3.
[31]
LIUR, LEHMANJ, MOLINOP,et al .An intriguing failing of convolutional neural networks and the CoordConv solution[EB/OL].2018:1807.03247.org/abs/1807.03247v2.
[32]
ZHANGY F, RENW Q, ZHANGZ, et al. Focal and efficient IOU loss for accurate bounding box regression[J].Neurocomputing,2022, 506: 146-157.
[33]
ZHENGZ H, WANGP, LIUW,et al .Distance-IoU loss:faster and better learning for bounding box regression[J].Proceedings of the AAAI Conference on Artificial Intelligence,2020,34(7):12993-13000.
[34]
HUJ, SHENL, SUNG .Squeeze-and-excitation networks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City, UT. IEEE, 2018.
[35]
SONGQ S, LIS B, BAIQ,et al .Object detection method for grasping robot based on improved YOLOv5[J].Micromachines,2021, 12(11): 1273.
[36]
VARGHESER,M S .YOLOv8:a novel object detection algorithm with enhanced performance and robustness[C]//2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS). Chennai, India. IEEE,2024: 1-6.
GUOL Y, DUANH Y, ZHOUW W,et al .Surface defect detection algorithm of magnetic tile based on Mask R-CNN[J].Computer Integrated Manufacturing Systems, 2022, 28(5):1393-1400. (in Chinese)