Inspiration
As college students that make "interesting" life choices, we know firsthand how hard focusing while studying is. That's why our group created Lock-In, a web app that helps students stay awake while studying by telling them they are falling asleep. The average college students experience more eye-strain as they study late into the night, and Lock-In also helps these students protect their eyes by advising them to take a break from studying.
What it does
Lock-In accesses the user's laptop webcam and constantly runs facial recognition of the frames from the webcam, checking for signs of drowsiness in the subject. When the subject has displayed signs of drowsiness for about four to five seconds, the app will play an audio file and wake the user up.
How we built it
We primarily coded the project with Python and Flask, with a simple HTML and CSS website. There were four Python files we created; three were responsible for handling the webcam and running the facial analysis and the last one was responsible for connecting all the Python files with the HTML frontend. Originally, we created our own AI model, but when that proved to be too difficult we switched to OpenCV and utilize its public libraries.
Challenges we ran into
Creating the AI model that would predict if the user was falling asleep was by far the biggest challenge our team ran into. The first step, finding a detailed dataset, was already a tall-tale task, and took nearly an hour finding a dataset. Then, training an AI model on the dataset took a lot of time, as one epoch with TensorFlow took nearly 15 minutes, and we ran almost 10 epochs for our model. Finally, we needed to manually calculate the dimensions and coordinates of the bounding box our AI model would focus on within a frame of a camera.
Accomplishments that we're proud of
Despite the time we sunk into an AI model that we ended up not using, our team was proud of the fact that we got a working submission. Also, our team was pleased with how well we handled the issues creating a custom AI model posed us as we powered through each one as a team.
What we learned
We had to roll our sleeves up and engross ourselves with OpenCV, a library none of the team had extensive experience in. Furthermore, we all honed and developed our Python and Flask skills, specifically sending data between Flask and HTML files with Response objects and Render Templates.
What's next for Lock-In
The next step for Lock-In
- Make it more accurate (original AI model was too unreliable)
- Improve functionality (include more options for user to fiddle with)
- Expand areas of use (driving, during class, etc)
Log in or sign up for Devpost to join the conversation.