Face Mask Detection
04 Jan 2021Well I’d a lot of free time and I was trying to learn Pytorch, so I made a simple project of face mask detection. (Note: This project doesn’t seem to show the best results but is decent enough.)
As you can see, the model I trained can do a lot better at detecting masks, but nevertheless this was for learning purpose. My mask classifier model is a very simple one as shown below, I used 3 Convolutional layers and 3 Fully Connected Layers. The dataset can be found here and the mask classifier model was trained on 30 epochs. Test accuracy was around 98%. For face detection I used OpenCV’s frontal face cascade classifier and then predicted on the detected regions.
Improvements/Future Work
- The model can be trained further on more data, also the model architecture can be more complex.
- Use Streamlit for interactive experience.
References
- https://www.pyimagesearch.com/2020/05/04/covid-19-face-mask-detector-with-opencv-keras-tensorflow-and-deep-learning/
- https://towardsdatascience.com/real-time-face-recognition-an-end-to-end-project-b738bb0f7348
- https://machinelearningmastery.com/how-to-perform-face-detection-with-classical-and-deep-learning-methods-in-python-with-keras/
- Dataset