Face Mask Detection System built with OpenCV, Keras/TensorFlow using Deep Learning and Computer Vision concepts in order to detect face masks in static images as well as in real-time video streams.
This system can be used in real-time applications that require face mask detection for security purposes due to the increase in the Covid-19 outbreak. This project can be integrated with embedded systems for application in airports, train stations, offices, schools and public places to ensure compliance with public safety guidelines.
The dataset used can be downloaded here - Click to Download
This dataset consists of 5106 images belonging to two classes:
- with_mask: 3158 images
- without_mask: 1948 images
The images used were real images of faces wearing masks. The images were collected from the following sources:
- Kaggle datasets
- Various videos
- Udemy tutorials
It is a method applied to find objects on the image. This method is called haar-like features. I used the "haarcascade_frontalface_default.xml" file in this project.
You can download all the haarcascade xml files you need from here.
- Clone the repo
$ git clone https://github.com/bertuginal/Face-Mask-Detection.git
- Now, run the following command in your Terminal/Command Prompt to install the libraries required
$ pip3 install -r requirements.txt
- Open terminal. Type the following command to train the model:
$ python3 Train.py --dataset data
- To detect face masks in real-time video streams type the following command:
$ python3 Test.py
Feel free to mail me for any doubts/query π§ bertuginal@yahoo.com
β If you like my project, can you click the star to support me?