DBCW-YOLO: A Modified YOLOv5 for the Detection of Steel Surface Defects
Abstract
:1. Introduction
- Enhanced feature fusion capability using cross-scale connectivity and embedding lightweight up-sampling (CARAFE) into the YOLOv5 network to cope with the steel defect fusion capability with a large scale of variation and to ensure the lightness of the network by improving the receptive field.
- We use the dynamic non-monotonic focusing mechanism to replace the CIoU boundary loss function in the original model with the WioU, which enhances the competitiveness of middle-quality anchor frames and simultaneously reduces the harmful gradient generated by low-quality examples.
- Embed the self-attention mechanism detection head (DyHead) into the YOLOv5 detection stage to enhance the detection ability of the model.
2. Related Work
2.1. Traditional Method
2.2. Deep Learning Method
3. Method
3.1. Basic Model
3.2. DBCW-YOLO
3.2.1. Improved Feature Fusion
3.2.2. DyHead
3.2.3. Wise-IoU
4. Experiment
4.1. Dataset
4.2. Index of Evaluation
4.3. Experimental Environment
4.4. Experimental Result
Contrast Experiment
4.5. Ablation Experiment
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Bozic, J.; Tabernik, D.; Skocaj, D. Mixed supervision for surface-defect detection: From weakly to fully supervised learning. Comput. Ind. 2021, 129, 103459. [Google Scholar] [CrossRef]
- Xu, K.; Xu, Y.; Zhou, P.; Wang, L. Application of RNAMlet to surface defect identification of steels. Opt. Lasers Eng. 2018, 105, 110–117. [Google Scholar] [CrossRef]
- Ai, Y.H.; Xu, K. Surface Detection of Continuous Casting Slabs Based on Curvelet Transform and Kernel Locality Preserving Projections. J. Iron Steel Res. Int. 2013, 20, 80–86. [Google Scholar] [CrossRef]
- Medina, R.; Gayubo, F.; González-Rodrigo, L.M.; Olmedo, D.; Gómez-García-Bermejo, J.; Zalama, E.; Perán, J.R. Automated visual classification of frequent defects in flat steel coils. Int. J. Adv. Manuf. Technol. 2011, 57, 1087–1097. [Google Scholar] [CrossRef]
- Tulbure, A.-A.; Dulf, E.-H. A review on modern defect detection models using DCNNs—Deep convolutional neural networks. J. Adv. Res. 2022, 35, 33–48. [Google Scholar] [CrossRef]
- Hassaballah, M.; Awad, A.I. Deep Learning in Computer Vision: Principles and Applications; CRC Press: Boca Raton, FL, USA, 2020. [Google Scholar]
- Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
- Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
- Ren, S.Q.; He, K.M.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.-Y.; Berg, A.C. Ssd: Single shot multibox detector. In Proceedings of the Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part I 14; Springer: Berlin/Heidelberg, Germany, 2016; pp. 21–37. [Google Scholar]
- 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, Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLO9000: Better, Faster, Stronger. In Proceedings of the IEEE Conference on Computer Vision & Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 6517–6525. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Bochkovskiy, A.; Wang, C.Y.; Liao, H.Y.M. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 2999–3007. [Google Scholar]
- Wang, J.; Chen, K.; Xu, R.; Liu, Z.; Loy, C.C.; Lin, D. CARAFE: Content-Aware Reassembly of Features. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2020. [Google Scholar]
- Dai, X.; Chen, Y.; Xiao, B.; Chen, D.; Liu, M.; Yuan, L.; Zhang, L. Dynamic Head: Unifying Object Detection Heads with Attentions. In Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021. [Google Scholar]
- Tong, Z.; Chen, Y.; Xu, Z.; Yu, R. Wise-IoU: Bounding box regression loss with dynamic focusing mechanism. arXiv 2023, arXiv:2301.10051. [Google Scholar]
- Luo, Q.W.; Sun, Y.C.; Li, P.C.; Simpson, O.; Tian, L.; He, Y.G. Generalized Completed Local Binary Patterns for Time-Efficient Steel Surface Defect Classification. IEEE Trans. Instrum. Meas. 2019, 68, 667–679. [Google Scholar] [CrossRef]
- Liu, X.M.; Xu, K.; Zhou, D.D.; Zhou, P. Improved contourlet transform construction and its application to surface defect recognition of metals. Multidimens. Syst. Signal Process. 2020, 31, 951–964. [Google Scholar] [CrossRef]
- Wang, H.Y.; Zhang, J.W.; Tian, Y.; Chen, H.Y.; Sun, H.X.; Liu, K. A Simple Guidance Template-Based Defect Detection Method for Strip Steel Surfaces. IEEE Trans. Ind. Inform. 2019, 15, 2798–2809. [Google Scholar] [CrossRef]
- Cardellicchio, A.; Nitti, M.; Patruno, C.; Mosca, N.; di Summa, M.; Stella, E.; Renò, V. Automatic quality control of aluminum parts welds based on 3D data and artificial intelligence. J. Intell. Manuf. 2023, 35, 1629–1648. [Google Scholar] [CrossRef]
- Wang, S.; Xia, X.J.; Ye, L.Q.; Yang, B.B. Automatic Detection and Classification of Steel Surface Defect Using Deep Convolutional Neural Networks. Metals 2021, 11, 388. [Google Scholar] [CrossRef]
- Li, D.W.; Xie, Q.; Gong, X.X.; Yu, Z.H.; Xu, J.X.; Sun, Y.X.; Wang, J. Automatic defect detection of metro tunnel surfaces using a vision-based inspection system. Adv. Eng. Inform. 2021, 47, 101206. [Google Scholar] [CrossRef]
- Yu, Z.L.; Wu, Y.X.; Wei, B.Q.; Ding, Z.K.; Luo, F. A lightweight and efficient model for surface tiny defect detection. Appl. Intell. 2023, 53, 6344–6353. [Google Scholar] [CrossRef]
- Cheng, X.; Yu, J. RetinaNet with Difference Channel Attention and Adaptively Spatial Feature Fusion for Steel Surface Defect Detection. IEEE Trans. Instrum. Meas. 2020, 70, 1–11. [Google Scholar] [CrossRef]
- Liu, S.; Huang, D.; Wang, Y. Learning Spatial Fusion for Single-Shot Object Detection. arXiv 2019, arXiv:1911.09516. [Google Scholar]
- Cardellicchio, A.; Ruggieri, S.; Nettis, A.; Mosca, N.; Uva, G.; Renò, V. On the use of YOLOv5 for detecting common defects on existing RC bridges. In Multimodal Sensing and Artificial Intelligence: Technologies and Applications III; SPIE: Bellingham, WA USA, 2023; pp. 134–141. [Google Scholar]
- Li, S.; Kong, F.; Wang, R.; Luo, T.; Shi, Z. EFD-YOLOv4: A steel surface defect detection network with encoder-decoder residual block and feature alignment module. Measurement 2023, 220, 113359. [Google Scholar] [CrossRef]
- Lu, J.Q.; Chen, W.D.; Lan, Y.B.; Qiu, X.F.; Huang, J.W.; Luo, H.X. Design of citrus peel defect and fruit morphology detection method based on machine vision. Comput. Electron. Agric. 2024, 219, 108721. [Google Scholar] [CrossRef]
- Guo, Z.X.; Wang, C.S.; Yang, G.; Huang, Z.Y.; Li, G. MSFT-YOLO: Improved YOLOv5 Based on Transformer for Detecting Defects of Steel Surface. Sensors 2022, 22, 3467. [Google Scholar] [CrossRef] [PubMed]
- Li, Y.; Chen, Y.; Wang, N.; Zhang, Z. Scale-Aware Trident Networks for Object Detection. arXiv 2019, arXiv:1901.01892. [Google Scholar]
Parameters | Value |
---|---|
Operating System | Windows 10 |
GPU | NVIDIA RTX 2080Ti (manufactured by NVIDIA Corporation, based in Santa Clara, CA, USA) |
Framework | PyTorch 1.10.0 |
Optimizer | SGD |
Momentum | 0.937 |
Weight Decay | 0.0005 |
Learning Rate | 0.01 |
Epoch | 150 |
Batch Size | 8 |
Image Size | 200 × 200 |
Types | YOLOv3 | Faster R-CNN | Retina Net | YOLOv5s | YOLOv5l | YOLOv7 | YOLOv8 | DBCW-YOLO |
---|---|---|---|---|---|---|---|---|
Cr | 40.9% | 44.7% | 45.9% | 42.3% | 43.2% | 46.3% | 42.7% | 51.0% |
In | 81.8% | 79.2% | 84.2% | 79.8% | 81.6% | 78.1% | 84.2% | 87.1% |
Pa | 91.8% | 82.1% | 91.1% | 92.4% | 92.5% | 88.6% | 90.8% | 93.0% |
PS | 94.9% | 89.4% | 88.6% | 92.5% | 92.9% | 90.5% | 89.0% | 92.8% |
RS | 64.2% | 65.3% | 58.6% | 54.7% | 61.8% | 67.7% | 65.4% | 70.0% |
Sc | 91.3% | 89.3% | 81.6% | 87.2% | 96.5% | 84.6% | 87.2% | 92.9% |
mAP 0.5 | 77.5% | 74.6% | 75.0% | 74.8% | 78.1% | 76.0% | 76.5% | 81.1% |
FPS | 55.2 | 17.4 | 41.2 | 97.1 | 48 | 125 | 57.6 | 33.8 |
Methods | Type | P | R | F1-Score | AP | mAP |
---|---|---|---|---|---|---|
YOLOv5m (baseline) | Cr | 56.1% | 26.7% | 0.362 | 39.8% | 75.3% |
In | 70.7% | 89.3% | 0.789 | 79.7% | ||
Pa | 81.0% | 89.7% | 0.851 | 91.6% | ||
PS | 85.9% | 82.9% | 0.844 | 90.5% | ||
RS | 51.9% | 66.0% | 0.581 | 58.6% | ||
Sc | 80.7% | 85.5% | 0.830 | 91.8% | ||
DBCW-YOLO (Improvement) | Cr | 56.8% | 46.3% | 0.510 | 51.0% | 81.1% |
In | 71.1% | 87.4% | 0.784 | 87.1% | ||
Pa | 79.4% | 93.0% | 0.857 | 93.0% | ||
PS | 93.2% | 80.5% | 0.864 | 92.8% | ||
RS | 65.2% | 77.4% | 0.708 | 70.0% | ||
Sc | 88.9% | 80.0% | 0.842 | 92.9% |
Methods | mAP 0.5 | Cr | In | Pa | PS | RS | Sc |
---|---|---|---|---|---|---|---|
YOLOv5m | 75.3% | 39.8% | 79.7% | 91.6% | 90.5% | 58.6% | 91.8% |
W-YOLO | 76.8% | 39.3% | 80.0% | 91.0% | 96.0% | 61.1% | 93.5% |
BC-YOLO | 77.3% | 40.6% | 80.7% | 95.1% | 96.8% | 61.7% | 88.9% |
D-YOLO | 78.5% | 47.3% | 80.6% | 93.4% | 94.4% | 61.5% | 94.1% |
DW-YOLO | 79.3% | 46.9% | 88.9% | 90.2% | 90.5% | 65.5% | 93.8% |
BCW-YOLO | 79.6% | 50.4% | 82.1% | 93.9% | 94.5% | 65.8% | 91.2% |
DBCW-YOLO | 81.1% | 51.0% | 87.1% | 93.0% | 92.8% | 70.0% | 92.9% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Han, J.; Cui, G.; Li, Z.; Zhao, J. DBCW-YOLO: A Modified YOLOv5 for the Detection of Steel Surface Defects. Appl. Sci. 2024, 14, 4594. https://doi.org/10.3390/app14114594
Han J, Cui G, Li Z, Zhao J. DBCW-YOLO: A Modified YOLOv5 for the Detection of Steel Surface Defects. Applied Sciences. 2024; 14(11):4594. https://doi.org/10.3390/app14114594
Chicago/Turabian StyleHan, Jianfeng, Guoqing Cui, Zhiwei Li, and Jingxuan Zhao. 2024. "DBCW-YOLO: A Modified YOLOv5 for the Detection of Steel Surface Defects" Applied Sciences 14, no. 11: 4594. https://doi.org/10.3390/app14114594
APA StyleHan, J., Cui, G., Li, Z., & Zhao, J. (2024). DBCW-YOLO: A Modified YOLOv5 for the Detection of Steel Surface Defects. Applied Sciences, 14(11), 4594. https://doi.org/10.3390/app14114594