Inspiration

Currently, every country is being challenged by COVID19. This means that everywhere in the world people should be wearing face masks for each others safety. Wearing a face mask is still relatively new for a lot of people around the globe. Also unfortunately not everyone does abide to the law, the rules and best practices on how to wear a face mask. This is where the gatekeeper comes in.

What it does

The gate keeper will detect faces and at the same time it will also detect if they are wearing a face mask.

How we built it

Firstly we used a dataset that contains both masked and unmasked faces and we loaded it in a dataframe. With our data frame ready, we can create and train our model using pytorch. Our model contains multiple layers and with weights we can prioritise certain layers.

In our last step we used openCV to load in our trained model which can detect if a mask is being worn or not. But we combine this with a face detector model, so we can run this on a live feed, freeze the frames and run mask detection on those frames. We then visualise this in a flask app (as seen in our demo video).

Challenges we ran into

There is a learning curve. We had issues with light, where it was too dark in the room when recording. So the model was detecting that a face mask is being worn while this was negative. It took us a while why this was an issue.

Accomplishments that we're proud of

That we have a working prototype, that's actually also running pretty well. Looks quite professional and it can be used in a real scenario at airports, stations, automatic doors, etc.

What we learned

Basically everything we did was pretty much new for us, so we learned quite a lot. We also have a better understanding of machine learning.

What's next for The gatekeeper

Currently our model is only trained to detect wether a mask in being worn or not. We can extend on this with if it's being worn correctly or not. We could also use IoT and integrate it with gates, doors, etc to let people in if correctly using a face mask. Potentially we could use this to count how many people are inside a room/building with(out) a mask.

Share this project:

Updates