Machine Learning Project purely meant for educational purpose
In today's pandemic world, it is crucial to monitor the people in the world. It is a necessity to wear mask to prevent the spread of contagious communicable diseases that spread through the air, especially CoVID-19. A need to maintain personal hygiene to avoid spread of disease has motivated people to wear masks. But, not all people follow the norm. So, the application at hand monitors the people at realtime to detect if a person wears a mask or not.
If you have already installed anaconda
, you can create a virtual environment using the following commands:
conda create --name env
conda activate env
Make sure to install the python packages in requirements.txt:
pip install -r requirements.txt
- Sourced from:
- Kaggle
- Google Images
- Other open source image libraries
- Credits: Balaji Srinivasan
dataset/
contains the dataset for training the modelwith_mask\
contains images of people wearing maskwithout_mask\
contains images of people NOT wearing mask
face_detector/
contains the model that detects the face, which the region of interest to detect the maskdeploy.prototxt
is the protobuffer text file that contains details regarding the face detection modelres10_300x300_ssd_iter_140000.caffemodel
is the model used to detect faces
Train.py
: contains the code to preprocess the images in the dataset and train the model to detect masksTest.py
: contains the code to start a video stream to perform a realtime mask detection on the live stream
- Face Mask Detection by Balaji Srinivasan - YouTube Tutorial and Walkthrough of code
- Face-Mask-Detection by Balaji Srinivasan - Github Repository
- Tensorflow installation (with CUDA, cudNN and GPU) by Aladdin Perrson - YouTube Tutorial