๐ท FaceMask-Detection-using-Deeplearning
A CNN based Image Classification model to classify people with and without masks.
A pilot project of Face mask detection. During the times of COVID-19, covering our face with a mask and maintaining social distancing is essential.
With advancements in the field of Deep Learning, now we can easily train a model and check if someone is earning a mask or not.
I have made FaceMask Detection.ipynb
private to avoid misuse, contact me @[email protected] for complete directory โบ
Need a detailed explanation of the project? ping me for personal 1-1 explanation โ
๐ Dataset | ๐ฐ HaarCascade |
---|---|
Link | File |
๐ข Favour:
It would be highly motivating, if you can STARโญ this repo if you find it helpful.๐
๐ Output:
๐โโ๏ธ How to Run
Detecting faces with maks in video
- Navigate to jupyter-notebook
./FaceMask Detection using Deep Learning.ipynb
I made this file private to avoid misuse, contact me @[email protected] for complete directory โบ - Run import libraries cell and load model cell.
- For getting real-time results, run predicition and casscade classifier cell
๐ง How it works!!
- Read input either as single image or video from webcam using OpenCV.
- Detect location of faces in given frame using Face_Frontal_Default Cascade Classifier.Download
- Save the list of face portions for further steps.
- Load the Custom-trained CNN model, iterate each face through the model to predict mask on face.
- Post-process the frame ie; Tagging Face, with respective predictions.
๐งSetup
You can setup this project using either of the methods mentioned below.
๐ Method 1: Setup (Pipenv Virtual Environment)
- Clone the project to your local system
- Navigate inside the project directory on your local system inside the terminal
- Install all dependencies using
pipenv install --ignore-pipfile
- Start environment with
pipenv shell
๐ Method 2: Setup (pip)
- Clone the project to your local system
- Navigate inside the project directory on your local system inside the terminal
- Install all dependencies using
pip install -r requirements.txt
๐โ Creator Disclaimer Since the dataset used here is Open-Sourced, this code should only be used for research/academic/personal purposes only. The models were trained on the prajnasb's Open Source dataset, any form of commercial use is strictly prohibhited. Please contact me for all further queries.๐