Inspiration
Personally, we have known people involved in extremely dangerous accidents with fatigued drivers, especially late at night or early in the morning. This is not an isolated experience. In fact, research shows that fatigued driving is responsible for 13% of all commercial motor vehicle accidents (Federal Motor Carrier Safety Administration). Additionally, up to 65% of truck drivers admit to driving while drowsy, with 50% actually falling asleep behind the wheel (FMCSA). This is an inhibition that slows reflexes and decision-making abilities, often compared to the dangers of drunk driving. EyeLock combats this widespread problem with a cost-efficient, accessible, and scientifically-backed approach that not only reduces liabilities for commercial driving companies, but also prioritizes driver health.
What it does
EyeLock targets three primary fatigue-driven dangers: eye strain, falling asleep at the wheel, and unsafe posture for airbags. Long, repetitive distance-driving can be damaging to drivers’ long-term eye health (similarly to staring at a screen too long), as average blinking rate falls from 15-20 blinks/second to below 8-10 blinks/second, failing to replenish the eye’s natural tear film. EyeLock uses eye-tracking technology to remind drivers to blink at a natural rate when it detects dangerously low blinking frequencies. Falling asleep behind the wheel is one of the most dangerous risks of drowsy driving: looking away from the road for just two seconds doubles the risk of a crash, while 80% of crashes involve a driver looking away for just three seconds. EyeLock’s computer vision recognizes when a driver is nodding off, blinking for abnormally long, or has drooping eyelids, and plays pulsing frequencies proven to combat grogginess in a gentle but rapid fashion. Another danger of fatigued driving is slouching closer to the wheel, which is damaging to a driver’s long-term spinal health, as well as potentially fatal in the event of airbag deployment. EyeLock calibrates to a user’s naturally comfortable sitting position (at least 10-12 inches away from the wheel) to alert them of prolonged periods of leaning forward, being sure to ignore brief or trivial position changes. Lastly, EyeLock constantly tracks and warns against distracted eye movements that indicate a driver is looking away from the road or at an electronic device, being careful to ignore natural and healthy glances elsewhere. Our product achieves its safety features in high- or low-light environments without distracting visual alerts, overwhelming overlapping notices, or overly-sensitive excess warnings.
How we built it
We built the backend with Python, using OpenCV for video processing and MediaPipe for facial feature identification. We also utilized the Python Tkinter library for the UI. To account for blink frequency, we used a sliding window average over 15 second intervals. Blink detection was performed by calculating the Eye Aspect Ratio (EAR) to utilize the position of eyelids to qualify blinks. We also calculated head yaw and pitch by measuring z-coordinates of the cheeks and nose-to-chin distance to detect nodding off and distracted vision. Distance from the steering wheel was calculated by comparing the distance between the driver’s eyes compared to their original sitting position.
Challenges we ran into
Initially, we were trying to detect distracted driving by noting eye location, but we updated this to rely on head position, since we could set a more accurate threshold for how much the driver was looking away, helping avoid false positives and negatives.
Accomplishments that we're proud of
Having never worked with computer vision in a project before, we are proud to have learned about the libraries used for these tasks, specifically eye and movement tracking, which are now ubiquitous technologies. We are also proud to have found a realistic and applicable solution to a prevalent problem, especially under such short time constraints.
What's next for EyeLock
Looking forward, we hope to optimize EyeLock’s hardware for seamless integration into the car’s interface, as well as add additional sensors and haptic alerts to the steering wheel and seat to increase driver alertness. We also hope to track long term driver statistics and performance to personalize their alert sensitivity and suggest the safest driving hours and habits for them.
Log in or sign up for Devpost to join the conversation.