## 3 Experimental Results and Analysis  
### Dataset and Evaluation Indicators  
Modern trains are typically equipped with a front-facing camera positioned in the driver's cabin to monitor the external environment and rail conditions in real time, providing a 180-degree field of view. However, due to the high installation position and wide field of view, accurately identifying the rail surface condition remains challenging. To address this issue, this study proposes a custom data acquisition platform based on a typical industrial machine vision system, as illustrated in Figure 6. The dataset used for testing was partially collected from the railroad section and partially from the Central South University railroad test section. To ensure high-quality image acquisition under varying conditions, an industrial camera is securely mounted on a rocker arm, which is fixed to the platform. Considering the complexity of the actual train operating environment, image data collected across different time periods, varying lighting conditions, diverse weather states, and different operating speeds are incorporated into the data acquisition process. This approach enhances the diversity and representativeness of the dataset, thereby improving the model's robustness and generalization ability in complex scenarios. The industrial camera has a resolution of 1920 \(\times\) 1080, and the mounting height is set to 1 m.  
The dataset collected for this study consists of 1500 images for each of the three rail surface conditions: dry, wet, and oil contaminated. After undergoing a series of pre-processing steps, including grayscale conversion, denoising, enhancement, perspective transformation, rail surface area extraction, and data augmentation (brightness enhancement, brightness reduction, horizontal mirroring, vertical mirroring, picture rotation), the dataset was expanded to a total of 31,500 images, comprising 10,500 images for each rail surface condition. To establish a standardized image database, all images were resized to 224 \(\times\) 224 pixels, ensuring consistency in data representation. The dataset was then partitioned into training, validation, and test sets at a ratio of 6:2:2 for each category. Figure 7 presents sample images from the dataset. The training set and validation set are utilized for model training and hyperparameter tuning, while the test set is employed to assess the generalization ability of the final model. The evaluation metrics include accuracy, precision, recall, F1 score, model inference time, and the number of parameters. Accuracy refers to the ratio of correctly classified samples to the total number of samples. Precision measures the proportion of true positive cases among all samples predicted as positive, while recall reflects the proportion of actual positive cases that are correctly identified. The F1 score is the harmonic mean of  
Figure 6: Data acquisition platform.  
precision and recall. These four metrics allow for a comprehensive evaluation of model recognition performance. Additionally, model inference time and the number of parameters serve as indicators for assessing the real-time performance and lightweight characteristics of the model.