MIDAS-An Intelligent Mask Detection System
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.
BUY REPORT AND PPT HERE: BUY NOW
In 2020, the world changed. This project examines the coronavirus pandemic, the efforts to combat it and ways to manage its mental health toll and safety regulations. Also, the absence of large datasets of ‘with_mask’ images has made the task of automated mask detection a challenge.
⚠️ TechStack/framework used
Our face mask detector didn't use any morphed masked images dataset. The model is accurate, and since we used the MobileNetV2 architecture, it’s also computationally efficient and thus making it easier to deploy the model to embedded systems (Raspberry Pi, Google Coral, etc.).
In the current scenario, identification is manually performed by a person leading to inefficiency and inaccuracy, thereby demanding the need of human invigilator for monitoring. Using MIDAS, an automated identification system is developed thus saving time and increasing accuracy. It eliminates the need of human invigilation and provides easier integration and compatibility with major security devices.
The dataset used can be downloaded here - Click to Download
This dataset consists of 3835 images belonging to two classes:
- with_mask: 1916 images
- without_mask: 1919 images
The images used were real images of faces wearing masks. The images were collected from the following sources:
All the dependencies and required libraries are included in the file
requirements.txt See here
- Clone the repo
$ git clone https://github.com/jelonmusk/midas.git
- Change your directory to the cloned repo and create a Python virtual environment named 'test'
$ mkvirtualenv test
- Now, run the following command in your Terminal/Command Prompt to install the libraries required
$ pip3 install -r requirements.txt
- Open terminal. Go into the cloned project directory and type the following command:
$ python3 train_mask_detector.py --dataset dataset
- To detect face masks in an image type the following command:
$ python3 detect_mask_image.py --image images/pic1.jpeg
- To detect face masks in real-time video streams type the following command:
$ python3 detect_mask_video.py
The model gave 93% accuracy for Face Mask Detection after training via
The following accuracy/loss training curve plot
MIDAS webapp using Tensorflow & Streamlit
$ streamlit run app.py
👏 And it's done!
Feel free to mail me for any doubts/query
📂 Project Report and Slides
Buy Face Mask Detection Report and Slides on @Gumroad https://jelonmusk.gumroad.com/l/pXTeR
Feel free to file a new issue with a respective title and description on the the MIDAS repository. If you already found a solution to your problem, I would love to review your pull request!