Objective: the article considers an approach to the development of a system for monitoring the vigilance and actions of the driver using technical vision and neural network models. The main purpose of the research is to improve the safety of railway transport. Methods: data collection from various sources, annotation, data purification and normalization, neural network training based on video recordings of drivers’ faces in various states and data on their behavior. Neural network learning algorithms based on the architecture of convolutional neural networks, teaching methods with a teacher, mask segmentation methods and proportional resizing of the area of interest, mask segmentation methods for determining the contour of an object in an image, deep learning algorithms such as stochastic gradient descent and error back propagation. Results: a system has been developed that determines the emotional state of the driver based on a real-time video stream, detecting signs of fatigue or distraction, warning of possible dangerous situations. This approach will allow you to quickly respond to the risks that arise in the process of train control, which allows you to increase the level of train safety. Practical significance: a system for monitoring the vigilance and actions of the driver has been developed and can be implemented on locomotives or motor-car rolling stock for real monitoring and prevention of emergency situations.