Drowsy Detector

ShellHacks 2020 Competition

By Shayan Riyaz Marshall Mason Darshan Solanki Ryan Mitchell

How we built it

By utilizing Machine Learning, this project encourages safer driving by providing the user with viable driving and travel solutions. The app was hosted on local host by use of Flask in the python language. Our software leverages the use of the prominent machine learning libraries for computer vision along with the Cloud services such as Google Cloud Platform. The application allows users to safety over recklessness by helping find ways to rest in the middle of a tiring journey.

Challenges we ran into

Due to time and geographical restraints, the team ran into multiple issues such as live testing. The team needed to be able to produce accurate, reproducible results. By utilizing handcrafted longitude and latitude algorithms, the team was able to accomplish this and create a system of close proximity safe destinations for a rest. In addition to this main challenge, a secondary challenge of learning and creating new frameworks arose. By implementing flask, the team had to become familiar with JavaScript, HTML, and CSS frameworks.

Accomplishments that we're proud of

The accomplishment we're all the most utmost proud of is the final product. We're confident that the result of this project can help people and save lives. In the documentation paper we authored, we researched how many accidents are caused annually and how this would be able to reduce those numbers annually.

What we learned

We learned that with perseverance we can accomplish great things even in limited amounts of time. We learned that there is always a solution, even if you have to sit there for four and a half hours tweaking everything, one variable at a time. For some light-hearted humor, we also learned that once you hit a certain point of exhaustion, productivity and results begin to blossom and that consuming six red bulls back to back won't actually kill you.

*What's next for Drowsy Detector

While we are all extremely proud of this project, we know it still has a way to go before deployment. Additional hardware and software needs to be implemented into the vehicle before this is a safe way to drive. The UI/UX layout needs some work and real-time, accurate coordinates need to be given by the user and accurately updated.

Built With

Languages and Frameworks: Python, JavaScript, HTML, CSS Computer Vision: Opencv-Python, Scipy, Dlib, Imutils Data Extraction Mapping: Google cloud platform, Google-maps (Py/Js) Web-Server: SocketIO(Py/JS), Flask Formatting: PrettyPrint

We hope this project highlights the importance of road safety and teaches people to be mindful and cautious about their fatigue especially when on the road. The goal of this app is to create a safer world for everyone.

How to run for now:

  1. If dependencies haven't been installed run: pip install -r requirements.txt

  2. run python VideoStreaming/main.py

  3. Go in browser to: localhost:5000 in browser or 0.0.0.0:5000

  4. Activate Webcam and enter in the destination i.e. : Start: Orlando, FL End: Miami, FL

  5. Upon drowsiness detection, new results will appear along the route. Drowsiness is activated by closed eyes or consecutive yawns

Documentation: Documentation.pdf

Thank you!

Share this project:

Updates