Rail surface damage such as cracks, spalling, and squats must be identified accurately because these defects have distinct visual characteristics that can influence the rail inspection process. However, the simultaneous detection of multiple damage types remains a challenge, especially when the data distribution across classes is imbalanced. This study aims to evaluate YOLOv8 for detecting cracks, spalling, and squats using the Railway Track Surface Faults Dataset. A total of 2,175 images were analyzed and divided into training, validation, and testing sets with proportions of 70%, 15%, and 15%, respectively. Model performance was evaluated using precision, recall, F1-score, mean Average Precision (mAP), and the confusion matrix. The results show that YOLOv8 achieved precision values of 0.89, 0.96, and 0.91 for cracks, spalling, and squats, respectively. The recall values were 0.85, 0.92, and 0.96, respectively, while the F1-scores were 0.87, 0.94, and 0.94. The mAP values reached 0.90, 0.95, and 0.98. Overall, the model achieved a precision of 92.00%, a recall of 91.00%, an F1-score of 91.67%, and an mAP of 94.33%. These results indicate the potential of YOLOv8 to support the automatic detection and localization of rail surface damage.
Copyrights © 2026