Face Mask detection


With the emergence of COVID 19, a number of governments across world ensuring that people should wear mask on public places to avoid Corona 19 transmission. In these challenging times, an attempt has been made in this project to enable the CCTVs deployed on public places to identify the persons without mask. The proposed application identifies a user that he/she is not wearing a mask; based on this information an alert could be trigger to the concerned authorities. It can be used to enforce masses the wearing of the mask. The algorithms analyze the image by applying non-linear filters. The algorithm processes each layer in order to generate information out of it. The algorithm perfectly identifies the person without wearing a mask. Even a person put a hand on the face it creates a trigger mentioning person no wearing mask. As shown below

Fig 1 keeping hand on face instead of Mask to fool the system

Further in the figure below we can see that without mask the application is showing as no Mask with accuracy as 100%

Figure 2: Without mask

In the below figure the application immediately identifies the person wearing mask as shown below. The effectiveness of the application is very high as it can detect mask with different color combination as well.

Figure 3: With Mask

Different measure like localization, visual interaction are done by the algorithm internally. It can easily identify all the regions and make out which region of the face should be covered.

Following are the technical details of the project:

  1. Python 3.5.5 is used to deploy our algorithm
  2. Libraries used: OpenCV, Keras/TensorFlow 2.0, and Deep Learning.

Steps to use:

  1. Creation of Dataset: we have tried to build a rich dataset a) with mask – 796 images and b) without the mask- 600
    1. Training and testing: The algorithm is built by using Mobilenetv2 and testing is done, In this small project based on inputs given by [1], the trained algorithm detects mask on a face during the live video stream. A sample is shown below:

Leave a Reply

Your email address will not be published. Required fields are marked *