Inspiration

We were alarmed by the fact that there were 700 fatalities and 89,000 crashes involving drowsy driving in the year of 2017. This seemed like a disproportionately high statistic compared to high importance we give to safety measures in the modern world. We decided to make a simple, embeddable system that could solve this problem: a machine learning-based application, URide.

What it does

We trained a convolutional neural network (CNN). First, an input stream comes from the camera, as we were using the program to classify a person’s eyes in real time. From that stream of images, we use haar-like features to locate where a person’s eyes and face are. The features are used for classification, and the CNN summarizes the data to classify eyes as either open or closed. We specifically use PERCLOS (Percentage of Eye Closure) analysis to give a score on how drowsy a driver is at any time; once the driver crosses the threshold of percentage of eye closure for ten seconds, we sound an alarm that does not turn off until the driver is alert enough to turn it off.

How we built it

We used python to code the model and the graphical use interface. The dataset we used for the model was an opensource drowsiness image library. We used OpenCV to train and test the model which is a library under python. For data analysis we used Matplotlib and standard statistical techniques like AUROC to find the accuracy.

Challenges we ran into

We ran into multiple challenges like setting up OpenCV and using the small dataset to train a generalized model that gives high accuracy, however, we eventually made it work and get good results at the same time.

Accomplishments that we're proud of

We were able to complete this ambitious project in 24 hours and getting great results with the drowsiness detection model. We were also proud of getting the graphical user interface to look good.

What we learned

We learned many things like OpenCV, problems with using public datasets and standard data analysis procedures for projects like this.

What's next for URide

We determined that we could increase the training set size, such as taking a number of photos in varying conditions. Our dataset was actually relatively small compared to most, as they tend to range in the hundreds of thousands of images, while ours was only some 80,000 images. We could also use other machine learning algorithms, as they have the potential to even further increase the accuracy of the classifier.

Built With

Share this project:

Updates