Check out the image above. These are predictions of a Convolutional Neural Network that predicts faces wearing masks and segments the face-mask area. Do you want to know how this is done? This Jupyter Notebook contains a tutorial for Face Mask detection in people, using a custom Convolutional Neural Network. The network, dataset class, utility functions and train/test scripts are written from scratch in PyTorch and explained in detail. If you have dabbled in Computer Vision/ML/DL or just interested in such things, this is for you.
The objective of the project is to train a object detection network that detects people wearing or not wearing a mask. Also, it is desired that a segmentation of the mask be extracted from faces wearing the mask. The extraction of face-mask segmentations are firstly, performed using traditional OpenCV techniques and later with our custom CNN.
To address the above mentioned objectives, we address 3 sections primarily:
-
Object detection of mask/no-mask faces using custom CNN
-
Segmenting face-mask using OpenCV
-
Segmenting face-mask using our Custom CNN
Check out the Jupyter notebook PEA.ipynb
for the detailed tutorial!