Defect Detection in Freight Trains Using a Lightweight and Effective Multi-Scale Fusion Framework with Knowledge Distillation
Abstract
:1. Introduction
- We replaced the original YOLOv8 backbone with the Mobilenetv4 network structure, improving the model’s feature extraction capability and providing multi-scale features for detection.
- We designed an attention-guided multi-scale fusion module suitable for object detection, effectively fusing high-level and low-level detail features and enhancing the model’s detection ability.
- We designed a knowledge distillation process where a larger model serves as the teacher model to guide the training of a student model with higher performance and lighter weight, making it more competitive in industrial applications.
2. Related Work
2.1. Defect Detection of Train Equipment
2.2. Knowledge Distillation
3. Method
3.1. Heavy-Duty Train Equipment Defect (HTED) Dataset
3.2. MobileNetV4-Based Backbone
3.3. Content-Guided Feature Fusion Module
3.4. Knowledge Distillation
4. Experiments
4.1. Dataset and Metrics
4.1.1. Dataset
4.1.2. Metrics
4.2. Performance Evaluation
4.3. Ablation Studies
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Correction Statement
References
- Aung, K.H.H.; Kok, C.L.; Koh, Y.Y.; Teo, T.H. An Embedded Machine Learning Fault Detection System for Electric Fan Drive. Electronics 2024, 13, 493. [Google Scholar] [CrossRef]
- Gan, J.; Li, Q.; Wang, J.; Yu, H. A hierarchical extractor-based visual rail surface inspection system. IEEE Sens. J. 2017, 17, 7935–7944. [Google Scholar] [CrossRef]
- Hoshi, T.; Baba, Y.; Gavai, G. Railway Anomaly detection model using synthetic defect images generated by CycleGAN. arXiv 2021, arXiv:2102.12595. [Google Scholar]
- Han, Y.; Liu, Z.; Lyu, Y.; Liu, K.; Li, C.; Zhang, W. Deep learning-based visual ensemble method for high-speed railway catenary clevis fracture detection. Neurocomputing 2020, 396, 556–568. [Google Scholar] [CrossRef]
- Das, S.; Kong, X.; Lavrenz, S.M.; Wu, L.; Jalayer, M. Fatal crashes at highway rail grade crossings: A US based study. Int. J. Transp. Sci. Technol. 2022, 11, 107–117. [Google Scholar] [CrossRef]
- Pahwa, R.S.; Chao, J.; Paul, J.; Li, Y.; Nwe, M.T.L.; Xie, S.; James, A.; Ambikapathi, A.; Zeng, Z.; Chandrasekhar, V.R. Faultnet: Faulty rail-valves detection using deep learning and computer vision. In Proceedings of the 2019 IEEE Intelligent Transportation Systems Conference (ITSC), Auckland, New Zealand, 27–30 October 2019; pp. 559–566. [Google Scholar]
- Qin, D.; Leichner, C.; Delakis, M.; Fornoni, M.; Luo, S.; Yang, F.; Wang, W.; Banbury, C.; Ye, C.; Akin, B.; et al. MobileNetV4: Universal Models for the Mobile Ecosystem. In Computer Vision—ECCV 2024, Proceedings of the European Conference on Computer Vision, Milan, Italy, 29 September–4 October 2024; Springer: Cham, Switzerland, 2025; pp. 78–96. [Google Scholar]
- Chen, Z.; He, Z.; Lu, Z.M. DEA-Net: Single image dehazing based on detail-enhanced convolution and content-guided attention. IEEE Trans. Image Process. 2024, 33, 1002–1015. [Google Scholar] [CrossRef] [PubMed]
- Lin, T.Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft coco: Common objects in context. In Proceedings of the Computer Vision—ECCV 2014: 13th European Conference, Zurich, Switzerland, 6–12 September 2014; Proceedings, Part V 13. Springer: Cham, Switzerland, 2014; pp. 740–755. [Google Scholar]
- Mital, A.; Govindaraju, M.; Subramani, B. A comparison between manual and hybrid methods in parts inspection. Integr. Manuf. Syst. 1998, 9, 344–349. [Google Scholar] [CrossRef]
- Park, J.K.; Kwon, B.K.; Park, J.H.; Kang, D.J. Machine learning-based imaging system for surface defect inspection. Int. J. Precis. Eng. Manuf.-Green Technol. 2016, 3, 303–310. [Google Scholar] [CrossRef]
- Du, J.; Zhang, R.; Gao, R.; Nan, L.; Bao, Y. RSDNet: A New Multiscale Rail Surface Defect Detection Model. Sensors 2024, 24, 3579. [Google Scholar] [CrossRef] [PubMed]
- Wu, Y.; Qin, Y.; Qian, Y.; Guo, F.; Wang, Z.; Jia, L. Hybrid deep learning architecture for rail surface segmentation and surface defect detection. Comput.-Aided Civ. Infrastruct. Eng. 2022, 37, 227–244. [Google Scholar] [CrossRef]
- Wen, Y.; Gao, X.; Luo, L.; Li, J. Improved YOLOv8-Based Target Precision Detection Algorithm for Train Wheel Tread Defects. Sensors 2024, 24, 3477. [Google Scholar] [CrossRef] [PubMed]
- Xing, Z.; Zhang, Z.; Yao, X.; Qin, Y.; Jia, L. Rail wheel tread defect detection using improved YOLOv3. Measurement 2022, 203, 111959. [Google Scholar] [CrossRef]
- Min, Y.; Xiao, B.; Dang, J.; Yue, B.; Cheng, T. Real time detection system for rail surface defects based on machine vision. Eurasip J. Image Video Process. 2018, 2018, 3. [Google Scholar] [CrossRef]
- Jiang, Q.; Gao, R.; Zhao, Y.; Yu, W.; Dang, Z.; Deng, S. Research on a Wear Defect Detection Method for a Switch Sliding Baseplate Based on Improved Yolov5. Lubricants 2024, 12, 422. [Google Scholar] [CrossRef]
- Fu, X.; Li, K.; Liu, J.; Li, K.; Zeng, Z.; Chen, C. A two-stage attention aware method for train bearing shed oil inspection based on convolutional neural networks. Neurocomputing 2020, 380, 212–224. [Google Scholar] [CrossRef]
- Bodini, I.; Petrogalli, C.; Faccoli, M.; Mazzù, A. Vision-based damage analysis in shoe-braking tests on railway wheel steels. Wear 2022, 510, 204514. [Google Scholar] [CrossRef]
- Guo, G.; Peng, J.; Yang, K.; Xie, L.; Song, W. Wheel tread defects inspection based on SVM. In Proceedings of the 2017 Far East NDT New Technology & Application Forum (FENDT), Xi’an, China, 22–24 June 2017; pp. 251–253. [Google Scholar]
- Sresakoolchai, J.; Kaewunruen, S. Railway defect detection based on track geometry using supervised and unsupervised machine learning. Struct. Health Monit. 2022, 21, 1757–1767. [Google Scholar] [CrossRef]
- Saini, A.; Singh, D.; Alvarez, M. FishTwoMask R-CNN: Two-stage Mask R-CNN approach for detection of fishplates in high-altitude railroad track drone images. Multimed. Tools Appl. 2024, 83, 10367–10392. [Google Scholar] [CrossRef]
- Wang, C.; He, W.; Nie, Y.; Guo, J.; Liu, C.; Wang, Y.; Han, K. Gold-YOLO: Efficient object detector via gather-and-distribute mechanism. Adv. Neural Inf. Process. Syst. 2024, 36, 51094–51112. [Google Scholar]
- CanYang, X.; Yingying, L.; Yongqiang, L.; Runliang, T.; Tao, G. Lightweight rail surface defect detection algorithm based on an improved YOLOv8. Measurement 2025, 242, 115922. [Google Scholar] [CrossRef]
- Minguell, M.G.; Pandit, R. TrackSafe: A comparative study of data-driven techniques for automated railway track fault detection using image datasets. Eng. Appl. Artif. Intell. 2023, 125, 106622. [Google Scholar] [CrossRef]
- 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. 2016, 39, 1137–1149. [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]
- Zhang, X.; Shen, B.; Li, J.; Ruan, J. Lightweight Algorithm for Rail Fastener Status Detection Based on YOLOv8n. Electronics 2024, 13, 3399. [Google Scholar] [CrossRef]
- Tan, M.; Pang, R.; Le, Q.V. Efficientdet: Scalable and efficient object detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, Seattle, WA, USA, 13–19 June 2020; pp. 10781–10790. [Google Scholar]
- Hinton, G. Distilling the Knowledge in a Neural Network. arXiv 2015, arXiv:1503.02531. [Google Scholar]
- Gou, J.; Yu, B.; Maybank, S.J.; Tao, D. Knowledge distillation: A survey. Int. J. Comput. Vis. 2021, 129, 1789–1819. [Google Scholar] [CrossRef]
- Nguyen, C.H.; Nguyen, T.C.; Tang, T.N.; Phan, N.L. Improving object detection by label assignment distillation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, HI, USA, 3–8 January 2022; pp. 1005–1014. [Google Scholar]
- Zheng, Z.; Ye, R.; Hou, Q.; Ren, D.; Wang, P.; Zuo, W.; Cheng, M.M. Localization distillation for object detection. IEEE Trans. Pattern Anal. Mach. Intell. 2023, 45, 10070–10083. [Google Scholar] [CrossRef] [PubMed]
- Wang, W.; Hong, W.; Wang, F.; Yu, J. Gan-knowledge distillation for one-stage object detection. IEEE Access 2020, 8, 60719–60727. [Google Scholar] [CrossRef]
- Wan, W.; Chen, J.; Xie, J. Graph-Based Model Compression for HSR Bogies Fault Diagnosis at IoT Edge via Adversarial Knowledge Distillation. IEEE Trans. Intell. Transp. Syst. 2023, 25, 1787–1796. [Google Scholar] [CrossRef]
- Zhu, A.; Xie, J.; Wang, B.; Guo, H.; Guo, Z.; Wang, J.; Xu, L.; Zhu, S.; Yang, Z. Lightweight defect detection algorithm of tunnel lining based on knowledge distillation. Sci. Rep. 2024, 14, 27178. [Google Scholar] [CrossRef] [PubMed]
- Xing, Z.; Chen, X.; Pang, F. DD-YOLO: An object detection method combining knowledge distillation and Differentiable Architecture Search. IET Comput. Vis. 2022, 16, 418–430. [Google Scholar] [CrossRef]
- Yang, Q.; Li, F.; Tian, H.; Li, H.; Xu, S.; Fei, J.; Wu, Z.; Feng, Q.; Lu, C. A new knowledge-distillation-based method for detecting conveyor belt defects. Appl. Sci. 2022, 12, 10051. [Google Scholar] [CrossRef]
- Sinha, D.; El-Sharkawy, M. Thin mobilenet: An enhanced mobilenet architecture. In Proceedings of the 2019 IEEE 10th annual ubiquitous computing, electronics & mobile communication conference (UEMCON), New York, NY, USA, 10–12 October 2019; pp. 280–285. [Google Scholar]
- Zhang, Y.; Liu, M.; Chen, Y.; Zhang, H.; Guo, Y. Real-time vision-based system of fault detection for freight trains. IEEE Trans. Instrum. Meas. 2019, 69, 5274–5284. [Google Scholar] [CrossRef]
- Liu, R.; Wang, Y. Principle and Application of TFDS. Chin. Railw. 2005, 2, 26–27. [Google Scholar] [CrossRef]
- Kounadis-Bastian, D.; Schrüfer, O.; Derington, A.; Wierstorf, H.; Eyben, F.; Burkhardt, F.; Schuller, B. Wav2Small: Distilling Wav2Vec2 to 72K parameters for Low-Resource Speech emotion recognition. arXiv 2024, arXiv:2408.13920. [Google Scholar]
- Cui, Y.; Li, M.; Huang, X.; Yang, Y. Lightweight UAV Image Drowning Detection Method Based on Improved YOLOv7. In Proceedings of the 2024 WRC Symposium on Advanced Robotics and Automation (WRC SARA), Beijing, China, 23 August 2024; pp. 350–356. [Google Scholar]
- Neamah, O.N.; Almohamad, T.A.; Bayir, R. Enhancing road safety: Real-time distracted driver detection using Nvidia Jetson Nano and YOLOv8. In Proceedings of the 2024 Zooming Innovation in Consumer Technologies Conference (ZINC), Novi Sad, Serbia, 22–23 May 2024; pp. 194–198. [Google Scholar]
- Pravallika, A.; Kumar, C.A.; Praneeth, E.S.; Abhilash, D.; Priya, G.S. Efficient Vehicle Detection System Using YOLOv8 on Jetson Nano Board. In Proceedings of the 2024 IEEE International Conference on Information Technology, Electronics and Intelligent Communication Systems (ICITEICS), Bangalore, India, 28–29 June 2024; pp. 1–6. [Google Scholar]
Methods | SR-Deformation | L-Deformation | L-Missing | DL-Broken | All | Inference Time (ms) |
---|---|---|---|---|---|---|
Yolov8n | 0.989/0.877 | 0.963/0.871 | 0.991/0.87 | 0.977/0.754 | 0.98/0.843 | 7.66 |
Yolov8s | 0.989/0.895 | 0.973/0.876 | 0.992/0.872 | 0.968/0.741 | 0.984/0.846 | 9.50 |
Yolov8m | 0.99/0.85 | 0.986/0.911 | 0.99/0.888 | 0.972/0.753 | 0.985/0.850 | 12.0 |
Gold-Yolo | - | - | - | - | 0.974/0.808 | 7.68 |
GD-YOLOv8 | 0.99/0.678 | 0.23/0.077 | 0/0 | 0.98/0.743 | 0.547/0.375 | 6.80 |
Ours | 0.99/0.908 | 0.991/0.907 | 0.99/0.875 | 0.987/0.755 | 0.99/0.861 | 7.74 |
Methods | Size | mAP50-95 | Params (M) | FLOPs |
---|---|---|---|---|
YOLOv5n | 640 | 28.0 | 3.15 | 4.5 |
YOLOv5m | 640 | 45.4 | 21.2 | 49.0 |
YOLOv5n6 | 1280 | 36.0 | 3.2 | 4.6 |
YOLOv6n | 640 | 35.0 | 4.3 | 11.1 |
YOLOv8n | 640 | 37.3 | 3.2 | 8.9 |
YOLOv8m | 640 | 50.2 | 25.9 | 78.9 |
Ours | 640 | 47.3 | 5.9 | 22.9 |
Backbone | Feature-Fusion | Params (M) | mAP50 | mAP50-95 | Memory (M) |
---|---|---|---|---|---|
Mobilenetv4 | CGAFusion | 5.9 | 0.990 | 0.861 | 23.12 |
ShuffleNet | CGAFusion | 24.5 | 0.985 | 0.760 | 76.0 |
FasterNet | CGAFusion | 6.79 | 0.990 | 0.855 | 27.15 |
Mobilenetv4 | Swin-Transformer | 196.2 | 0.982 | 0.828 | 199.57 |
YOLOv8 | CGAFusion | 4.2 | 0.985 | 0.858 | 18.56 |
YOLOv8 | BiFPN | 12.75 | 0.985 | 0.858 | 25.68 |
YOLOv8 | × | 3.2 | 0.977 | 0.810 | 17.13 |
Pre-Train Dataset | CWD Loss | Logit Loss | mAP50 | mAP50-95 |
---|---|---|---|---|
COCO | √ | × | 0.985 | 0.853 |
COCO | × | √ | 0.989 | 0.859 |
HTED | √ | × | 0.986 | 0.846 |
HTED | × | √ | 0.988 | 0.854 |
HTED | √ | √ | 0.989 | 0.857 |
COCO | √ | √ | 0.99 | 0.861 |
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. |
© 2025 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
Ma, Z.; Zhou, S.; Lin, C. Defect Detection in Freight Trains Using a Lightweight and Effective Multi-Scale Fusion Framework with Knowledge Distillation. Electronics 2025, 14, 925. https://doi.org/10.3390/electronics14050925
Ma Z, Zhou S, Lin C. Defect Detection in Freight Trains Using a Lightweight and Effective Multi-Scale Fusion Framework with Knowledge Distillation. Electronics. 2025; 14(5):925. https://doi.org/10.3390/electronics14050925
Chicago/Turabian StyleMa, Ziqin, Shijie Zhou, and Chunyu Lin. 2025. "Defect Detection in Freight Trains Using a Lightweight and Effective Multi-Scale Fusion Framework with Knowledge Distillation" Electronics 14, no. 5: 925. https://doi.org/10.3390/electronics14050925
APA StyleMa, Z., Zhou, S., & Lin, C. (2025). Defect Detection in Freight Trains Using a Lightweight and Effective Multi-Scale Fusion Framework with Knowledge Distillation. Electronics, 14(5), 925. https://doi.org/10.3390/electronics14050925