Driver fatigue is an extremely important issue that accounts for almost 40% of all road accidents and more than 77,000 crashes per year. We wanted to develop a system to help track when someone was falling asleep at the wheel and give them a short stimulus to wake them up.

What it does

Uses facial detection to measure when a driver is exhibiting signs of drowsiness (based on how long their blinks are). We provide audial and haptic feedback using the Arduino and laptop to wake the user up. When a user consistently falls asleep multiple times within a set period of time, we utilize Google's Place, Geolocation, and Direction APIs to find the user's current location and prompt them to make a short stop at the nearest gas station to take a 15-20 minute nap (statistically shown to be the most effective way to combat driver fatigue).

How I built it

Utilized the pre-trained dlib 68-point facial recognition model to identify the location of the user's face and eyes. Calculate the eye aspect ratio on each frame to determine when a person's eyes are closed. Sends ardunio signal to vibrate the steering wheel and emits a short alarm tone to wake user up. Keeps track of number of warnings in a set time period and triggers the longer, "please take a nap" warning once the user exceeds a set limit.

Challenges I ran into

Deciding on what "alerting" features to add was definitely one of the hardest steps. We did lots of research into most effective ways of combating driver fatigue and found that common "tricks" like rolling down the window, singing to the radio, and talking to another person were often statistically ineffective.

Accomplishments that I'm proud of

Getting the facial recognition to work and creating a project that could help prevent future accidents and save lives.

What I learned

This is my first project utilizing the power of OpenCV, and it's definitely impressive just how much we can accomplish with pure computer vision and pre-trained data sets.

What's next for StayWoke

Integration with phone/car GPS to allow automatic routing to suggest rest area. Improved feature tracking.

Share this project: