Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2026 Accreditation Sinta 4 No. SK : 230/E/KPT/2022 Performance Evaluation of YOLOv8 for Railway Switching Operation Safety Monitoring Aulya Anggita Putri Selendra1*. Teguh Arifianto2. Fathurrozi Winjaya3 1,2,3 Railway Electrical Technology. Politeknik Perkeretaapian Indonesia. Madiun. Indonesia Jl. Tirta Raya. Nambangan Lor. Maguharjo. Kota Madiun. Jawa Timur. Indonesia e-mail: 1aulya. tep2220042@taruna. id, 2teguh@ppi. id, 3fathurrozi@ppi. (*) Corresponding Author Article Info: Received: 10-01-2026 | Revised : 21-01-2026 | Accepted : 27-01-2026 Abstracts - Safety in railway shunting operations requires continuous monitoring of train distance and speed to reduce the risk of operational accidents. In practice, shunting activities are still highly dependent on manual observation and verbal communication, while the performance of vision based safety systems under real operational conditions remains uncertain. In addition, comprehensive performance evaluations of deep learning based object detection models in real shunting environments, particularly under different hardware capabilities and lighting conditions, are still limited. This study aims to evaluate the performance of the YOLOv8 algorithm for real-time distance and speed monitoring during railway shunting operations. The system was tested using a camera-based detection approach under different processor configurations, namely an internal CPU and an RTX GPU, and under morning, daytime, and nighttime lighting conditions. System performance was evaluated based on accuracy, precision, and real-time detection capability across these conditions. The results show that the system achieved an average accuracy of 87. 32% when operating on a CPU which increased to 91. 30% when using a GPU. Optimal performance was observed under adequate daylight conditions, while reduced lighting led to a decline in performance, particularly on CPU-based processing. These findings indicate that hardware configuration and lighting conditions play a critical role in determining the reliability of YOLOv8-based safety monitoring systems for railway shunting operations. Keywords : safety, railway, shunting. YOLOv8, real-time INTRODUCTION Safety in railway shunting operations is a strategic element in railway operations, as it directly relates to the management of rolling stock movement within confined areas that carry a high risk potential (Dwiatmoko. Handoko, 2023. Wibisono & Zidan, 2. The shunting process requires precise coordination between the locomotive driver and ground personnel to ensure that train movements are conducted safely, controlled, and in accordance with operational regulations (Aditiatmoko & Latifah, 2022. Arifianto et al. , 2024. Marsusiadi et al. Therefore, strengthening safety measures during shunting activities is essential to support the reliability of railway operational systems. Ideally, shunting operations should be carried out through well-coordinated operational procedures that ensure safe, controlled, and efficient train movements (Pfaff, 2023. Reichmann et al. , 2. In this context, shunting activities involve close interaction between locomotive drivers and ground personnel, particularly in managing train speed, distance, and movement direction during coupling or separation processes. Effective communication and accurate perception of train position are essential elements to support decision-making during shunting, as improper control of distance and speed may increase the risk of operational incidents (Kim et al. Therefore, consistent monitoring of distance and speed becomes a fundamental requirement to support safety during shunting activities. However, field conditions reveal several technical and operational challenges that hinder the effective implementation of these safety standards. Noise levels inside locomotive cabins can exceed 90 dBA which may reduce concentration and disrupt communication between operators (Asri et al. , 2025. Sangadi & Ratrikaningtyas. In addition, signal interference in handheld communication devices often results in delayed or incomplete information exchange (Sumarahardhi & Santoso, 2. Limited visibility caused by blind spots in shunting areas further complicates the driverAos ability to accurately monitor train positions, increasing the potential for operational This work is licensed under a Creative Commons Attribution-ShareAlike 4. 0 International License. Copyright . 2026 The Autour. Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 These conditions indicate a gap between prescribed safety regulations and actual operational practices in the field. Conventional safety approaches that rely on manual visual observation and verbal communication have not fully ensured optimal safety performance. Previous studies have proposed the use of computer vision and deep learning techniques to support automatic object detection in railway environments (Guan et al. , 2022. Kapoor et , 2022. Mauri et al. , 2022. Wu et al. , 2. Deep learning based object detection algorithms, particularly those from the YOLO family, have demonstrated advantages in terms of detection speed and accuracy (Brintha & Jawhar, 2024. Guan et al. , 2022. Meng et al. , 2. Nevertheless, most existing studies are conducted in controlled or simulated environments and primarily focus on algorithmic development or detection accuracy, with limited attention to real railway operating conditions (Zhang et al. , 2. In particular, comprehensive evaluations of YOLOv8 performance in actual shunting operations, considering variations in hardware specifications and lighting conditions, remain limited. Such factors are critical, as shunting activities are performed under diverse environmental conditions and with varying computational resources in practical applications (Lema et al. , 2024. Zhou et al. , 2. Based on this research gap, this study aims to evaluate the performance of the YOLOv8 algorithm for realtime distance and speed monitoring in railway shunting operations under different hardware configurations and lighting conditions. The scientific contribution of this study lies in providing empirical performance evaluation results of YOLOv8 implemented in a real shunting environment, highlighting the influence of processor capability and environmental lighting on detection accuracy and reliability. The findings are expected to support the optimization of vision-based safety monitoring systems for practical railway shunting operations. RESEARCH METHOD Research Design This study employs an experimental research design to evaluate the performance of the YOLOv8 algorithm for distance and speed monitoring in railway shunting operations. The research stages consist of dataset preparation, model training, system implementation, and performance evaluation. The evaluation focuses on analyzing system performance under different hardware configurations and lighting conditions in real shunting operations. Dataset Preparation and Annotation The dataset used in this study consists of video recordings collected from real railway shunting operations conducted under varying lighting conditions, including morning, daytime, and nighttime scenarios. The recorded videos were extracted into image frames and annotated using the Computer Vision Annotation Tool (CVAT). Each frame was labeled by defining bounding boxes for the AutrainAy object as the primary detection target. Source: Research Result. Figure 1. Webcam placement on the locomotive The overall dataset preparation and annotation process is illustrated in Figure 2. The annotated dataset was subsequently divided into training and validation sets to support supervised learning during the model training phase. This dataset reflects real operational environments, allowing the evaluation of model robustness under practical conditions. http://jurnal. id/index. php/co-science Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 Source: Research Result . Figure 2. Dataset design flowchart Model Training Configuration Model training was conducted using the YOLOv8 architecture on the Google Colaboratory platform. The training process utilized the annotated dataset to develop an object detection model capable of recognizing train objects during shunting operations. After completing the training process, the model with the best performance was selected and used for subsequent system implementation and evaluation. System Implementation The trained YOLOv8 model was integrated into a Python-based detection system for real-time processing. During system operation, video frames captured from the camera were processed sequentially. The system automatically adjusted the computational process based on the available hardware, performing inference using either an internal CPU or an RTX GPU. The detection results were displayed as bounding boxes overlaid on the video stream. Distance and Speed Estimation Method The workflow for distance and speed estimation implemented in this study is presented in Figure 3. Speed estimation was performed by calculating the displacement of the detected object between consecutive frames divided by the corresponding time interval. Distance estimation was based on the apparent width of the detected objectAos bounding box in pixel units. This method assumes a constant actual width of the train and utilizes the relationship between object size in the image and its distance from the camera. Although this approach provides an approximate distance estimation, it is suitable for real-time shunting safety monitoring, where relative distance information is required to support operational decision-making. http://jurnal. id/index. php/co-science Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 Source: Research Result . Figure 3. Speed detection flowchart and . distance detection flowchart Interface Design The real-time monitoring interface used during system evaluation is shown in Figure 4. The interface displays the live video stream with detected objects marked by bounding boxes, along with numerical information on estimated distance and speed. This interface was used during testing to support performance evaluation and to assess the systemAos capability to provide real-time visual information during shunting Source: Research Result . Figure 4. Design of the speed and distance interface Performance Evaluation Metrics System performance was evaluated using accuracy, error percentage, and precision metrics for both distance and speed estimation. Performance testing was conducted under different processor configurations (CPU and GPU) and lighting conditions. These metrics were used to assess detection reliability, estimation consistency, and real-time performance in actual shunting operations. http://jurnal. id/index. php/co-science Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 RESULTS AND DISCUSSION Preprocessing The preprocessing stage aims to recognize and extract patterns based on previously learned patterns within the system. New patterns obtained from input data are subsequently classified into specific categories according to the results of the prior training process. This classification process utilizes a neural network as the primary approach during the training phase. The training data is derived from features extracted from a prepared dataset. Through this approach, the system is expected to consistently recognize and differentiate object patterns while maintaining a high level of accuracy (Zhao et al. , 2. Source: Research Result. Figure 5. Bounding box determination As part of this stage, preprocessing begins with collecting a dataset consisting of video recordings of shunting operations captured at several different time intervals. The acquired videos are then uploaded to the Computer Vision Annotation Tool (CVAT) platform for data annotation, as shown in Figure 5. At this stage, the video is divided into multiple frames per second, and each frame is labeled according to the target detection All labeled data are stored in a dedicated folder on Google Drive for efficient management and retrieval. Furthermore, bounding boxes are assigned to the AutrainAy object which serve as references for calculating the distance and speed of the rolling stock. Source: Research Result. Figure 6. View on google colaboratory The dataset stored on Google Drive is then used as input for model training on the Google Colaboratory During this phase, the Ultralytics package is installed to enable the YOLOv8 algorithm in the Colaboratory environment. Training and validation are subsequently conducted on the prepared dataset, as illustrated in Figure 6. The trained model, after completing the specified number of epochs, is saved as a module named best. This module is then integrated into a Thonny Python-based detection program to process video input from the webcam, allowing the system to perform real-time object detection, as demonstrated in Figure http://jurnal. id/index. php/co-science Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 Source: Research Result. Figure 7. Thonny python interface Program Interface Figure 8 presents the design of the interface for the shunting distance and speed detection system which is used to visually display processed data. The interface presents a real-time video feed from the webcam, with detected objects highlighted using bounding boxes to clearly indicate their position and presence. In addition to the visual display, the system provides several supporting indicators essential for monitoring, such as FPS (Frame Per Secon. to represent processing performance, object detection status, and the estimated object distance in meters. Moreover, the interface displays object speed in meters per second . and kilometers per hour . , allowing users or train operators to gain a comprehensive and accurate overview of the shunting conditions in real time. Source: Research Result. Figure 8. Program interface display Definition of Evaluation Metrics In this study, system performance was evaluated using three main metrics, namely Error (%). Accuracy (%), and Precision (%), to assess both detection reliability and estimation quality under different operating Error (%) represents the percentage deviation between the estimated value produced by the system and the reference value obtained during testing, indicating the magnitude of estimation inaccuracy. Accuracy (%) reflects the closeness of the estimated distance or speed values to the reference measurements, providing an overall indication of system correctness. Precision (%) describes the consistency of the system in producing similar estimation results across repeated measurements, indicating the stability of detection performance. These metrics were selected to comprehensively evaluate the systemAos ability to estimate distance and speed under varying hardware configurations and lighting conditions during railway shunting operations. Speed Test Results Speed tests conducted during the morning period were carried out under low-light conditions, as the sun had not fully risen. The measured light intensity ranged from 1,000 to 8,100 lux. According to Table 1, the system running on an internal CPU produced an average error of 20. 71% with an accuracy of 79. contrast, utilizing an RTX GPU reduced the error to 9. 66% while increasing accuracy to 90. http://jurnal. id/index. php/co-science Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 Table 1. Morning speed test Morning Speed Test . CPU Internal GPU RTX Session Error (%) Accuracy (%) Error (%) Accuracy (%) Morning 1 12,92 87,07 11,85 88,14 Morning 2 28,02 71,97 4,21 95,78 Morning 3 21,19 78,80 12,92 87,07 20,71 79,28 9,66 90,33 Mean . cUI) Source: Research result . During the afternoon, testing was performed under optimal lighting conditions with high sunlight intensity, ranging between 73,000 and 82,000 lux. As shown in Table 2, the CPU-based system produced an average error of 10. 37% with an accuracy of 89. 62%, whereas the RTX GPU demonstrated superior performance with an error of 8. 32% and accuracy reaching 91. This indicates that adequate lighting significantly contributes to improved system performance. Table 2. Afternoon speed test Afternoon Speed Test . CPU Internal GPU RTX Session Error (%) Accuracy (%) Error (%) Accuracy (%) Afternoon 1 9,618 90,38 6,621 Afternoon 2 5,582 94,41 9,654 Afternoon 3 15,91 84,08 8,711 10,37 89,62 8,32 91,67 Mean . cUI) Source: Research result . Nighttime testing was performed under severely limited lighting, with no natural sunlight. Measured light intensity ranged from 54 to 71 lux. Table 3 shows that the system using an internal CPU resulted in an average error of 12. 57% with an accuracy of 87. 42%, while the RTX GPU achieved an error of 8. 38% and an accuracy of 91. To support detection during nighttime, additional lighting from train lamps was utilized. Table 3. Night speed test Night Speed Test . CPU Internal GPU RTX Session Error (%) Accuracy (%) Error (%) Accuracy (%) Night 1 5,801 94,19 5,982 Night 2 9,569 90,43 11,92 Night 3 4,549 95,45 3,588 12,57 87,42 8,38 91,61 Mean . cUI) Source: Research result . Distance Test Results Morning distance tests were conducted under low-light conditions, with light intensity ranging from 1,000 to 8,100 lux. As presented in Table 4, using an internal CPU produced an average error of 4. 12%, with accuracy of 95. 87% and precision of 97. The RTX GPU reduced the error to 3. 81%, while accuracy increased to 96. 18% and precision reached 99. These results indicate that sufficient lighting significantly improves detection performance. Session Error (%) Morning 1 4,91 Morning 2 2,32 Morning 3 5,13 4,12 Mean . cUI) Source: Research result . Table 4. Morning distance test Morning Distance Test . CPU Internal Accuracy Precision Error (%) (%) (%) 3,40 3,38 4,64 3,81 http://jurnal. id/index. php/co-science GPU RTX Accuracy (%) Precision (%) Computer Science (CO-SCIENCE) Volume 6 Issue 1 January 2. E-ISSN: 2774-9711 | P-ISSN: 2808-9065 Afternoon testing occurred under optimal sunlight exposure . ,000-82,000 lu. Table 5 shows that the internal CPU system achieved an average error of 4. 65%, accuracy of 95. 34%, and precision of 98. The RTX GPU again outperformed the CPU with an error of 3. 59%, accuracy of 96. 40%, and precision of Session Error (%) Afternoon 1 4,21 Afternoon 2 4,85 Afternoon 3 4,88 4,65 Mean . cUI) Source: Research result . Table 5. Afternoon distance test Afternoon Distance Test . CPU Internal Accuracy Precision Error (%) (%) (%) 3,66 3,65 3,48 3,59 GPU RTX Accuracy (%) Precision (%) Nighttime distance testing was conducted under severely limited lighting . -71 lu. Table 6 shows that the internal CPU produced an average error of 23. 44%, accuracy of 76. 37%, and precision of 98. whereas the RTX GPU achieved a lower error of 18. 42%, accuracy of 81. 57%, and precision of 99. Nighttime performance was enhanced using additional lighting from train lamps which improved image quality and detection accuracy. Session Error (%) Night 1 Night 2 Night 3 23,4 4 Mean . cUI) Source: Research result . Table 6. Nighttime distance test Nighttime Distance Test . CPU Internal Accuracy Precision Error (%) (%) (%) 76,23 97,87 75,35 98,04 77,53 99,83 76,37 98,11 18,42 GPU RTX Accuracy (%) 81,61 81,32 81,78 81,57 Precision (%) 99,74 CONCLUSION his study demonstrates that the YOLOv8-based vision system is capable of supporting distance and speed monitoring during railway shunting operations in real operational environments. The results indicate that the performance of the system is strongly influenced by hardware capability and environmental lighting conditions, confirming that computational resources and illumination play a critical role in ensuring reliable real-time The findings highlight that YOLOv8 can function effectively as a shunting safety support tool when appropriate operational conditions are met. From a practical perspective, the study shows that the use of higher-performance processors contributes to more stable detection, particularly in low-light conditions commonly encountered during nighttime shunting Adequate lighting conditions also remain essential to maintain detection reliability, indicating that system deployment should consider both hardware readiness and environmental factors to achieve optimal Despite these findings, this study has several limitations. Distance estimation is based on visual information from a single camera and relies on bounding box geometry which may be affected by perspective distortion, vibration, and extreme lighting variations. In addition, system evaluation was conducted under specific operational scenarios and did not yet include adverse weather conditions or a wider range of shunting speeds. Future research should focus on improving distance estimation accuracy by integrating additional sensors such as LiDAR or ultrasonic sensors and by applying camera calibration techniques. Further testing under diverse environmental and operational conditions is also recommended to enhance system robustness and support its implementation as a practical safety monitoring solution in railway shunting operations. REFERENCES