This study is dedicated to solve manoeuvres making task while working on the station with no marshalling hump. It is part of the project aimed at the development of intelligent safety and optimal control systems of autonomous electric vehicles and transport in general. The main manoeuvres safety depends on the lack of items and other objects on the rails as well as on the position of turnouts. In most cases rails, occupied with other wagons, as well as the wrong position of turnouts are marked with prohibiting red or blue signals of the traffic light. The authors propose an algorithm for the traffic light recognition by using a convolutional neural network (CNN) and traffic light indicator recognition. However, the situation when the locomotive needs to drive on the rails occupied with other wagons, for example, during the manoeuvres on the railway station can also appear. For this purpose, the authors have developed a CNN algorithm for the wagon recognition on the rails.