Eyes on the road

Saturday's AI

As part of Saturday's AI, we had to develop an AI project using some of the techniques we have learned during the course. One key aspect was the project had to be a social one.

What have we done?

What is more social than saving lives?

Background

The cause of four out of ten accidents in Spain is drivers getting sleepy. Source: Heraldo

Accident

The project

Let's create a model to identify when a driver is getting sleepy while driving and put it in a low-cost device like a Raspberry PI so everybody can install it in their cars.

Machine Learning

Plus

Plus

Raspberry PI

Raspberry PI

Equals to

Equals to

Less accidents

No accidents

Video dataset source

Data set of synthetic videos with different types of situations that allow the analysis of multiple driving situations.

Video dataset source

Different cameras allow to take different angles of view and take a multitude of data from the scene.

Video dataset transformation

The dataset has tags that allow categorizing whether the driver is falling asleep. However, these data have been transformed to train predictive models.

Features extraction DLIB

By means of DLIB feature extraction, the most important points of each driver's face were located in the image.

Data preprocessing

CSV conversion with the values of the previous EAR result for the eye and mouth positions. The variable AWAKE indicates whether the driver is awake or drowsy.

Data analysis

Descriptive analysis of the variables used.

Data analysis

Sampling of the distribution of continuous variables

Model selection and training

The data are separated into sets for supervised training, using the AWAKE binary tag.

Model selection and training

Cross-validation allows to obtain the best selection of hyperparameters in the selected model, optimizing the training result.

Results evaluation

The confusion matrix shows the false positives and negatives that our model detects, this value being quite low compared to the accurate predictions.

Results evaluation

Raspberry Pi Demo

Links

The authors

More info

QR Code

Questions?

Thanks!