Doze Alert - A Comprehensive Solution for Safe Driving
Inspiration
When you're behind the wheel of a 2-ton chunk of metal with enough speed to kill someone, the last thing you'd want to worry about is driving sleepy and getting into an accident. As a team of new drivers still getting to know the many roads of America, we wanted to develop a comprehensive solution that helps keep drivers safe from falling asleep on the wheel, avoid other cars who may have sleepy drivers, and prevent accidents. Enter, Doze Alert!
What it does
Doze Alert uses facial recognition to detect sleepiness in a driver's face. If detected, the app sends an alert to the driver, informing them that they are dozing off. The app also alerts drivers to avoid nearby vehicles that may have sleepy drivers, posing a potential threat.
How we built it
To detect when a driver is dozing off, we used a combination of two machine learning models. The first was a pre-trained open-source model from faceapi.js that determines the coordinates of a person's eyes. Our second model was a binary classification convolutional neural network, which we trained ourselves using over 45,000 images of open and closed eyes. We achieved over 90% accuracy by splitting our dataset into training and validation sets, and training the model using Keras and TensorFlow. We deployed the model on our web app using TensorFlow.js. Our team of Figma and React experts built the front-end of Doze Alert. We also experimented with multiple options for our deep learning model and map API, testing implementations of both FastAI and TensorFlow.
Challenges we ran into
One particular challenge with tensorflow was that most of our team had macbooks with M1 chips, so it was difficult to try and run our machine learning models locally on those laptops. Additionally, we had trouble looking for an appropriate map API that was low cost (ideally free) and still provided the functionality that we were looking for.
Accomplishments that we're proud of
We're proud of how much we learned about the intricacies of our chosen tools, like react and fastai. We went so far as found ways in which the fastai library could be improved to make deep learning on images even easier. We're also proud of how well we continued to bond as a team despite questionable sleep (or lack thereof), and we made sure to leave time for pure bonding opportunities, like light saber dueling and campus tours.
What we learned
We learned a lot about the intricacies of tools like react and fastai, we learned that making completely new projects is challenging when it feels like the digital age has been around long enough that there is now an app for everything, and we learned about a lot of people's stories before coming to Treehacks.
What's next for Doze Alert
Coming to an app store near you! (maybe) Doze Alert still has a lot of potential for growth. In addition to the features described above, we're interested in exploring the possibilities of creating a leaderboards that rank drivers with the least sleepiness while driving, and we're interested in integrating heart rate monitoring to the metrics that Doze Alert can use to help detect when a driver may be falling asleep at the well. Another key feature is for Doze Alert to also automatically redirect drivers' routes to the nearest rest stop when excessive sleepiness is detected.
Built With
- fastai
- javascript
- jupyter
- kaggle
- mapbox
- react
- tensorflow
Log in or sign up for Devpost to join the conversation.