Inspiration

Due to the current COVID-19 situation, masks have become an integral part of going out in public. Many people, however, still refuse to wear a mask. We created this project with the purpose of being able to detect if a person is wearing a mask or not. This could help businesses that serve customers to know if a person is wearing a mask or not before they enter the establishment and corresponding actions can be taken.

What it does

Our program utilizes Google's Vision API (specifically the label detection feature) to detect if a person is wearing a mask or not in an image. If they are or if they are not, a corresponding message will be printed.

How we built it

We used the Google Cloud platform to create a project using Python. By using the Google Cloud platform, Google's Vision API could be easily implemented and used for our desired purpose. The corresponding message and detection simply checks to see if the API detects a mask or not.

Challenges we ran into

Our goal was to be able to take a picture with a laptop webcam and use this picture (saved into a local file) as the image that the program performs its detection on. We, however, were unable to implement the vision API on our local machine, so we could only use it in the Google Cloud platform. In order to run the program on a desired image (one that we would ideally take) we needed to upload the image onto a Google Cloud bucket and then access it through there.

Accomplishments that we're proud of

Our program was over-all able to detect whether or not a mask was detected in an image. This was our first time utilizing Vision API (or any API at all) as well as our first time using Google Cloud's platform. Just being able to get our program to work and being able to submit a project was what our team was most proud of.

What we learned

We learned a lot about how to implement an API (although through Google Cloud) as well about a lot about Python. Our whole team did not know how to code in Python prior to this Hackathon and this was a very educational experience.

What's next for Mask Detection

Ideally, we want to be able to use this program on local files saved onto our computer. Also, we wanted to be able to seamlessly take a picture from our computer and use that picture in our program. We also wanted to have some form of physical output for our program. Specifically, it would be perfect if we were able to take a picture automatically (picture would be taken upon sensing a person in the frame) and, if they do not have a mask, to lock a door. This would be very useful for any establishment that gets a large amount of customers daily.

Built With

Share this project:

Updates