-
摘要: 针对热轧带钢表面缺陷检测存在的智能化水平低、检测精度低和检测速度慢等问题, 提出了一种基于自适应全局定位网络(Adaptive global localization network, AGLNet)的深度学习缺陷检测算法. 首先, 引入一种残差网络(Residual network, ResNet)与特征金字塔网络(Feature pyramid network, FPN)集成的特征提取结构, 减少缺陷语义信息在层级传递间的消失; 其次, 提出基于TPE (Tree-structure Parzen estimation)的自适应树型候选框提取网络(Adaptive tree-structure region proposal extraction network, AT-RPN), 无需先验知识的积累, 避免了人为调参的训练模式; 最后, 引入全局定位回归算法, 以全局定位的模式在复杂的缺陷检测中实现缺陷更精确定位. 本文实现一种快速、准确、更智能化、更适用于实际应用的热轧带钢表面缺陷的算法. 实验结果表明, AGLNet在NEU-DET热轧带钢表面缺陷数据集上的检测速度保持在11.8帧/s, 平均精度达到79.90 %, 优于目前其他深度学习带钢表面缺陷检测算法. 另外, 该算法还具备较强的泛化能力.
-
关键词:
- 表面缺陷检测 /
- 深度学习 /
- 特征金字塔网络 /
- 自适应树型候选框提取 /
- 全局定位
Abstract: A deep learning defect detection model based on adaptive global localization network (AGLNet) is presented to solve the problems of low intelligence, low detection accuracy and slow detection speed in hot-rolled strip surface defect detection. First, the feature extraction structure is combined with residual network (ResNet) and feature pyramid network (FPN) to reduce the disappearance of defect semantic information between layers transfers. Secondly, an adaptive tree-structure region proposal extraction network (AT-RPN) based on tree-structure Parzen estimation (TPE) algorithm is proposed, which does not need the accumulation of prior knowledge, and avoids the training model by manual parameter adjustment. Finally, a global localization regression algorithm is proposed to locate defects more accurately in complex defect detection using global positioning mode. In this paper, a fast, accurate, more intelligent and more applicable algorithm for surface defects detection of hot-rolled strips is realized. The experimental results show that the detection speed of AGLNet remains 11.8 frame/s and the average accuracy is 79.90 %, which is better than other deep learning algorithms for strip surface defect detection on NEU-DET dataset. In addition, the algorithm has a strong generalization ability. -
表 1 各个模型在NEU-DET数据集的缺陷检测平均精度结果(%)
Table 1 The average precision results of defect detection for each model in the NEU-DET dataset (%)
方法 平均精度均值 裂纹 夹杂 斑块 麻点 压入氧化 划痕 Faster R-CNN 79.20 71.31 84.63 82.92 80.17 80.31 75.87 RetinaNet 75.36 53.02 78.74 93.33 91.37 62.21 73.49 FCOS 75.18 52.41 75.03 91.48 84.85 62.86 84.43 Grid R-CNN 73.14 41.52 78.68 86.23 86.47 59.74 86.21 YOLO-v1 62.90 42.35 63.42 68.23 66.49 69.37 67.53 YOLO-v2 66.53 47.35 70.47 72.23 65.82 65.49 77.84 YOLO-v3 69.40 68.39 61.88 71.44 68.33 72.66 73.71 YOLO-v4 77.99 64.87 70.84 93.24 83.83 69.52 85.63 YOLO-v5 76.82 62.42 75.76 84.23 81.27 64.59 92.63 YOLOF 77.32 63.48 71.82 90.56 85.21 64.24 88.63 AGLNet 79.90 54.72 83.31 88.63 91.67 64.42 96.64 表 2 AGLNet、Grid R-CNN and Faster R-CNN基于NEU-DET数据集的对比测试结果
Table 2 Comparison results of AGLNet, Grid R-CNN and Faster R-CNN based on NEU-DET dataset
裂纹 夹杂 斑块 麻点 压入氧化 划痕 AGLNet Grid R-CNN Faster R-CNN 表 3 各模型FLOPs, Params和FPS对比结果
Table 3 Comparison of FLOPs, Params and FPS of each model
方法 FLOPs (GMAC) Params (M) FPS (帧/s) Faster R-CNN 408.36 98.25 ~8.2 RetinaNet 239.32 37.74 ~12.3 FCOS 438.68 89.79 ~9.3 Grid R-CNN 329.51 64.32 ~10.2 YOLO-v3 89.45 27.84 ~15.4 YOLOF 151.47 63.24 ~13.4 AGLNet 273.95 79.80 ~1.8 表 4 各类缺陷在不同IoU阈值下的测试结果
Table 4 Detection results of various defects under different IoU thresholds
IoU阈值 缺陷类型 gts Dets Recall mAP IoU0.5 裂纹 139 1 886 0.935 54.72 IoU0.75 裂纹 139 1 823 0.923 47.48 IoU0.5 夹杂 181 1 188 0.945 83.31 IoU0.75 夹杂 181 1 163 0.932 82.17 IoU0.5 斑块 151 627 0.960 88.63 IoU0.75 斑块 151 591 0.942 89.45 IoU0.5 麻点 88 689 0.955 91.67 IoU0.75 麻点 88 636 0.938 89.24 IoU0.5 压入氧化 126 1 034 0.893 64.42 IoU0.75 压入氧化 126 1 051 0.882 59.66 IoU0.5 划痕 117 317 0.991 96.64 IoU0.75 划痕 117 322 0.986 92.79 IoU0.5 全部缺陷 802 5 741 0.947 79.90 IoU0.75 全部缺陷 802 5 586 0.934 76.79 表 5 消融实验结果
Table 5 Results of ablation experiments
序号 ResNet50_FPN ResNet50 AT-RPN RPN mAP (%) FPS GPU 存贮占用量(MiB) 1 √ √ 79.90 11.8 5568 2 √ √ 78.64 10.3 7039 3 √ √ 77.97 12.2 5024 4 √ √ 76.82 10.6 6436 表 6 消融实验对比结果
Table 6 Comparison results of ablation experiments
序号 对比实验 mAP提升(%) FPS提升 节约显存占用率(%) 1 实验1/实验2 1.26 1.5 20.89 2 实验3/实验4 1.15 1.6 21.93 3 实验1/实验3 1.93 −0.4 −10.82 4 实验2/实验4 1.82 −0.3 −9.36 5 实验1/实验4 3.08 1.2 13.49 表 7 PCB-Master数据集基本信息
Table 7 Basic information of PCB-Master dataset
缺陷类型 图像数量 缺陷数量 漏孔 115 497 鼠咬 115 492 断路 115 482 短路 115 491 毛刺 115 488 余铜 116 503 全部缺陷总计 693 2 953 表 8 各个模型在PCB-Master数据集上测试结果
Table 8 Test results of each model on PCB-Master dataset
Faster R-CNN RetinaNet FCOS Grid R-CNN YOLO-v3 YOLOF AGLNet AP (漏孔) (%) 87.43 91.54 90.73 95.55 85.83 94.22 99.45 AP (鼠咬) (%) 84.90 90.50 85.24 93.37 79.25 93.35 95.17 AP (断路) (%) 86.15 89.65 84.74 91.45 74.73 88.63 92.93 AP (短路) (%) 89.45 92.16 92.83 99.70 83.23 99.70 99.70 AP (毛刺) (%) 86.91 95.26 91.50 95.36 82.62 98.86 99.65 AP (余铜) (%) 86.53 87.48 88.03 90.48 73.10 95.39 94.22 mAP (%) 86.90 91.10 88.85 94.32 79.79 95.03 96.85 FPS (帧/s) ~4.20 ~6.67 ~5.41 ~5.88 ~9.52 ~7.69 ~6.25 表 9 PCB-Master测试集检测数据统计
Table 9 Data statistics of PCB-Master defect detection test set
缺陷类别 gts Dets Recall AP 漏孔 169 696 0.998 0.995 鼠咬 142 665 0.990 0.952 断路 142 667 0.990 0.929 短路 132 590 1.000 0.997 毛刺 143 687 1.000 0.997 余铜 137 644 0.979 0.942 全部缺陷总计 865 3949 -
[1] 王典洪, 甘胜丰, 张伟民, 雷维新. 基于监督双限制连接Isomap算法的带钢表面缺陷图像分类方法. 自动化学报, 2014, 40(5): 883−891Wang Dian-Hong, Gan Sheng-Feng, Zhang Wei-Min, Lei Wei-Xin. Strip surface defect image classification based on double-limited and supervised-connect Isomap algorithm. Acta Automatica Sinica, 2014, 40(5): 883−891 [2] Song K C, Yan Y H. A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects. Applied Surface Science, 2013, 285: 858−864 doi: 10.1016/j.apsusc.2013.09.002 [3] Neogi N, Mohanta D K, Dutta P K. Review of vision-based steel surface inspection systems. EURASIP Journal on Image and Video Processing, 2014, 2014(1): Article No. 50 doi: 10.1186/1687-5281-2014-50 [4] 许志祥, 卢宏, 沈剑. 摄像机定标及其误差分析. 自动化学报, 1993, 19(1): 115−117Xu Zhi-Xiang, Lu Hong, Shen Jian. Camera calibration and its error analysis. Acta Automatica Sinica, 1993, 19(1): 115−117 [5] 李少波, 杨静, 王铮, 朱书德, 杨观赐. 缺陷检测技术的发展与应用研究综述. 自动化学报, 2020, 46(11): 2319−2336Li Shao-Bo, Yang Jing, Wang Zheng, Zhu Shu-De, Yang Guan-Ci. Review of development and application of defect detection technology. Acta Automatica Sinica, 2020, 46(11): 2319−2336 [6] 刘国梁, 余建波. 基于堆叠降噪自编码器的神经−符号模型及在晶圆表面缺陷识别. 自动化学报, 2022, 48(11): 2688−2702Liu Guo-Liang, Yu Jian-Bo. Application of neural-symbol model based on stacked denoising auto-encoders in wafer map defect recognition. Acta Automatica Sinica, 2022, 48(11): 2688−2702 [7] Ren S Q, He K M, Girshick R, Sun J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137−1149 doi: 10.1109/TPAMI.2016.2577031 [8] He K M, Gkioxari G, Dollár P, Girshick R. Mask R-CNN. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(2): 386−397 doi: 10.1109/TPAMI.2018.2844175 [9] Redmon J, Divvala S, Girshick R, Farhadi A. You only look once: Unified, real-time object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Las Vegas, USA: IEEE, 2016. 779−788 [10] Liu W, Anguelov D, Erhan D, Szegedy C, Reed S, Fu C Y, et al. SSD: Single shot MultiBox detector. In: Proceedings of the 14th European Conference on Computer Vision (ECCV). Amsterdam, The Netherlands: Springer, 2016. 21−37 [11] Lin T Y, Dollár P, Girshick R, He K M, Hariharan B, Belongie S. Feature pyramid networks for object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Honolulu, USA: IEEE, 2017. 936−944 [12] Tao X, Zhang D P, Wang Z H, Liu X L, Zhang H Y, Xu D. Detection of power line insulator defects using aerial images analyzed with convolutional neural networks. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2020, 50(4): 1486−1498 doi: 10.1109/TSMC.2018.2871750 [13] He Y, Song K C, Meng Q G, Yan Y H. An end-to-end steel surface defect detection approach via fusing multiple hierarchical features. IEEE Transactions on Instrumentation and Measurement, 2020, 69(4): 1493−1504 doi: 10.1109/TIM.2019.2915404 [14] Cheng X, Yu J B. RetinaNet with difference channel attention and adaptively spatial feature fusion for steel surface defect detection. IEEE Transactions on Instrumentation and Measurement, 2021, 70: Article No. 2503911 [15] Chen J W, Liu Z G, Wang H R, Núñez A, Han Z W. Automatic defect detection of fasteners on the catenary support device using deep convolutional neural network. IEEE Transactions on Instrumentation and Measurement, 2018, 67(2): 257−269 doi: 10.1109/TIM.2017.2775345 [16] Zhang C B, Chang C C, Jamshidi M. Concrete bridge surface damage detection using a single-stage detector. Computer-Aided Civil and Infrastructure Engineering, 2020, 35(4): 389−409 doi: 10.1111/mice.12500 [17] Zhang S F, Chi C, Yao Y Q, Lei Z, Li S Z. Bridging the gap between anchor-based and anchor-free detection via adaptive training sample selection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle, USA: IEEE, 2020. 9756−9765 [18] Law H, Deng J. CornerNet: Detecting objects as paired keypoints. International Journal of Computer Vision, 2020, 128(3): 642−656 doi: 10.1007/s11263-019-01204-1 [19] Duan K W, Bai S, Xie L X, Qi H G, Huang Q M, Tian Q. CenterNet: Keypoint triplets for object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). Seoul, South Korea: IEEE, 2019. 6568−6577 [20] Jia X G, Yang X Q, Yu X H, Gao H J. A modified CenterNet for crack detection of sanitary ceramics. In: Proceedings of the 46th Annual Conference of the IEEE Industrial Electronics Society (IECON). Singapore: IEEE, 2020. 5311−5316 [21] Zhu C C, He Y H, Savvides M. Feature selective anchor-free module for single-shot object detection. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Long Beach, USA: IEEE, 2019. 840−849 [22] Tian Z, Shen C H, Chen H, He T. FCOS: Fully convolutional one-stage object detection. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). Seoul, South Korea: IEEE, 2019. 9626−9635 [23] Kong T, Sun F C, Liu H P, Jiang Y N, Li L, Shi J B. FoveaBox: Beyound anchor-based object detection. IEEE Transactions on Image Processing, 2020, 29: 7389−7398 doi: 10.1109/TIP.2020.3002345 [24] Lu X, Li B Y, Yue Y X, Li Q Q, Yan J J. Grid R-CNN. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Long Beach, USA: IEEE, 2019. 7355−7364 [25] Wang J Q, Zhang W W, Cao Y H, Chen K, Pang J M, Gong T, et al. Side-aware boundary localization for more precise object detection. In: Proceedings of the 16th European Conference on Computer Vision (ECCV). Glasgow, UK: Springer, 2020. 403−419 [26] Bergstra J, Bardenet R, Bengio Y, Kégl B. Algorithms for hyper-parameter optimization. In: Proceedings of the 24th International Conference on Neural Information Processing Systems (NIPS). Granada, Spain: Curran Associates Inc., 2011. 2546−2554 [27] Cao J L, Cholakkal H, Anwer R M, Khan F S, Pang Y W, Shao L. D2Det: Towards high quality object detection and instance segmentation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle, USA: IEEE, 2020. 11482−11491 [28] Ding R W, Dai L H, Li G P, Liu H. TDD-net: A tiny defect detection network for printed circuit boards. CAAI Transactions on Intelligence Technology, 2019, 4(2): 110−116 doi: 10.1049/trit.2019.0019