This paper addresses low detection accuracy in rail surface defect detection. The problem comes from many defect types, large scale changes, and small dense targets. Hence, an improved model based on RT-DETR is proposed namely PSR-DETR. The PR_BasicBlock module first simplifies the model structure. It reduces parameters and computation cost. Meanwhile, it maintains satisfactory detection performance. Consequently, the network becomes more lightweight. After that, the RetC3 module adds a new attention mechanism. It enhances feature integration. It also strengthens the model’s capability to represent and distinguish targets of different scales. Finally, the SSFF module adds extra feature fusion paths. It helps the model emphasize critical regions. As a result, the detection performance is further improved. Experimental results show clear improvements, where the model does not greatly increase parameters or computation. The mAP@0.5 achieves 68.0%. The mAP@0.5:0.95 attains 44.7%, which are improvements of 6.3% and 2.7% over the original model. These findings show that the proposed method is effective and practical for enhancing detection performance.
Yang F, Tu W, Wei Z, et al., 2023, Review on the Development Of Railway Civil, Electrical and Power Inspection Equipment. Journal of Traffic and Transportation Engineering, 23(1): 47–69.
Gong W, Akbar M, Jawad G, et al., 2022, Nondestructive Testing Technologies for Rail Inspection: A Review. Coatings, 12(11): 1790.
He Z, Wang Y, Liu J, et al., 2016, High-Speed Rail Surface Defect Image Segmentation Based On Background Subtraction. Chinese Journal of Scientific Instrument, 37(3): 640–649 .
Cao Y, Duan Y, Wu D, 2020, 2D-Otsu Rail Defect Image Segmentation based on WFSOA. Computer Science, 47(5): 154–160 .
Taştimur C, Karaköse M, Akın E, et al., 2016, Rail Defect Detection with Real-Time Image Processing Technique, 2016 IEEE 14th International Conference on Industrial Informatics (INDIN), 411–415.
Gan J, Wang J, Yu H, et al., 2018, Online Rail Surface Inspection Utilizing Spatial Consistency and Continuity. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 50(7): 2741–2751.
Zhou M, Tang Q, Shi T, et al., 2023, Rail Surface Crack Detection Algorithm based on Improved Yolov5s. Liquid Crystals & Displays, 38(5): 666–679.
Yuan H, Chen H, Liu S, et al., 2019, A Deep Convolutional Neural Network For Detection Of Rail Surface Defect, 2019 IEEE Vehicle Power and Propulsion Conference (VPPC), 1–4.
Feng J, Yuan H, Hu Y, et al., 2020, Research on Deep Learning Method For Rail Surface Defect Detection. IET Electrical Systems in Transportation, 10(4): 436–442.
Zhang C, Xu D, Zhang L, et al., 2023, Rail Surface Defect Detection based on Image Enhancement and Improved YOLOX. Electronics, 12(12): 2672.
Wu Y, Cui C, He Y, 2024, Rail Surface Defect Detection Method based on Semantic Augmentation and Yolov8. Journal of Railway Science and Engineering, 21(1): 1–12.
Girshick R, Donahue J, Darrell T, et al., 2014, Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 580–587.
Girshick R, 2015, Fast R-CNN, Proceedings of the IEEE International Conference on Computer Vision, 1440–1448.
He K, Gkioxari G, Dollár P, et al., 2017, Mask R-CNN, Proceedings of the IEEE International Conference on Computer Vision, 2961–2969.
Xu Y, Yu G, Wang Y, et al., 2017, Car Detection from Low-Altitude UAV Imagery with the Faster R-CNN. Journal of Advanced Transportation, 2017: 2823617.
Avola D, Cinque L, Diko A, et al., 2021, MS-Faster R-CNN: Multi-Stream Backbone for Improved Faster R-CNN Object Detection and Aerial Tracking from UAV Images. Remote Sensing, 2021(13): 1670.
Redmon J, Farhadi A, 2018, YOLOv3: An Incremental Improvement. arXiv, arXiv:1804.02767.
Bochkovskiy A, Wang C, Liao H, 2020, Yolov4: Optimal Speed and Accuracy of Object Detection, arXiv, arXiv:2004.10934.
Jocher G, Chaurasia A, Stoken A, et al., 2022, Ultralytics YOLOv5, Zenodo, viewed August 4, 2024, https://github.com/ultralytics/yolov5
Wang C, Bochkovskiy A, Liao H, 2023, Yolov7: Trainable Bag-of-Freebies Sets New State-of-The-Art for Real-Time Object Detectors, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 7464–7475.
Jocher G, Chaurasia A, Qiu J, 2023, Ultralytics YOLOv8, viewed July 18, 2025, https://github.com/ultralytics/ultralytics
Carion N, Massa F, Synnaeve G, et al., 2020, End-to-End Object Detection with Transformers, Proceedings of the European Conference on Computer Vision, 213–229.
Zhu X, Su W, Lu L, et al., 2020, Deformable DETR: Deformable Transformers for End-to-End Object Detection, arXiv, arXiv:2010.04159.
Zhang H, Li F, Liu S, et al., 2022, DINO: DETR with Improved Denoising Anchor Boxes for End-to-End Object Detection, arXiv, arXiv:2203.03605.
Zhao Y, Lv W, Xu S, et al., 2023, Detrs Beat Yolos on Real-Time Object Detection, arXiv, arXiv:2304.08069.
Vaswani A, Shazeer N, Parmar N, et al., 2017, Attention is All you Need, Advances in Neural Information Processing Systems.
Liu Z, Lin Y, Cao Y, et al., 2021, Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows, Proceedings of the IEEE/CVF International Conference on Computer Vision, 10012–10022.
Chen J, Kao S, He H, et al., 2023, Run, Don’t Walk: Chasing Higher FLOPS for Faster Neural Networks, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 12021–12031.
Ding X, Zhang X, Ma N, et al., 2021, Repvgg: Making VGG-Style Convnets Great Again, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 13733–13742.
Kang M, Ting M, Ting F, et al., 2024, ASF-YOLO: A Novel YOLO Model with Attentional Scale Sequence Fusion for Cell Instance Segmentation. Image and Vision Computing, 2024(147): 105057.
Fan Q, Huang H, Chen M, et al., 2024, RMT: Retentive Networks Meet Vision Transformers, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 5641–5651.
Zhu L, Wang X, Ke Z, et al., 2023, BiFormer: Vision Transformer with Bi-Level Routing Attention, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 10323–10333.
Yang X, Li Y, Li Y, et al., 2025, Lightweight Rail Surface Defect Detection Algorithm based on an Improved Yolov8. Measurement, 2025(242): 115922.
Baidu PaddlePaddle Team, 2022, PP-YOLOE Object Detection Model, viewed June 8, 2025, https://github.com/PaddlePaddle/PaddleDetection