## 5 Results and Discussion
The presented research contributes to the ultimate research goal, which will be reflected in the extremely high reliability of detection, as well as  
Figure 14: Graph of mean reliability for all three trained networks. Figure 15: System for detection of rail track and signals on the railway based on integrated Hough–YOLO method (**a**) Signal relatively close from the camera; (**b**) signal relatively far to the camera..  
capability to be certified according to required SIL level. The holistic system for the detection of railway objects will be based on the multiple parallel connections between CV and CNNs detectors, with inclusion of a railway digital map containing the positions of all infrastructure elements. The parallel connection between CV and CNNs detecting the same objects and with comparison with digital map will give greater reliability in object detection. The reliability of the entire system can be increased by introducing a digital map of the infrastructure, but also by detecting overhead systems--catenary rail lines and contact line mast. Detection of catenary line was also performed by the Canny-Hough algorithm, while the contact line masts were detected by CNNs. The results are shown in Figures 16 and 17. The reliability of the detection of the contact line mast is as high as 99.9% in certain cases. Metric evaluation of an algorithm is an important item in the final assessment of its efficiency. The intersection over union (IoU) method was used. For that purpose, a separate validation dataset was formed in the size of 101 unique input images, which did not previously serve as training data. \[\text{IoU}=\frac{\text{Area of Intersection}}{\text{Area Union}}. \tag{4}\]  
Figure 16: Overhead system detection—catenary rail lines and contact line mast—test image 1. Figure 17: Overhead system detection—catenary rail lines and contact line mast—test image 2. The parameters that appear here are the position of the center of the label in relation to the coordinate origin as well as height and width of the label. The same parameters are necessary for the prediction bounding box. Figure 18a shows the IoU value (0.652) obtained for CNNs 150 images. This value can be classified as a good result. Figure 19 represents a chart with IoU values obtained for CNNs 150, CNNs 500, and CNNs 1000. The reason why the IoU in Figure 19 is slightly higher for CNNs dataset 500, compared to CNNs dataset 1000, is that the second dataset contains a large number of images from a greater distance. table with values for average precision of a few different methods, and it was in the range between 0.86 to 0.89, which is also the case with the results obtained in this paper. Figure 12:0  
To calculate recall, in addition to TP, false negatives (failed to predict an object that was there) are needed. The calculated value for recall is 0.76. Figure 12:1  
The presented method functions almost in real time with a 30 FPS video. Currently, the fastest trains pass at approximately 150 m/s which means that the image will be taken approximately every 5 m which is a small distance compared to the required distance at which signals should be detected (>800 m). Current processing lag is 0.27 s which is sufficient for speeds up to 200 km/h (train passes \(\approx\) 55 m/s) and more than enough for freight trains for which the system is ultimately developed (speed up to 160 km/h). The processing lag can be smaller and FPS can be higher with stronger hardware if necessary.