Skip to content

cybernobie/covid19-face-mask-detection-cnn-opencv

Repository files navigation

Covid19 FaceMask Detector using CNN & OpenCV.

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 video streams.

                                   

Live Demo:

😇 Motivation

In the present scenario due to Covid-19, there is 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. Also, the absence of large datasets of ‘with_mask’ images has made this task more cumbersome and challenging.

⭐ Features

This system can 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.

📁 Dataset

The dataset used can be downloaded here - Click to Download

Open In Colab

This dataset consists of 1006 images belonging to two classes:

  • with_mask: 500 images
  • without_mask: 606 images

🚀  Installation

  1. Download the files in this repository and extract them.
  2. Run Face_Mask_Detection.ipynb file first
  3. Running the above .ipynb file will generate Model.h5 file.
  4. Now Run Mask.py file
  5. Done.

NOTE: {

pip install opencv-python

pip install numpy

pip install keras

pip install tensorflow

To Fix/Install Modules }

🔑 Results

Our model gave 92% accuracy for Face Mask Detection after training via tensorflow==2.3.1

We got the following accuracy/loss training curve plot

👏 And it's done!

Feel free to mail me for any doubts/query :email: [email protected]

❤️ Owner

Made with ❤️  by Aryan Negi