Face Mask Detection Using OpenCV

Objective:

  • To detect whether a person is with mask or without mask.

Background

  • In order to protect ourselves from the infections, pollutions and deadful viruses, almost every one of us tend to wear a face mask. It becomes increasingly necessary to check if the people in the crowd wear face masks in most public gatherings such as Malls, Theaters, Parks, etc., People are forced by laws to wear face masks in public in many countries.These rules and laws were developed as an action to the exponential growth in cases and deaths in many areas. However, the process of monitoring large groups of people is becoming more difficult. The monitoring process involves the detection of anyone who is not wearing a face mask. Reports indicate that wearing face masks, while at work clearly reduces the risk of transmission. An efficient and economic approach of using AI to create a safe environment in a manufacturing setup, a hybrid model using Deep learning - Convolutional Neural Network and OpenCV for face mask detection has been proposed. The proposed model can be integrated with surveillance cameras to impede the COVID-19 transmission by allowing the detection of people who are wearing masks not wearing face masks.

Dataset to Train Model:

1. Face Mask Dataset
2. Google Drive Link For Dataset

Dataset Contains 2 Classes to train model:

  1. With Mask
  2. Without Mask

Codes:

Notebook:
1. training_mask_detection_model.ipynb
2. detect_mask_video.ipynb

Colab Notebook: https://colab.research.google.com/drive/14QEUFXDAGI08QqDGElfNMzRx1Y-L2kA0?usp=sharing

Output :
picture alt