Rail Surface Defect Detection Based on An Improved YOLOv5s
Abstract
:1. Introduction
2. Related Works
2.1. YOLOv5s Network Model Structure
2.2. Data Enhancement
3. Methodology
3.1. CDConv
3.2. C3STR Module
3.3. SGPH
3.4. Soft-SIoUNMS
4. Experiments
4.1. Experimental Environment
4.2. Evaluation Indicators
4.3. Analysis of Experimental Results
4.3.1. Ablation Experiments
4.3.2. Improved Model Comparison Experiments
- The number of C3STRs
- Attention mechanism
- Loss function
4.3.3. Performance Comparison Experiments
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Jessop, C.; Ahlström, J.; Hammar, L.; Fæster, S.; Danielsen, H.K. 3D characterization of rolling contact fatigue crack networks. Wear 2016, 15, 392–400. [Google Scholar] [CrossRef] [Green Version]
- Papaelias, M.P.; Lugg, M. Detection and evaluation of rail surface defects using alternating current field measurement techniques. Proc. Inst. Mech. Eng. Part F J. Rail Rapid Transit 2012, 226, 530–541. [Google Scholar] [CrossRef]
- Jiang, Y.; Wang, H.; Tian, G.; Chen, S.; Zhao, J.; Liu, Q.; Hu, P. Non-contact ultrasonic detection of rail surface defects in different depths. In Proceedings of the 2018 IEEE Far East NDT New Technology & Application Forum (FENDT), Xiamen, China, 6–8 July 2018; pp. 46–49. [Google Scholar]
- Ye, J.; Edward, S.; Clive, R. Use of a 3D model to improve the performance of laser-based railway track inspection. Proc. Inst. Mech. Eng. Part F J. Rail Rapid Transit 2019, 233, 337–355. [Google Scholar] [CrossRef] [Green Version]
- Wang, P.; Gao, Y.; Tian, G.; Wang, H. Velocity effect analysis of dynamic magnetization in high speed magnetic flux leakage inspection. NDT E Int. 2014, 6, 7–12. [Google Scholar] [CrossRef]
- Zhang, Y.; Luo, L.; Zhang, Y.; Gao, X.; Long, J. Interlaced scanning by laser ultrasonic for defects imaging of train rail surface. In Proceedings of the Eleventh International Conference on Information Optics and Photonics (CIOP 2019), Xi’an, China, 6–9 August 2019; SPIE: Bellingham, WA, USA, 2019; pp. 189–199. [Google Scholar]
- Kou, L. A review of research on detection and evaluation of the rail surface defects. Acta Polytech. Hung. 2022, 19, 167–186. [Google Scholar] [CrossRef]
- Dubey, A.; Jaffery, Z. Maximally Stable Extremal Region Marking-Based Railway Track Surface Defect Sensing. IEEE Sens. J. 2016, 16, 9047–9052. [Google Scholar] [CrossRef]
- Yuan, X.C.; Wu, L.S.; Chen, H.W. Rail image segmentation based on Otsu threshold method. Opt. Precis. Eng. 2016, 24, 1772–1781. [Google Scholar] [CrossRef]
- Li, Q.; Ren, S. A Real-Time Visual Inspection System for Discrete Surface Defects of Rail Heads. IEEE Trans. Instrum. Meas. 2012, 61, 2189–2199. [Google Scholar] [CrossRef]
- He, Z.; Wang, Y.N.; Mao, J.; Yin, F. Research on inverse P-M diffusion-based rail surface defect detection. Acta Autom. Sin. 2014, 40, 1667–1679. [Google Scholar]
- He, Z.; Wang, Y.; Liu, J.; Yin, F. Background differencing-based high-speed rail surface defect image segmentation. Chin. J. Sci. Instrum. 2016, 37, 640–649. [Google Scholar]
- Tian, S.; Kong, J.Y.; Wang, X.D. Improved Sobel algorithm for defect detection of rail surfaces with enhanced efficiency and accuracy. J. Central South Univ. 2016, 23, 2867–2875. [Google Scholar]
- Wang, H.; Wang, M.; Zhang, H. Vision saliency detection of rail surface defects based on PCA model and color features. Process. Autom. Instrum. 2017, 38, 73–76. [Google Scholar]
- Liu, Q.Q.; Zhou, H.Y.; Wang, X.Z. Research on Rail Surface Defect Detection Method Based on Gray Equalization Model Combined with Gabor Filter. Surf. Technol. 2018, 19, 745–755. [Google Scholar]
- Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the 2014 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. Comput. Sci. 2015, 3, 1440–1448. [Google Scholar]
- Ren, S.; He, K.; 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] [Green Version]
- Faghih-Roohi, S.; Hajizadeh, S.; Nunez, A.; Babuska, R.; De Schutter, B. Deep Convolutional Neural Networks for Detection of Rail Surface Defects. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), Vancouver, BC, Canada, 24–29 July 2016; pp. 2584–2589. [Google Scholar]
- Gibert, X.; Patel, V.M.; Chellappa, R. Deep Multitask Learning for Railway Track Inspection. IEEE Trans. Intell. Transp. Syst. 2016, 18, 153–164. [Google Scholar] [CrossRef] [Green Version]
- Shang, L.; Yang, Q.; Wang, J.; Li, S.; Lei, W. Detection of rail surface defects based on CNN image recognition and classification. In Proceedings of the 2018 20th International Conference on Advanced Communication Technology (ICACT), Chuncheon, Republic of Korea, 11–14 February 2018; pp. 45–51. [Google Scholar]
- Yu, C.; Deng, H.G.; Feng, Y.X. Effects of Faster Region-based Convolutional Neural Network on the Detection Efficiency of Rail Defects under Machine Vision. In Proceedings of the 2020 IEEE 5th Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 12–14 June 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1377–1380. [Google Scholar]
- Jin, X.; Wang, Y.; Zhang, H.; Zhong, H.; Liu, L.; Wu, Q.J.; Yang, Y. DM-RIS: Deep Multi model Rail Inspection System with Improved MRF-GMM and CNN. IEEE Trans. Instrum. Meas. 2020, 69, 1051–1065. [Google Scholar] [CrossRef]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; Volume 8, pp. 779–788. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLO9000: Better, Faster, Stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; Volume 3, pp. 6517–6525. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLOv3: An incremental improvement. In Proceedings of the 2018 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 2767–2773. [Google Scholar]
- Bochkovskiy, A.; Wang, C.Y.; Liao, H.Y. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single Shot Multi Box Detector. European Conference on Computer Vision; Springer: Cham, Switzerland, 2016; Volume 12, pp. 21–37. [Google Scholar]
- Song, Y.N.; Zhang, G.H.; Liu, L.; Zhang, H. Rail surface defect detection method based on YOLOv3 deep learning networks. In Proceedings of the CAC 2018: Proceedings of the 2018 Chinese Automation Congress, Xi’an, China, 30 November–2 December 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 1563–1568. [Google Scholar]
- Wei, X.; Wei, D.; Suo, D.; Jia, L.; Li, Y. Multi-Target Defect Identification for Railway Track Line Based on Image Processing and Improved YOLOv3 Model. IEEE Access 2020, 8, 61973–61988. [Google Scholar] [CrossRef]
- Zhao, J.; Zhang, X.; Yan, J.; Qiu, X.; Yao, X.; Tian, Y.; Zhu, Y.; Cao, W. A Wheat Spike Detection Method in UAV Images Based on Improved YOLOv5. Remote Sens. 2021, 13, 3095. [Google Scholar] [CrossRef]
- Zhu, X.; Lyu, S.; Wang, X.; Zhao, Q. TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-captured Scenarios. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Montreal, BC, Canada, 11–17 October 2021; pp. 2778–2788. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention Is All You Need. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS’17), Long Beach, CA, USA, 4–9 December 2017; pp. 6000–6010. [Google Scholar]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical vision Transformer using shifted windows. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, BC, Canada, 11–17 October 2021; pp. 9992–10002. [Google Scholar]
- Liu, Y.; Shao, Z.; Hoffmann, N. Global Attention Mechanism: Retain Information to Enhance Channel Spatial Interactions. Comput. Sci. 2021, 26, 1–5. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision, Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Gevorgyan, Z. SIoU loss: More powerful learning for bounding box regression. arXiv 2022, arXiv:2205.12740. [Google Scholar]
- Bodla, N.; Singh, B.; Chellappa, R.; Davis, L.S. Soft-NMS—Improving Object Detection With One Line of Code. In Proceedings of the 2017 IEEE International Conference on Computer Vision ICCV, Venice, Italy, 22–29 October 2017; Volume 5, pp. 5562–5570. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. Yolox: Exceeding yolo series in 2021. Comput. Sci. 2021, 13, 1–7. [Google Scholar]
Model Name | P | R | [email protected] |
---|---|---|---|
YOLOv5s | 0.965 | 0.933 | 0.954 |
YOLOv5s + CDConv (Method1) | 0.968 | 0.936 | 0.961 |
YOLOv5s + CDConv + C3STR (Method2) | 0.951 | 0.936 | 0.963 |
YOLOv5s + CDConv + C3STR + CBAM (Method3) | 0.963 | 0.938 | 0.964 |
YOLOv5s + CDConv + C3STR + GAM (Method4) | 0.967 | 0.940 | 0.965 |
YOLOv5s + CDConv + C3STR + GAM + Soft-SIoUNMS (Ours) | 0.971 | 0.945 | 0.969 |
Model | Number of C3STRs | P | R | [email protected] |
---|---|---|---|---|
YOLOv5s + CDConv + C3STR | 1 | 0.943 | 0.933 | 0.950 |
YOLOv5s + CDConv + C3STR | 2 | 0.944 | 0.935 | 0.948 |
YOLOv5s + CDConv + C3STR | 3 | 0.951 | 0.936 | 0.951 |
YOLOv5s + CDConv + C3STR | 4 | 0.951 | 0.936 | 0.963 |
YOLOv5s + CDConv + C3STR | 5 | 0.949 | 0.934 | 0.953 |
Model | P | R | [email protected] |
---|---|---|---|
YOLOv5s + CDConv + C3STRs + CBAM | 0.963 | 0.938 | 0.964 |
YOLOv5s + CDConv + C3STRs + ECA | 0.964 | 0.935 | 0.961 |
YOLOv5s + CDConv + C3STRs + CA | 0.951 | 0.936 | 0.963 |
YOLOv5s + CDConv + C3STRs + SE | 0.962 | 0.938 | 0.960 |
YOLOv5s + CDConv + C3STRs + GAM | 0.967 | 0.940 | 0.965 |
Model | P | R | [email protected] |
---|---|---|---|
YOLOv5s + CDConv + C3STRs + EIoU | 0.965 | 0.933 | 0.954 |
YOLOv5s + CDConv + C3STRs + GIoU | 0.968 | 0.936 | 0.961 |
YOLOv5s + CDConv + C3STRs + AlphaIoU | 0.951 | 0.936 | 0.963 |
YOLOv5s + CDConv + C3STRs + SIOU | 0.963 | 0.938 | 0.964 |
YOLOv5s + CDConv + C3STRs + Soft-NMS | 0.965 | 0.938 | 0.962 |
YOLOv5s + CDConv + C3STRs + Soft-SIoUNMS | 0.972 | 0.950 | 0.965 |
Model Name | P | R | [email protected] | Times/ms |
---|---|---|---|---|
YOLOv4 | 92.05 | 78.74 | 90.37 | 38.4 |
YOLOv5s | 96.55 | 93.34 | 95.43 | 16.3 |
YOLOX | 96.95 | 91.62 | 95.84 | 22.7 |
Faster-RCNN | 94.39 | 74.61 | 94.43 | 160.3 |
EfficientDet | 96.49 | 71.20 | 90.81 | 54.1 |
Ours | 97.13 | 94.53 | 96.90 | 29.2 |
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. |
© 2023 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
Luo, H.; Cai, L.; Li, C. Rail Surface Defect Detection Based on An Improved YOLOv5s. Appl. Sci. 2023, 13, 7330. https://doi.org/10.3390/app13127330
Luo H, Cai L, Li C. Rail Surface Defect Detection Based on An Improved YOLOv5s. Applied Sciences. 2023; 13(12):7330. https://doi.org/10.3390/app13127330
Chicago/Turabian StyleLuo, Hui, Lianming Cai, and Chenbiao Li. 2023. "Rail Surface Defect Detection Based on An Improved YOLOv5s" Applied Sciences 13, no. 12: 7330. https://doi.org/10.3390/app13127330
APA StyleLuo, H., Cai, L., & Li, C. (2023). Rail Surface Defect Detection Based on An Improved YOLOv5s. Applied Sciences, 13(12), 7330. https://doi.org/10.3390/app13127330