This is a Computer Vision Project for detection if user is wearing face mask or not.
This is a Computer Vision Project which served as one part of my Final Year Project- Implementation of Face Detection and Object Tracking Techniques to Develop Covid19 Utilities for Face Mask Detection and Social Distancing Violations Detection
The project features use of Transfer Learning to save time.
For the dataset we used Prajna's Face Mask Detection Dataset and Experiments.
Here dataset looked like this:-
As we can see what she did is to scrape images online and then augment those images by putting a face mask png on top of original images and then using these images.
Since this isn't a good methodology, I scraped a few more images and added to her dataset. The images I scraped included images of people with mask as well in different color masks too.
For preparing the data I first enhanced the images and then used a face detection algorithm to crop out only face part from the images inorder to reduce the image noise and to make sure the model focusses only on the face part and nothing else.
Also it should be noted that, we could've gone with grayscale images but I used a Resnet50 based architecture from Google's Teachable Machine 2.0 for model creation and it works with colored images better in this case. Though we could have tried other models for better results.
After preparation my dataset looks like this:-
- Add Pipelines
- Model Retraining Support
- UI Interface
- Accuracy/Precision/Recall Improvement
- Deployment
- Requirements and project documentation
In this time of pandemic struck world, I had to do my part as an AI/ML engineer to develop something which can actually be used. Though this project is far from over, but it's the start of something. Later I was able to mentor a team in a hackathon on a similar problem statement as my final year project and this starting guide/code helped them a lot, so it's probably a win - win situation.
A special thanks to Adrian Rosebrock and his blog at PyImageSearch for helping out with this project.
Also thanks to many other github contributors who've worked on similar projects. Thanks for your repos and guidance.
Also a shoutout to Prajna for your experiments!