Face Mask Detector

This repository contains a face-mask detector built using Tensorflow/keras and OpenCV

I have built a classifier whick classifies whether a image contains mask or not. The classifier is built using MobileNetV2 pre trained model. I have used OpenCV for real time video capture. For face detection I have used pre-trained caffemodel. For face detection you can refer my another repository, click here

I have already trained the classifier and saved the model in model directory. The model was trained by executing dnn_model.py

The mask_detector.py loads the trained model and uses OpenCV for real time video capture and feeds the frames to the model and predicts the output

To run the face detection module execute “ python mask_detector.py “ in your terminal or command prompt. Press esc to stop the program.

REQUIREMENTS: Tensorflow imutils OpenCV sklearn


Images are taken from the internet.

Codebase: https://github.com/hoplite2k/face-mask-detector