Demo Video https://youtu.be/S0bw1w5RFR0
PLEASE NOTE BEFORE RUNNING PROGRAM
Please use OpenCV 3.x.x. This is because one of the classifiers is not compatible with the newer versions. Thank you!
We took inspiration from general facial recognition practices in computer science. By utilizing standard OpenCV feature detection, we were able to detect whether or not someone is wearing a mask based on what facial features the computer is able to detect.
What it does
Our software uses concepts from standard feature detection algorithms to try and find particular features that are indicative of whether one is wearing a mask or not. It firstly looks for the eyes in order to determine if a person is there or not. If it is able to find the eyes, it then looks for the mouth of the individual. If it is able to find a mouth, the software knows you are not wearing a mask and returns that no mask is present. However, if it is unable to find a mouth, it means that something is covering it and hence, assumes that you are wearing a mask and returns this.
How I built it
We created a simple feature detection program in Python using the OpenCV library and the Haar Cascade classifiers. The program uses a webcam to analyse each frame and identify various facial features (the eyes and mouth). Based on what facial features are detected, an output of whether or not a person is wearing a mask is returned in real time.
Challenges I ran into
One of the classifiers did not seem to work with the newer versions of OpenCV. We tried to get it to work but ended up deciding it was not worth the time and just used an older version of OpenCV.
What I learned
I was able to refine my knowledge of the OpenCV library.
Log in or sign up for Devpost to join the conversation.