Inspiration
According to the Centers for Disease Control and Prevention (CDC), approximately 1 in 25 adult drivers report falling asleep while driving. Fatigue-related accidents are a major safety concern worldwide. We wanted to address this issue by building a solution that uses real-time facial monitoring to detect signs of fatigue and help drivers stay alert on the road.
What it does
SafeDrive uses a webcam to continuously monitor the driver’s face and analyze facial expressions to detect signs of fatigue such as eye closure and yawning. When fatigue is detected, the system issues an audio alert to keep the driver awake and recommends nearby rest areas, coffee shops, and motels.
How we built it
We developed our project using Python, OpenCV, and MediaPipe for facial landmark detection. The system calculates eye aspect ratio (EAR) and mouth aspect ratio (MAR) in real time to determine whether the driver appears fatigued.
Challenges we ran into
-Setting up our development environment and installing dependencies
-Attempting to integrate fetch.ai into our work. The pre-built agents we found required live location through an mobile app or a browser therefore we weren't able to integrate fetch.ai into our project.
-Discovering the limitations of FreeWili. We realized the FreeWili camera records videos and needs memory to store. This made it hard for our model to directly interact with live data which prevented us from using it for real-time camera detection. We also ran into issues with text-to-speech as we couldn't find the functions in the source code. Due to lack of documentation it was hard to follow.
Accomplishments that we're proud of
-Overcoming setup challenges. We had to change our python version by creating a virtual environment on Anaconda, and debugging together as a team with two different operating systems (Windows and Linux)
-Learning how to integrate AI tools into a safety-focused application
-Having a working interface
What we learned
-How to use Git commands and collaborate effectively through version control
-Troubleshooting and debugging OpenCV and MediaPipe in real-time applications
What's next for SafeDrive
-Enhancing performance for nighttime driving using infrared or low-light detection
-Building a mobile or embedded version for easier in-car deployment

Log in or sign up for Devpost to join the conversation.