A Lightweight Rail Defect Detection Method Based on Improved YOLOv5

Authors

  • Zongyao Wang
  • Zilong Lv
  • Jian Wang
  • Ronghui Bi

DOI:

https://doi.org/10.56028/aetr.15.1.99.2025

Keywords:

Rail defect detection; Deep learning; YOLOv5; Object detection.

Abstract

With the rapid development of railway transportation infrastructure, tracks serve as a critical component of the railway system, and their safety is essential for reliable train operations. This study proposes an efficient, lightweight defect detection method based on the YOLOv5 model, leveraging deep learning to achieve real-time, high-accuracy identification of track defects. A standardized dataset comprising surface cracks and missing fasteners is constructed to facilitate model training. To address YOLOv5's limitations in small-object detection, the proposed approach incorporates shallow detection layers to enhance sensitivity to minor defects. Additionally, the integration of a Global Context (GC) attention mechanism improves the model's expressive and generalization capabilities. For computational efficiency, a C3 Master module is introduced, built upon the FasterNet lightweight architecture, significantly reducing parameters and accelerating inference speed. Comparative experiments with SSD, Faster R-CNN, and baseline YOLOv5 demonstrate the superiority of the proposed model, achieving a 95.3% mAP in track defect detection. The proposed lightweight solution enables precise, real-time defect detection, offering a novel approach to enhancing railway safety inspections.

Downloads

Published

2025-11-21