Skip to content

This project is based on OpenCv,Convolutional Neural Network,Caffe-based face Detector,Keras Models,TensorFlow and on python language.. Our face mask detector didn't uses any morphed masked images dataset. The model is accurate, and since we used the simple Sequential Model architecture, it’s also computationally efficient and thus making it eas…

License

Notifications You must be signed in to change notification settings

ayush-09/Face_Mask_Detector

Repository files navigation

Face_Mask_Detector (COVID-19)

Purpose of the Project

This project helps us to spread the awareness among people using face mask properly. It detects the face mask on your face whether the person is wearing mask or not and tells the percentage of the accuracy of wearing the face mask properly or not.

Division of the Project

In order to train a custom face mask detector, I need to split our project into two distinct phases:

  • Training Phase (Training the model):
    In this I will focus on loading our face mask detection datasets from disk, training a model using CNN on the datasets, and then serializing the face mask detector to disk.

  • Deployment Phase (Deployment of the model):
    Once the face mask detector is trained, then move on to loading the mask detector, performing the face mask detection and then identifying each face as with mask or without mask.

image

About the Dataset

Our face mask detector didn't uses any morphed masked images dataset. The dataset consists of 1,376 images belonging to two classes:

  • with_mask: 690 images
  • without_mask: 686 images

I choose this dataset because it consists artificially dataset of people wearing masks. If you include the original images used to generate face mask samples as non-face mask samples, your model will become heavily biased and fail to generalize well. Avoid that at all costs by taking the time to gather new examples of faces without marks.

TechStack/framework used

Prerequisites

All the dependencies and required libraries are included in the file requirements.text
Clone my repo and install the libraries and the run the Face_Mask_detection.ipynb colab notebook for the image output.

Building Model

image

Graphical Representation

image

image

Classification Report

A Classification report is used to measure the quality of predictions from a classification algorithm. How many predictions are True and how many are False. More specifically, True Positives, False Positives, True negatives and False Negatives are used to predict the metrics of a classification report as shown below

image

Result

The accuracy of the model is 96% after trained and tested on the images.

  • INPUT Img: 41698

  • OUTPUT Img: result1

  • Another OUTPUT Img:

result

Future Use

The model is accurate, and since we used the simple Sequential Model architecture, it’s also computationally efficient and 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.

About

This project is based on OpenCv,Convolutional Neural Network,Caffe-based face Detector,Keras Models,TensorFlow and on python language.. Our face mask detector didn't uses any morphed masked images dataset. The model is accurate, and since we used the simple Sequential Model architecture, it’s also computationally efficient and thus making it eas…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published