Rail surface defect detection algorithm based on CSSI-YOLO
摘要
Accurate detection of rail surface defects is crucial for ensuring railway operational safety; however, existing methods often suffer from limited detection accuracy, insufficient real-time performance, and high model complexity. To address these challenges, this paper proposes a lightweight and efficient rail surface defect detection model termed CSSI-YOLO, which is developed based on the YOLOv10n framework. The model is systematically optimized in terms of feature representation, computational efficiency, and localization accuracy by integrating four key modules. Specifically, a C2f-LESKA attention mechanism is introduced to jointly model global contextual information and axial-sensitive features, enhancing the representation of elongated and low-contrast defects. SPD-Conv is employed to replace conventional convolution, significantly reducing parameters and computational cost while preserving fine-grained geometric information. An SPPFAvp multi-scale feature fusion module is designed by incorporating global average pooling to improve the stability and robustness of multi-scale features. In addition, an improved Inner-CIoU loss function is proposed to optimize bounding-box regression accuracy and accelerate model convergence through sample difficulty-adaptive weighting. Experimental results on the Roboflow rail surface defect dataset show that CSSI-YOLO achieves an mAP@0.5 of 84.9% and an mAP@0.5:0.95 of 47.4%, outperforming the YOLOv10n baseline by 2.6% and 1.6%, respectively. Meanwhile, the proposed model reaches an inference speed of 154 FPS, with 2.67 M parameters and a compact model size of 5.7 MB, achieving a favorable balance among accuracy, speed, and model complexity. Further comparative, cross-dataset, and generalization experiments demonstrate superior adaptability across diverse rail environments. Deployment experiments on the Jetson AGX Orin platform further validate its real-time capability and practical feasibility.