Skip to content

Using pre-trained CNN's w/ transfer learning to detect face masks in real-time. The Haar-cascade classifier in OpenCV is used for facial recognition and bounding boxes.

License

Notifications You must be signed in to change notification settings

J-Douglas/Face-Mask-Detection

Repository files navigation

Face-Mask-Detection

License: MIT

COVID-19 has made wearing face masks a part of everyone's daily lives. Making sure the people wear masks inside stores and public spaces has become a priority. As well, being able to determine if someone is wearing a mask is important for contact tracing and the transmission of COVID. This was the motivation to create a face mask detection model that can detect face masks in real-time. For this project, I coded in Python in a Jupyter Notebook and used TensorFlow, Keras, NumPy, and OpenCV.

Dataset

The face mask dataset used was compiled by Chandrika Deb.

The dataset has 3835 images split between two classes: 1916 images of faces with masks and 1919 images of faces without masks.

I split the data into 75% training set, 10% validation set, and 15% testing set.

The dataset can be downloaded here.

Results

The mask detection classifier reached 97% accuracy. The notebook can be run to replicate this demo and the results.

About

Using pre-trained CNN's w/ transfer learning to detect face masks in real-time. The Haar-cascade classifier in OpenCV is used for facial recognition and bounding boxes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published