The article considers a system for forecasting emergency situations when driving a vehicle using the IDAS (intelligent driver assistance system) model. The IDAS system is based on a combination of long and short-term memory (via recurrent neural network) and a fast-reacting system based on a fuzzy logic controller. We have evaluated the efficiency of combining a neuro-fuzzy controller and a recurrent neural network. We have developed an algorithm for forecasting emergencies, as well as software for testing the model on video recordings from DVRs. The effectiveness of the proposed approach has been proved on data from dash-cameras. The final time before the accident is near one second before any type of road accident. We have created a mobile prototype for the system for forecasting emergency situations based on the Raspberry Pi 3 mini-computer.