Citation: | Hu Y L, Yang J, Xu C Y, et al. PIC2f-YOLO: a lightweight method for the detection of metal surface defects[J]. Opto-Electron Eng, 2025, 52(1): 240250. doi: 10.12086/oee.2025.240250 |
[1] | 李国权. 高炉无料钟炉顶设备维护发展现状分析[J]. 设备管理与维修, 2019, (6): 35−36. doi: 10.16621/j.cnki.issn1001-0599.2019.03D.17 Li G Q. Analysis on the development status of bell-less top equipment maintenance for blast furnaces[J]. Plant Maintenance Eng, 2019, (6): 35−36. doi: 10.16621/j.cnki.issn1001-0599.2019.03D.17 |
[2] | 潘晨燕. 基于改进SPIHT算法的钢板表面缺陷漏磁检测海量数据压缩方法研究[D]. 沈阳: 东北大学, 2013. Pan C Y. Research on data compression method of massive magnetic flux leakage detection data of surface defects on steel plate based on improved SPIHT algorithm[D]. Shenyang: Northeastern University, 2013. |
[3] | 徐长航, 陈国明, 谢静. 红外图像处理技术在金属表面缺陷检测中的应用[J]. 制造业自动化, 2009, 31(10): 51−54. doi: 10.3969/j.issn.1009-0134.2009.10.015 Xu C H, Chen G M, Xie J. Application of infrared thermography technology in surface defects detection of products in metal[J]. Manuf Autom Eng, 2009, 31(10): 51−54. doi: 10.3969/j.issn.1009-0134.2009.10.015 |
[4] | Li X D, Mao W J, Jiang W. Image recognition for steel ball's surface quality detecting based on kernel extreme learning machine[C]//Proceedings of the 34th Chinese Control Conference, 2015: 3727–3731. https://doi.org/10.1109/ChiCC.2015.7260217. |
[5] | Lu J L, Lin M X, Huang Y, et al. A high-accuracy algorithm for surface defect detection of steel based on DAG-SVM[J]. Sens Transducers, 2013, 157(10): 412−418. |
[6] | Zhang Z B, Lv G H, Zhao G X, et al. BS-YOLOv5s: insulator defect detection with attention mechanism and multi-scale fusion[C]//Proceedings of 2023 IEEE International Conference on Image Processing, 2023: 2365–2369. https://doi.org/10.1109/ICIP49359.2023.10222163. |
[7] | Ding K Y, Ding Z H, Zhang Z B, et al. SCD-YOLO: a novel object detection method for efficient road crack detection[J]. Multimedia Syst, 2024, 30(6): 351. doi: 10.21203/rs.3.rs-4350707/v1 |
[8] | 朱克佳. 基于深度学习的目标检测研究[J]. 现代信息科技, 2024, 8(13): 76−83. doi: 10.19850/j.cnki.2096-4706.2024.13.016 Zhu K J. Research on object detection based on deep learning[J]. Mod Inf Technol, 2024, 8(13): 76−83. doi: 10.19850/j.cnki.2096-4706.2024.13.016 |
[9] | Ren S Q, He K M, Girshick R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Trans Pattern Anal Mach Intell, 2017, 39(6): 1137−1149. doi: 10.1109/TPAMI.2016.2577031 |
[10] | 刘琪, 雷景生. 基于改进深度网络的钢材表面缺陷检测[J]. 计算机工程与设计, 2022, 43(9): 2654−2661. doi: 10.16208/j.issn1000-7024.2022.09.033 Liu Q, Lei J S. Surface defect detection of steel based on improved deep network[J]. Comput Eng Design, 2022, 43(9): 2654−2661. doi: 10.16208/j.issn1000-7024.2022.09.033 |
[11] | Shi X C, Zhou S K, Tai Y C, et al. An improved Faster R-CNN for steel surface defect detection[C]//Proceedings of 2022 IEEE 24th International Workshop on Multimedia Signal Processing, 2022: 1–5. https://doi.org/10.1109/MMSP55362.2022.9949350. |
[12] | 姜菲菲, 李宁, 邱翠翠, 等. 基于改进Faster RCNN的金属丝网缺陷检测方法[J]. 中国科技论文, 2024, 19(2): 153−159. doi: 10.3969/j.issn.2095-2783.2024.02.003 Jiang F F, Li N, Qiu C C, et al. Defect detection method of wire mesh based on improved Faster RCNN[J]. China Sciencepaper, 2024, 19(2): 153−159. doi: 10.3969/j.issn.2095-2783.2024.02.003 |
[13] | 马燕婷, 赵红东, 阎超, 等. 改进YOLOv5网络的带钢表面缺陷检测方法[J]. 电子测量与仪器学报, 2022, 36(8): 150−157. doi: 10.13382/j.jemi.B2205354 Ma Y T, Zhao H D, Yan C, et al. Strip steel surface defect detection method by improved YOLOv5 network[J]. J Electron Meas Instrum, 2022, 36(8): 150−157. doi: 10.13382/j.jemi.B2205354 |
[14] | Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems, 2017: 6000–6010. |
[15] | 李鑫, 汪诚, 李彬, 等. 改进YOLOv5的钢材表面缺陷检测算法[J]. 空军工程大学学报, 2022, 23(2): 26−33. doi: 10.3969/j.issn.1009-3516.2022.02.005 Li X, Wang C, Li B, et al. Steel surface defect detection algorithm based on Improved YOLOv 5[J]. J Air Force Eng Univ, 2022, 23(2): 26−33. doi: 10.3969/j.issn.1009-3516.2022.02.005 |
[16] | 熊聪, 于安宁, 高兴华, 等. 基于改进YOLOX的钢材表面缺陷检测算法[J]. 电子测量技术, 2023, 46(9): 151−157. doi: 10.19651/j.cnki.emt.2211012 Xiong C, Yu A N, Gao X H, et al. Steel surface defect detection algorithm based on improved YOLOX[J]. Electron Meas Technol, 2023, 46(9): 151−157. doi: 10.19651/j.cnki.emt.2211012 |
[17] | 梁礼明, 龙鹏威, 卢宝贺, 等. 改进GBS-YOLOv7t的钢材表面缺陷检测[J]. 光电工程, 2024, 51(5): 240044. doi: 10.12086/oee.2024.240044 Liang L M, Long P W, Lu B H, et al. Improvement of GBS-YOLOv7t for steel surface defect detection[J]. Opto-Electron Eng, 2024, 51(5): 240044. doi: 10.12086/oee.2024.240044 |
[18] | 杨本臣, 李世熙, 李依泽, 等. 改进YOLOv8n的钢材表面缺陷检测算法[J/OL]. 机械科学与技术, 2024: 1–10. [2024-09-20].https://doi.org/10.13433/j.cnki.1003-8728.20240135. Yang B C, Li S X, Li Y Z, et al. Improved YOLOv8n algorithm for steel surface defect detection[J/OL]. Mech Sci Technol Aerosp Eng, 2024: 1–10. [2024-09-20].https://doi.org/10.13433/j.cnki.1003-8728.20240135. |
[19] | Ultralytics. YOLOv8: the latest version of YOLO object detection algorithm[EB/OL]. GitHub, 2023. [2024-08-22].https://github.com/ultralytics/ultralytics. |
[20] | Chen J R, Kao S H, He H, et al. Run, don't walk: chasing higher FLOPS for faster neural networks[C]//Proceedings of 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023: 12021–12031. https://doi.org/10.1109/CVPR52729.2023.01157. |
[21] | Zhang J N, Li X T, Li J, et al. Rethinking mobile block for efficient attention-based models[C]//Proceedings of 2023 IEEE/CVF International Conference on Computer Vision, 2023: 1389–1400. https://doi.org/10.1109/ICCV51070.2023.00134. |
[22] | Zhao Y, Lv W Y, Xu S J, et al. DETRs beat YOLOs on real-time object detection[C]//Proceedings of 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2024: 16965–16974. https://doi.org/10.1109/CVPR52733.2024.01605. |
[23] | Wang C Y, Yeh I H, Liao H Y M, et al. YOLOv9: learning what you want to learn using programmable gradient information[C]//Proceedings of the 18th European Conference on Computer Vision, 2024: 1–21. https://doi.org/10.1007/978-3-031-72751-1_1. |
[24] | He Y, Song K C, Meng Q G, et al. An end-to-end steel surface defect detection approach via fusing multiple hierarchical features[J]. IEEE Trans Instrum Meas, 2020, 69(4): 1493−1504. doi: 10.1109/TIM.2019.2915404 |
[25] | 铝片表面工业缺陷目标检测[EB/OL]. Baidu AI Studio, 2022. [2024-09-25].https://aistudio.baidu.com/datasetdetail/135640. Lion C. Surface defect detection for aluminum sheets in iIndustrial applications[EB/OL]. Baidu AI Studio, 2022. [2024-09-25].https://aistudio.baidu.com/datasetdetail/135640. Lion C. |
[26] | Everingham M, Eslami S M A, Van Gool L, et al. The PASCAL visual object classes challenge: a retrospective[J]. Int J Comput Vision, 2015, 111(1): 98−136. doi: 10.1007/s11263-014-0733-5 |
[27] | 带状合金功能材料表面缺陷数据集[EB/OL]. Baidu AI Studio, 2024. [2024-10-22].https://aistudio.baidu.com/datasetdetail/299785. Hu Y L. Dataset of surface defects of strip alloy functional materials[EB/OL]. Baidu AI Studio, 2024. [2024-10-22].https://aistudio.baidu.com/datasetdetail/299785. Hu Y L. |
[28] | 易遵辉, 蒋朝辉, 陈晓方, 等. 基于成像区域模型的工业相机视场角优化配置方法[J/OL]. 控制理论与应用, 2023: 1–9. [2024-11-29].http://kns.cnki.net/kcms/detail/44.1240.TP.20231214.0848.038.html. Yi Z H, Jiang C H, Chen X F, et al. Optimal configuration method for field angle of industrial cameras based on imaging area model[J/OL]. Control Theory Appl, 2023: 1–9. [2024-11-29].http://kns.cnki.net/kcms/detail/44.1240.TP.20231214.0848.038.html. |
[29] | 帅金晓. 单芯片CMOS图像传感器数字系统的设计与实现[D]. 湖南: 湖南大学, 2009. Shuai J X. The design and implementation of the digital system of a System-on-a-Chip CMOS image sensor[D]. Hunan: Hunan University, 2009. |
[30] | Redmon J, Farhadi A. YOLOv3: an incremental improvement[Z]. arXiv: 1804.02767, 2018. https://arxiv.org/abs/1804.02767. |
[31] | Li C Y, Li L L, Jiag H L, et al. YOLOv6: a single-stage object detection framework for industrial applications[Z]. arXiv: 2209.02976, 2022. https://arxiv.org/abs/2209.02976. |
[32] | 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 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2023: 7464–7475. https://doi.org/10.1109/CVPR52729.2023.00721. |
[33] | Ge Z, Liu S T, Wang F, et al. YOLOX: exceeding YOLO series in 2021[Z]. arXiv: 2107.08430, 2021. https://arxiv.org/abs/2107.08430. |
[34] | Wang A, Chen H, Liu L H, et al. YOLOv10: real-time end-to-end object detection[Z]. arXiv: 2405.14458, 2024. https://arxiv.org/abs/2405.14458. |
Metallic materials, especially steel, are widely used in industry due to their mature manufacturing processes, excellent durability, and significant economic benefits. As a core material in various manufacturing sectors, steel is critical in advancing global industrialization and information technology. In the early stages of industrial metal production, surface defect detection relied primarily on manual visual inspections. However, as production scales expanded and quality demands increased, the limitations of manual inspection methods, such as inefficiency, susceptibility to human error, and high subjectivity, became evident. Thus, quickly and reliably identifying surface defects on metal has become a critical challenge in modern manufacturing processes. Traditional nondestructive testing techniques, such as eddy current testing and infrared inspection, were initially applied to surface defect detection on metal materials. However, these techniques often struggle to detect small defects effectively. Later, machine learning methods were introduced to improve detection accuracy, but limitations in processing power and generalization hindered their performance in large-scale industrial applications. With the rapid development of computing hardware, deep-learning-based methods have become the primary solution for metal surface defect detection. These methods are usually divided into two-stage and one-stage object detection frameworks. Two-stage methods, such as Faster RCNN, are recognized for their high accuracy but have slower processing speeds, limiting their real-time applications. Conversely, one-stage methods, such as YOLO, provide faster detection speeds but often compromise accuracy. To address the low efficiency in metal surface defect detection, as well as problems related to large algorithm parameters and low precision, this paper proposes a lightweight detection method based on the improved YOLOv8n. First, the local convolution inverted cross-stage partial fusion (PIC2f) module was designed. It replaces the BottleNeck module with the constructed local convolution inverted residual bottleneck (PIBN) module, which combines partial convolution and an inverted residual block to reduce algorithm parameters and enhance the model's feature extraction ability. Next, an attention-based intra-scale feature interaction (AIFI) module was adopted. It combines position embedding and multi-head attention to enhance the model's detection capability for small targets. Lastly, average pooling downsampling (ADown) replaced traditional convolution as the feature reduction module, effectively reducing parameters and computational complexity without compromising detection accuracy. Experimental results show that, compared with YOLOv8n, the PIC2f-YOLO method increases mAP50 by 2.7 % on the NEU-DET steel defect dataset and reduces parameters by 0.403 M. Experiments on aluminum sheet surface industrial defects, PASCAL VOC2012, and surface defects of strip alloy functional material datasets also confirm the effectiveness of the PIC2f-YOLO method.
PIC2f-YOLO structure
PIBN structure
PIC2f structure
Conv and PConv structure. (a) Conv; (b) PConv
IRMB structure
AIFI structure
ADown structure
Aluminum sheet defects
Surface defects of strip alloy functional material
Comparison of defect mAP50-95 values before and after dataset augmentation
Detection instance of different methods under the NEU-DET dataset. (a) Annotated defect images; (b) YOLOv8n; (c) PIC2f-YOLO
Detection instance of different methods under the surface defects of strip alloy functional materials datasets. (a) Annotated defect images; (b) YOLOv8n; (c) PIC2f-YOLO