## 1 Introduction
For their research, they used a histogram of oriented gradient characteristics and a combination of linear support vector machine (SVM) classifiers. In paper [6], the authors dealt with detection of objects on railways by using modified YOLO v5 to detect 3D objects. Along with this method, they also introduced their new virtual dataset based on the GTAV video game for road and rail environments, filling a gap in rail datasets for detecting and localizing 3D objects. Image-plane homographs for obstacle detection and object distance estimation from a thermal camera are improved using an AI approach in paper [7]. Paper [8] presents an improved edge detection method which deals with blurred images in railways. The authors proposed a blur detection algorithm in order to save computational time by processing images with sufficient quality only. The used dataset [8] consisted of 2180 images made by different types of cameras in a real-world environment. Authors compared the proposed method with state-of-the-art methods (FFT method, Laplacian method, Canny method). Generally, AI-based systems [4,6] in combination with traditional CV systems [8,9] can be used for the detection of objects on the railway environment. In paper [10], irregularity of contact wire as well as influence on interactions of high-speed pantograph and chain networks are discussed. [PERSON] et al. [11] proposed a new Hough-based computer vision method for controlling the contact force in the domain of a pantograph-catenary system. However, AI and CV have extremely wide applications in industry and science. Railway is just one example of the successful application of these algorithms. The following papers present the application of AI and computer vision in different areas. [PERSON] et al. [12,13]proposed a four-stream 3D CNNs model for recognition of human action, using limited data. Authors used handcrafted features, optical flow, and gradients in horizontal and vertical directions. [PERSON] et al. [14] used group method of data handling (GMDH) and neural networks in order to increase measuring precision of a simple photon-attenuation-based two-phase flowmeter. [PERSON] et al. [15] implemented fuzzy logic for active control of the robot manipulator trajectory within and after the impulsive loading caused by collision. [PERSON] et al. [16] used machine learning techniques for gas sensing systems. Modeling and predictive analysis in this paper are based on kNN, ANN, decision trees, random forests, and SVM approach. Situations where there are multiple tracks and signals visible are a challenge for accurate detection. There have been cases where multiple tracks/signals have caused problems for humans when driving trains. Drivers perceived the wrong green light, which did not refer to their track. Such errors could lead to a direct train collision. The system proposed by this paper aims to solve the problem of detecting the correct track and signal in a situation where there are more of them in front of the train. Furthermore, with the current level of technology, it is possible to translate many standard railway systems into intelligent ones. The problems that can arise here are safety and certification. A common approach to command and control system (CCS) device certification involves reaching the required SIL (safety integrity level). Certification of systems containing AI for SIL level 4 can be an issue [17], thus fostering other approaches which would enable the certification process, such as use of traditional CV and explainable artificial intelligence (XAI). As already noted, the paper proposes a novel algorithm for light signal detection in railways. The rail track is detected by traditional CV algorithms, while the light signals are detected by a YOLO CNN. The combination of these two algorithms has formed an integrated system for the detection of rails and signals on the railway, a novel system that aims to detect both the rails and the relevant signals.