A deep learning model that detects whether a person has worn a mask or not, real-time.
In the present scenario of the Covid-19 pandemic, wearing a face mask is much more important than everything to protect our lives. This face-mask detector helps you to check whether you have your protection mask on.
This deep learning model can be extended to real-time detection using OpenCV and also as a telegram bot. The scripts for the use cases are included in the repo.
The model was built using Transfer Learning which uses ResNet-50 as its underlying architecture. I have used the pretrained weights of the ImageNet model to train the network.
The dataset consists of 3725 images with mask and 3828 images without mask with a total of 7553 images. Download the dataset here
Metric | Result |
---|---|
Accuracy | 99.73 |
Training loss | 0.0086 |
Validation loss | 0.038 |
- FastAI
- Check out their docs here
- MobileNetV2
- OpenCV
- Tensorflow - Keras