1. College of Mechanical Engineering, Zhejiang University of Technology, Hangzhou 310023, China 2. Ningbo Agile Information Technology Limited Company, Cixi 315300, China
A fine-grained convolution module SPD-Conv was proposed to replace the convolution subsampling for YOLOv8s network and extract the features of small defects in a fine-grained way in order to improve the accuracy and recall rate of the detection of small defects on the surface of drum rollers and enhance the detection ability of the model for small target defects. GFPN feature fusion module was introduced to enhance the cross-scale connection between adjacent layers and cross-layer connection under the same scale in the feature fusion module, which is conducive to the transmission of small target feature information in the convolutional network. The small target detection layer was added to the head in order to improve the detection ability of the model. The boundary frame loss function of Wise-IOU was used to replace CIOU in terms of loss function, which could accelerate network convergence and improve the accuracy of network detection. The test was conducted on the self-made drum roller defect dataset. Results showed that the improved YOLOv8s achieved 0.911, 0.983 and 0.935 in the chamfer dataset, side dataset and end dataset, respectively. mAP@0.5 increased by 6.4%, 3.3% and 4% respectively compared with YOLOv8s. Accuracy and recall rates have improved with an average detection time of 23 ms per image. The improved YOLOv8s has better localization ability and detection accuracy for small target defects compared with the original model, and the detection speed can meet the requirements of industrial mass detection.
Fig.3Structure diagram of SPD-Conv(scale = 2) module
Fig.4PANet feature fusion
Fig.5GFPN feature fusion
Fig.6Process of adaptive feature fusion
Fig.7Schematic diagram of four detection heads model
Fig.8Schematic diagram of CIOU parameters
Fig.9Schematic diagram of Wise-IOU parameters
Fig.10Improved YOLOv8s model
Fig.11Picture of drum roller
Fig.12Drum roller defect detection platform
Fig.13Detail diagram of chamfer defect
Fig.14Detail diangram of end face defect
Fig.15Detail diagram of side defect
配置环境
配置名称(版本)
操作系统
Windows10
CPU
Inter(R) Xeon(R) Gold 5218 (2.3 GHz)
GPU
NVIDIA Geforce RTX 2080Ti(11 GB)×2
编译器
Python-3.9
深度学习框架
Pytorch-1.10.0
加速模块
CUDA Toolkit-11.3.1
Tab.1Experiment environment of deep learning
参数
含义
数值
images size
图像尺度
640
batch size
批数量
16
E
迭代次数
300
lr
学习率
0.01
Momentum
动量
0.937
Weight_decay
权重衰减参数
0.000 5
Tab.2Experimental hyperparameters of deep learning
真实情况
预测结果
正例
反例
正例
TP
FN
反例
FP
TN
Tab.3Confusion matrix of classification results
算法
AP
P
R
mAP@0.5
v/(帧·s?1)
Np/107
缺失
剥落
磕碰
YOLOv8s
0.916
0.920
0.705
0.850
0.822
0.847
80.6
1.112
YOLOv8s+小目标检测层
0.959
0.937
0.798
0.900
0.847
0.898
67.9
1.263
YOLOv8s+GFPN
0.936
0.913
0.729
0.864
0.830
0.859
76.9
1.347
YOLOv8s+SPD-Conv
0.942
0.942
0.741
0.860
0.854
0.875
77.2
1.266
YOLOv8s+3个改进点
0.961
0.941
0.810
0.911
0.860
0.901
57.7
1.410
Tab.4Chamfer test results
算法
AP
P
R
mAP@0.5
v/(帧·s?1)
Np/107
划痕
环伤
锈蚀
点蚀
YOLOv8s
0.976
0.994
0.956
0.900
0.950
0.920
0.950
63.4
1.112
YOLOv8s+小目标检测层
0.987
0.993
0.971
0.951
0.961
0.948
0.971
54.1
1.263
YOLOv8s+GFPN
0.983
0.994
0.964
0.916
0.959
0.933
0.964
59.2
1.347
YOLOv8s+SPD-Conv
0.974
0.995
0.965
0.910
0.941
0.934
0.962
51.6
1.266
YOLOv8s+3个改进点
0.989
0.994
0.971
0.960
0.968
0.942
0.975
43.4
1.410
Tab.5Side face test results
算法
AP
P
R
mAP@0.5
v/(帧·s?1)
Np/107
环伤
磕碰
锈蚀
点蚀
崩边
YOLOv8s
0.976
0.910
0.915
0.701
0.985
0.901
0.850
0.895
60.5
1.112
YOLOv8s+小目标检测层
0.982
0.895
0.928
0.774
0.992
0.910
0.873
0.914
51.6
1.263
YOLOv8+GFPN
0.973
0.924
0.935
0.724
0.994
0.912
0.867
0.908
57.1
1.347
YOLOv8+SPD-Conv
0.967
0.943
0.929
0.716
0.995
0.908
0.863
0.910
53.4
1.266
YOLOv8s+3个改进点
0.981
0.951
0.945
0.801
0.995
0.923
0.881
0.930
40.2
1.410
Tab.6End face test results
Fig.16Change of side face loss function
Fig.17Change of chamfer loss function
Fig.18Change of end face loss function
检测模型
SPD-Conv
GFPN
小目标 检测层
LWIOUV3
mAP@0.5
v/ (帧·s?1)
Model1
×
×
×
×
0.847
80.6
Model2
√
×
×
×
0.875
77.2
Model3
√
√
×
×
0.885
69.3
Model4
√
√
√
×
0.901
57.7
Model5
√
√
√
√
0.911
47.7
Tab.7Test results of chamfer ablation
检测模型
SPD-Conv
GFPN
小目标 检测层
LWIOUV3
mAP@0.5
v/ (帧·s?1)
Model1
×
×
×
×
0.950
61.4
Model2
√
×
×
×
0.962
51.6
Model3
√
√
×
×
0.969
47.8
Model4
√
√
√
×
0.975
43.4
Model5
√
√
√
√
0.983
40.7
Tab.8Test results of side face ablation
检测模型
SPD-Conv
GFPN
小目标 检测层
LWIOUV3
mAP@0.5
v/ (帧·s?1)
Model1
×
×
×
×
0.895
58.5
Model2
√
×
×
×
0.910
53.4
Model3
√
√
×
×
0.924
47.8
Model4
√
√
√
×
0.930
40.2
Model5
√
√
√
√
0.935
38.0
Tab.9Test results of end face ablation
算法模型
Np/106
mAP@0.5
v/(帧·s?1)
Faster R-CNN
136.10
0.851
15.4
SSD
24.01
0.540
50.1
YOLOv3
61.53
0.740
51.8
YOLOv4
63.95
0.790
54.7
YOLOv5s
7.03
0.829
81.9
YOLOv7
37.21
0.810
65.5
YOLOv8s
11.20
0.847
80.6
本文方法
14.10
0.911
47.7
Tab.10Comparison results of chamfer models
算法模型
Np/106
mAP@0.5
v/(帧·s?1)
Faster R-CNN
136.10
0.94
8.01
SSD
24.01
0.67
38.7
YOLOv3
61.53
0.84
28.3
YOLOv4
63.95
0.87
45.6
YOLOv5s
7.03
0.93
67.2
YOLOv7
37.21
0.93
46.1
YOLOv8s
11.20
0.95
61.4
本文方法
14.10
0.983
40.7
Tab.11Comparison results of side face models
算法模型
Np/106
mAP@0.5
v/(帧·s?1)
Faster R-CNN
136.10
0.852
9.4
SSD
24.01
0.472
45.6
YOLOv3
61.53
0.765
47.1
YOLOv4
63.95
0.847
49.8
YOLOv5s
7.03
0.863
50.9
YOLOv7
37.21
0.856
36.7
YOLOv8s
11.20
0.895
58.5
本文方法
14.10
0.935
38.0
Tab.12Comparison results of end face models
检测模型
漏检率
误检率
YOLOv8s
8%
11%
本文方法
2%
5%
Tab.13Comparison of online test results
Fig.19YOLOv8s improved comparison chart of front and rear roller defect surface inspection results
算法
mAP@0.5
点蚀
划痕
斑块
轧入氧化皮
YOLOv8s
0.879
0.886
0.892
0.639
本文方法
0.909
0.951
0.918
0.651
Tab.14Comparison results of surface defect dataset of hot-rolled strip from Northeastern University
[1]
王姮, 卜燕, 张华, 等 基于分形维数的磁痕图像缺陷检测[J]. 计算机应用研究, 2015, 32 (2): 603- 605 WANG Heng, BU Yan, ZHANG Hua, et al Defect detection of magnetic trace image based on fractal dimension[J]. Application Research of Computers, 2015, 32 (2): 603- 605
doi: 10.3969/j.issn.1001-3695.2015.02.063
[2]
梁子千, 玄文博, 王婷, 等 基于二维阻抗特征的管道环焊缝缺陷涡流检测[J]. 仪器仪表学报, 2017, 38 (9): 2138- 2145 LIANG Ziqian, XUAN Wenbo, WANG Ting, et al Eddy current detection of pipe girth weld defects based on two-dimensional impedance characteristics[J]. Chinese Journal of Scientific Instrument, 2017, 38 (9): 2138- 2145
doi: 10.3969/j.issn.0254-3087.2017.09.006
[3]
陈振华, 郑志远, 卢超 不锈钢焊缝中超声传播特性及TOF检测方法研究[J]. 电子测量与仪器学报, 2017, 31 (7): 1129- 1136 CHEN Zhenhua, ZHENG Zhiyuan, LU Chao Study on ultrasonic propagation characteristics and TOFD detection method in stainless steel weld[J]. Journal of Electronic Measurement and Instrumentation, 2017, 31 (7): 1129- 1136
[4]
WANG J M, QIAO J P, GUO M C Research on bearing surface defect detection system based on machine vision[J]. Journal of Physics: Conference Series, 2022, 2290 (1): 012061
doi: 10.1088/1742-6596/2290/1/012061
[5]
LU M H, CHEN C L Detection and classification of bearing surface defects based on machine vision[J]. Applied Sciences, 2021, 11 (4): 1825
doi: 10.3390/app11041825
[6]
陈昊, 张奔, 黎明, 等 基于图像光流的轴承滚子表面缺陷检测[J]. 仪器仪表学报, 2018, 39 (6): 198- 206 CHEN Hao, ZHANG Ben, LI Ming, et al Bearing roller surface defect detection based on image optical flow[J]. Chinese Journal of Scientific Instrument, 2018, 39 (6): 198- 206
[7]
陈丹阳, 曹丽, 林一高, 等 轴承圆锥滚子外观缺陷检测研究[J]. 机电工程, 2015, 32 (8): 1084- 1087 CHEN Danyang, CAO Li, LIN Yigao, et al Study on appearance defect detection of bearing tapered roller[J]. Mechanical and Electrical Engineering, 2015, 32 (8): 1084- 1087
[8]
GIRSHICK R. Fast r-CNN [C]//2015 IEEE International Conference on Computer Vision. Santiago: IEEE, 2015: 1440-1448.
[9]
袁天乐, 袁巨龙, 朱勇建, 等 基于改进YOLOv5的推力球轴承表面缺陷检测算法[J]. 浙江大学学报: 工学版, 2022, 56 (12): 2349- 2357 YUAN Tianle, YUAN Julong, ZHU Yongjian, et al Surface defect detection algorithm for thrust ball bearing based on improved YOLOv5[J]. Journal of Zhejiang University: Engineering Science, 2022, 56 (12): 2349- 2357
[10]
曾耀, 高法钦 基于改进YOLOv5的电子元件表面缺陷检测算法[J]. 浙江大学学报: 工学版, 2023, 57 (3): 455- 465 ZENG Yao, GAO Faqin Surface defect detection algorithm for electronic components based on improved YOLOv5[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (3): 455- 465
[11]
TAN M, PANG R, LE Q V. Efficientdet: scalable and efficient object detection [C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 10781-10790.
[12]
CONG P C, FENG H, LV K F, et al MYOLO: a light weight fresh Shiitake mushroom detection model based on YOLOv3[J]. Agriculture, 2023, 13 (2): 392
doi: 10.3390/agriculture13020392
[13]
LIANG C, YAN Z G, REN M, et al Improved YOLOv5 infrared tank target detection method under ground background[J]. Scientific Reports, 2023, 13 (1): 6269
doi: 10.1038/s41598-023-33552-x
[14]
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]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Nashville: IEEE, 2023: 7464–7475.
[15]
WANG C Y, BOCHKOVSKIY A, LIAO H Y M. Scaled-yolov4: scaling cross stage partial network [C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. [S. l. ]: IEEE, 2021: 13029-13038.
[16]
GE Z, LIU S, WANG F, et al. Yolox: exceeding yolo series in 2021 [EB/OL]. [2023-05-17]. https://arxiv.org/pdf/2107.08430.pdf.
[17]
SUNKARA R, LUO T. No more strided convolutions or pooling: a new CNN building block for low-resolution images and small objects [C]//European Conference on Computer Vision. [S. l. ]: Springer, 2022: 19–23.
[18]
JIANG Y, TAN Z, WANG J, et al. GiraffeDet: a heavy-neck paradigm for object detection[EB/OL]. [2023-05-17]. https://arxiv.org/pdf/2202.04256.pdf.
[19]
LIU S, QI L, QIN H, et al. Path aggregation network for instance segmentation [C] //Proceedings of the IEEE Conference onComputer Vision and Pattern Recognition. Lake City: IEEE, 2018: 8759-8768.
[20]
TONG Z, CHEN Y, XU Z, et al. Wise-IoU: bounding box regression loss with dynamic focusing mechanism [EB/OL]. [2023-05-17]. https://arxiv.org/pdf/2301.10051.pdf.
[21]
LIU W, ANGUELOV D, ERHAN D, et al. SSD: singleshot multibox detector [EB/OL]. [2023-05-17]. https://arxiv.org/ pdf/1512.02325.pdf.
[22]
REDMON J, FARHADI A. YOLOv3: an incremental improvement [EB/OL]. [2023-05-17]. https://arxiv.org/pdf/1804.02767.pdf.