Inspiration

While driving to a specific location to meet up for this hackathon, Venkat Chitturi saw his father feeling sleepy and thought that we could try to do something to help sleepy drivers.

What it does

Our project checks if the driver is drowsy and redirects them to a location that will later be changed to the nearest resting place or hotel.

How we built it

We used python to build the software to check if the driver is drowsy, specifically the OpenCV library. Once this was completed, we built a website using Django for our databasing and backend, JavaScript to interact with the MapBox API, and HTML for our frontend UI.

Challenges we ran into

We ran into many challenges. First, we tried to design a Lane Detection Software that would look at the road and create lines based on the lanes. We would use this to see if someone was driving in a curvy manner. We ran into problems with this because there were too many lines generated within our program. Another challenge we faced was that we tried to create another condition that checked whether the person had red or bloodshot eyes. This is a common trait in people who are either drunk or are drowsy or sleepy. To do this, we set a range of RGB values and compared it to the color of the eyes within the frame, however, this ended up not working. If we had more time, we would like to expand on this concept as well. Finally, we didn't have enough time to get the website to dynamically plot the latitude and longitude of the nearest hotel points, but instead, we tested the code to plot the directions to different locations, which worked. If we had more time, we would likely create a program to find the nearest hotel and input this into the website to run smoothly.

Accomplishments that we're proud of

We are very accomplished in many things that we have done. We created our first website and added a map with the MapBox API to that website, which is something that we have never done. We also developed and tried to develop many different programs to help with our solution and although many of them didn't work, we were still proud that we made so much progress in such a short amount of time, for such an innovative idea. I am also proud that we created the software for drowsy detection and that we connected this to the website and made it run smoothly.

What we learned

We learned a lot about many different things. OpenCV was a major library used in our project and we learned many things about how to detect different features within the image. For example, when using a webcam, we found a way to isolate the eyes and find whether someone is drowsy using just the eyes. When using a video to try to identify the lane using lane detection, we looked for lines that were longer than a certain threshold and only printed out those lines. Although more lines were created, we did find a way to at least minimize the number of lines to try to get the software to work as well as possible within the time frame. We learned a lot about how to use javaScript and HTML and how we can connect our existing programs and show these outputs within a website that is formatted quite well.

What's next for You Snooze, You WIN

We have many additions that could be done to our project if more time was allocated. For example, the first thing that we would like to do is be able to dynamically reroute the location to the nearest hotel. Currently, our code reroutes to an unspecified area. Another thing that we would like to do is work on the lane detection software and the red eyes software and implement them into our project to further the accuracy of our design.

Built With

Share this project:

Updates

Submission history