Research on Defect Detection on Steel Rails Based on Improved YOLO11n Algorithm
Abstract
1. Introduction
Research Objectives and Content
2. Network Architecture of YOLO11n
2.1. Backbone Network (Backbone)
2.2. Neck Network (Neck)
2.3. Detection Head (Head)
3. Improvement Strategies and Outcomes
3.1. Adaptive Downsampling Method (ADown)
3.2. Design of SOEP-RFPN-MFM for Neck Network
3.3. Module Synergistic Mechanism
4. Experimental Results and Analysis
4.1. Datasets and Experimental Environment
4.1.1. Rail Defect Dataset
- Initial Annotation: A single annotator draws annotation boxes for defect areas and fills in the defect categories (Spalling/Squat/Wheel Burn/Corrugation) as well as the defect dimensions;
- Review: Another annotator inspects the initial annotation results image by image, with a focus on verifying the integrity of annotation boxes for small defects (whether the entire defect area is covered) and the accuracy of defect categories;
- Inter-annotator Agreement Verification: Cohen’s Kappa coefficient was calculated to evaluate defect category consistency (Kappa = 0.89, indicating high agreement), and IoU (Intersection over Union) was used to measure bounding box overlap consistency (average IoU = 0.91 for all defects, ≥0.85 for small defects);
- Final Approval: A senior instructor resolves disputed annotations identified in the review stage and generates the final annotation files (YOLO-format .txt files containing annotation box coordinates and category IDs).
4.1.2. Experimental Environment
4.1.3. Evaluation Metrics
- A target is predicted to belong to a certain class but does not actually exist in that class;
- The predicted class is incorrect;
- The predicted class is correct, but the IoU < falls below the threshold.
4.2. Ablation Studie
4.3. Comparative Experiments with Mainstream Models
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Chruzik, K.; Sitarz, M. Investigation and development of safety measures in the European Union railway transport. Mechanics 2014, 20, 431–437. [Google Scholar]
- Yang, W.C.; Yang, J.B.; Deng, E.; Ni, Y.Q.; Liu, Y.K. Aerodynamic behavior of flaky spalled blocks in high-speed rail tunnel lining under slipstream. Tunn. Undergr. Space Technol. 2023, 141, 105377. [Google Scholar] [CrossRef]
- Jiang, J.; Ding, L.; Zhou, Y.; Zhang, H. Differential settlement of track foundations identification based on GRU neural network. Remote Sens. 2023, 15, 2378. [Google Scholar] [CrossRef]
- Cheng, Y.; Liu, Z.; Huang, K. Transient analysis of electric arc burning at insulated rail joints in high-speed railway stations based on state-space modeling. IEEE Trans. Transp. Electrif. 2017, 3, 750–761. [Google Scholar] [CrossRef]
- Sun, Y.; Guo, Y.; Lv, K.; Chen, M.; Zhai, W. Effect of hollow-worn wheels on the evolution of rail wear. Wear 2019, 436, 203032. [Google Scholar] [CrossRef]
- Mićić, M.; Brajović, L.; Lazarević, L.; Popović, Z. Inspection of RCF rail defects–Review of NDT methods. Mech. Syst. Signal Process. 2023, 182, 109568. [Google Scholar] [CrossRef]
- Li, X.; Wang, Q.; Yang, X.; Wang, K.; Zhang, H. Track fastener defect detection model based on improved YOLOv5s. Sensors 2023, 23, 6457. [Google Scholar] [CrossRef]
- Yu, Q.; Liu, A.; Yang, X.; Diao, W. An improved lightweight deep learning model and implementation for track fastener defect detection with unmanned aerial vehicles. Electronics 2024, 13, 1781. [Google Scholar] [CrossRef]
- Mao, Y.; Zheng, S.; Li, L.; Shi, R.; An, X. Research on Rail Surface Defect Detection Based on Improved CenterNet. Electronics 2024, 13, 3580. [Google Scholar] [CrossRef]
- Yang, H.; Wang, Y.; Hu, J.; He, J.; Yao, Z.; Bi, Q. Deep learning and machine vision-based inspection of rail surface defects. IEEE Trans. Instrum. Meas. 2021, 71, 1–14. [Google Scholar] [CrossRef]
- Kawulok, M.; Maćkowski, M. YOLO-type neural networks in the process of adapting mathematical graphs to the needs of the blind. Appl. Sci. 2024, 14, 11829. [Google Scholar] [CrossRef]
- Xin, H.; Song, J. YOLOv5-ACCOF Steel Surface Defect Detection Algorithm. IEEE Access 2024, 12, 157496–157506. [Google Scholar] [CrossRef]
- Chao, C.; Mu, X.; Guo, Z.; Sun, Y.; Tian, X.; Yong, F. IAMF-YOLO: Metal Surface Defect Detection Based on Improved YOLOv8. IEEE Trans. Instrum. Meas. 2025, 74, 1–17. [Google Scholar] [CrossRef]
- Dang, Z.; Wang, X. FD-Y0L011: A Feature-Enhanced Deep Learning Model for Steel Surface Defect Detection. IEEE Access 2025, 13, 63981–63993. [Google Scholar] [CrossRef]
- Liao, Y.; Qiu, Y.; Liu, B.; Qin, Y.; Wang, Y.; Wu, Z.; Xu, L.; Feng, A. YOLOv8A-SD: A Segmentation-Detection Algorithm for Overlooking Scenes in Pig Farms. Animals 2025, 15, 1000. [Google Scholar] [CrossRef]
- Oday, A.; Abdullah, A.; Sahran, S. YOLO-OSAM: Reassembly Spatial Attention Mechanisms for Facial Expression Recognition. Trait. Du Signal 2025, 42, 2379. [Google Scholar] [CrossRef]
- Zi, D.; Chen, W.; Ni, Y.; Zhang, W. RSE-YOLO: A lightweight steel strip surface defect detection algorithm based on an improved YOLOv11. J. Real-Time Image Process. 2026, 23, 24. [Google Scholar] [CrossRef]
- Cornelius, J.; Peters, N.; Ågren, T.; Hjelm, H. Multi-Fidelity Modeling of Isolated Hovering Rotors. Aerospace 2025, 12, 650. [Google Scholar] [CrossRef]
- Ni, Y.; Mao, J.; Fu, Y.; Wang, H.; Zong, H.; Luo, K. Damage detection and localization of bridge deck pavement based on deep learning. Sensors 2023, 23, 5138. [Google Scholar] [CrossRef]
- Peng, Z.; He, H. Deep Learning-Enhanced Electronic Packaging Defect Detection via Fused Thermal Simulation and Infrared Thermography. Appl. Sci. 2025, 15, 6592. [Google Scholar] [CrossRef]
- Wang, X.; Ma, S.; Wu, S.; Li, Z.; Cao, J.; Xu, P. Detection of Surface Defects in Steel Based on Dual-Backbone Networks-MBDNet-Attention-YOLO. Sensors 2025, 25, 4817. [Google Scholar] [PubMed]
- Li, Y.; Wang, J.; Zhang, K.; Yi, J.; Wei, M.; Zheng, L.; Xie, W. Lightweight object detection networks for UAV aerial images based on YOLO. Chin. J. Electron. 2024, 33, 997–1009. [Google Scholar] [CrossRef]
- Ma, W.; Guan, Z.; Wang, X.; Yang, C.; Cao, J. YOLO-FL: A target detection algorithm for reflective clothing wearing inspection. Displays 2023, 80, 102561. [Google Scholar] [CrossRef]
- Bhagwat, A.; Dutta, S.; Saha, D.; Reddy, M.J.B. An online 11 kv distribution system insulator defect detection approach with modified YOLOv11 and mobileNetV3. Sci. Rep. 2025, 15, 15691. [Google Scholar] [CrossRef] [PubMed]
- Xu, Y.; Wu, H.; Liu, Y.; Zhang, X. PCB Electronic Component Soldering Defect Detection Using YOLO11 Improved by Retention Block and Neck Structure. Sensors 2025, 25, 3550. [Google Scholar] [CrossRef]
- Wang, X.; Zhang, Z.; Shang, X. Research on Improved YOLO11 for Detecting Small Targets in Sonar Images Based on Data Enhancement. Appl. Sci. 2025, 15, 6919. [Google Scholar] [CrossRef]
- Ren, L.; Li, Y.; Du, Y.; Gao, A.; Ma, W.; Song, Y.; Han, X. GIA-YOLO: A Target Detection Method for Nectarine Picking Robots in Facility Orchards. Agronomy 2025, 15, 1934. [Google Scholar] [CrossRef]
- Li, H. Rethinking Features-Fused-Pyramid-Neck for Object Detection. In Proceedings of the European Conference on Computer Vision, Milan, Italy, 29 September–4 October 2024; Springer Nature: Cham, Switzerland, 2024; pp. 74–90. [Google Scholar]
- Zhang, Y.; Zhou, S.; Li, H. Depth information assisted collaborative mutual promotion network for single image dehazing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 16–22 June 2024; pp. 2846–2855. [Google Scholar]










| Module | Core Function | Addressed Rail Detection Pain Points |
|---|---|---|
| ADown | Two-dimensional average pooling preserves the global features of steel rails. Channel-wise processing of feature maps: one branch for convolutional downsampling and one branch for MaxPool to extract local details | Standard convolutional downsampling in the original model causes the loss of texture information for <0.2 mm micro-cracks and micro-spalling. |
| SOEP-RFPN-MFM | SNI Module: Optimizes spatial normalization interaction and reduces the semantic deviation between ballast background and defects. GSConvE Module: Uses lightweight convolution to balance the computational cost and the preservation of strip texture for wheel burn. MFM Module: Implements dynamic weight assignment and enhances the feature representation of small defects smaller than 50 pixels2. | Features of large targets mask the features of small defects. Due to similar textures, wheel burn and corrugated wear exhibit a high inter-class confusion rate. |
| Project | Parameter Value or Name |
|---|---|
| CPU | 12th Gen Intel (R) Core (TM) i5-124007 (2.50 GHz) |
| GPU | NVIDIA GeForce RTX 4060 |
| Operating system | Windows 11 |
| Programming language | Python 3.11.9 |
| Deep learning framework | Pytorch 2.7.1 |
| CUDA | 11.8 |
| Training Iterations | 300 |
| Parameters | Setup |
|---|---|
| Batch size | 64 |
| Image size | 640 × 640 |
| Initial learning rate | 0.01 |
| Final learning rate | 0.01 |
| Weight decay | 0.0005 |
| Momentum | 0.937 |
| Optimizer | SGD |
| Algorithm Configuration | Precision (P) | Recall (R) | Mean Average Precision (mAP) | F1 Score |
|---|---|---|---|---|
| YOLO11n | 92.5% | 89.6% | 94.8% | 91.2% |
| +ADown | 96% | 93.4% | 97.6% | 95% |
| +SOEP-RFPN-MFM | 93.6% | 87.9% | 95.2% | 91% |
| +SOEP-RFPN-MFM + Original Downsampling | 93.5% | 87.7% | 95.0% | 90.8% |
| +ADown + SOEP-RFPN-MFM without the MFM module | 93.2% | 90.5% | 94.5% | 91.8% |
| +ADown+SOEP-RFPN-MFM | 93.7% | 92.4% | 95.6% | 93% |
| Model | Precision (P) | Recall (R) | Mean Average Precision (mAP) | F1 Score |
|---|---|---|---|---|
| Faster R-CNN | 93.0% | 88.5% | 94.0% | 90.7% |
| SSD | 91.5% | 87.2% | 93.5% | 89.3% |
| YOLOv5 | 93.2% | 91.1% | 95% | 92% |
| YOLOv8 | 93.4% | 92.0% | 95.3% | 92.7% |
| YOLOv10n | 84.5% | 88.5% | 93.6% | 86% |
| YOLO11n | 92.5% | 89.6% | 94.8% | 91.2% |
| Improved YOLO11n | 93.7% | 92.4% | 95.6% | 93% |
| RT-DETR-tiny | 93.5% | 92.2% | 95.4% | 92.8% |
| Defect Types | Model Version | Class-Level AP@0.5 (Conventional Threshold) |
|---|---|---|
| Spalling | YOLO11n | 93.7% |
| Improved YOLO11n | 94.2% | |
| Squat | YOLO11n | 97.6% |
| Improved YOLO11n | 98.2% | |
| Wheel Burn | YOLO11n | 91.4% |
| Improved YOLO11n | 91.4% | |
| Corrugation | YOLO11n | 98.5% |
| Improved YOLO11n | 98.5% |
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. |
© 2026 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.
Share and Cite
Wang, H.; Zhao, J. Research on Defect Detection on Steel Rails Based on Improved YOLO11n Algorithm. Appl. Sci. 2026, 16, 842. https://doi.org/10.3390/app16020842
Wang H, Zhao J. Research on Defect Detection on Steel Rails Based on Improved YOLO11n Algorithm. Applied Sciences. 2026; 16(2):842. https://doi.org/10.3390/app16020842
Chicago/Turabian StyleWang, Hongyu, and Junmei Zhao. 2026. "Research on Defect Detection on Steel Rails Based on Improved YOLO11n Algorithm" Applied Sciences 16, no. 2: 842. https://doi.org/10.3390/app16020842
APA StyleWang, H., & Zhao, J. (2026). Research on Defect Detection on Steel Rails Based on Improved YOLO11n Algorithm. Applied Sciences, 16(2), 842. https://doi.org/10.3390/app16020842
