Amid the ongoing COVID-19 pandemic, there are no efficient face mask detection applications which are now in high demand for transportation means, densely populated areas, residential districts, large-scale manufacturers and other enterprises to ensure safety. The absence of large datasets of ‘with_mask’ images has made this task cumbersome and challenging.
If interested, contact me at [email protected]
:movie_camera: YouTube Demo Link
:computer: Dev Link
Our face mask detector doesn't use any morphed masked images dataset and the model is accurate. Owing to the use of MobileNetV2 architecture, it is computationally efficient, thus making it easier to deploy the model to embedded systems (Raspberry Pi, Google Coral, etc.).
This system can therefore be used in real-time applications which require face-mask detection for safety purposes due to the outbreak of Covid-19. This project can be integrated with embedded systems for application in airports, railway stations, offices, schools, and public places to ensure that public safety guidelines are followed.
The dataset used can be downloaded here - Click to Download
This dataset consists of 4095 images belonging to two classes:
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
$ git clone https://github.com/chandrikadeb7/Face-Mask-Detection.git
$ cd Face-Mask-Detection
$ virtualenv test
$ source test/bin/activate
$ pip3 install -r requirements.txt
$ python3 train_mask_detector.py --dataset dataset
$ python3 detect_mask_image.py --image images/pic1.jpeg
$ python3 detect_mask_video.py
Face Mask Detector webapp using Tensorflow & Streamlit
$ streamlit run app.py
Feel free to mail me for any doubts/query :email: [email protected]
Run these commands after cloning the project
|Commands||Time to completion|
|sudo apt install -y libatlas-base-dev liblapacke-dev gfortran||1min|
|sudo apt install -y libhdf5-dev libhdf5-103||1min|
|pip3 install -r requirements.txt||1-3 mins|
|wget "https://raw.githubusercontent.com/PINTO0309/Tensorflow-bin/master/tensorflow-2.4.0-cp37-none-linux_armv7l_download.sh"||less than 10 secs|
|./tensorflow-2.4.0-cp37-none-linux_armv7l_download.sh||less than 10 secs|
|pip3 install tensorflow-2.4.0-cp37-none-linux_armv7l.whl||1-3 mins|
Awarded Runners Up position in Amdocs Innovation India ICE Project Fair
Feel free to file a new issue with a respective title and description on the the Face-Mask-Detection repository. If you already found a solution to your problem, I would love to review your pull request!
You can find our Code of Conduct here.
Made with :heart: by Chandrika Deb
MIT © Chandrika Deb