Inspiration

One of our teammates' friends suffered from alcohol poisoning after consuming without properly measuring shots. If they had the capacity to measure shots, they wouldn't have to have been rushed to the hospital. We wanted to build a device that allows for you to measure shots within a Solo Cup using Computer Vision.

What it does

Using Computer Vision, we can identify a cup and utilize a web GUI to request the user to state the percentage of the cup filled and the proof of the alcohol. This appends to a global counter that tracks the total number of shots consumed by the user.

How we built it

Using a GUI Computer Vision pipeline software called GRIP, we were able to generate appropriate color thresholds and contours that filter the green ring around the Solo cups. We were able to generate an opencv python file that outputted the number of contours real-time. We then used flask to generate a rest server that handled our web app and held a mini database where we updated the number of contours. The number of contours were used to determine whether or not a cup existed within the image frame. The front-end was developed using Bootstrap as a CSS format to improve design quality.

Challenges we ran into

For the back end, our initial idea was to be able to measure the liquid content within a cup but we decided with the time given, we wouldn't be able to complete the project. While we are still measuring shots, it will be a manual input rather than an automatic detection.

On the front end, we struggled on creating a clean functioning website. It started with spending half our time trying to learn django and html and ended up with us resorting to building our webpage with flask.

Built With

Share this project:

Updates