Real time face mask detection in video data

Posted on: 25 May, 2021

In response to the ongoing COVID-19 pandemic, we present a robust deep learning pipeline that is capable of identifying correct and incorrect mask-wearing from realtime video streams. To accomplish this goal, there are two prominent separate approaches available, evaluating their performance and run-time efficiency can be considered for real-world Usages. The first approach leverages a pretrained face detector in combination with a mask-wearing image classifier trained on a large-scale synthetic dataset. The second approach utilizes a state-of-the-art object detection network to perform localization and classification of faces in one shot, fifine-tuned on a small set of labeled real-world images. The first pipeline achieved a test accuracy of 99.97% on the synthetic dataset and maintained 6 FPS running on video data. The second pipeline achieved a mAP(0.5) of 89% on real-world images while sustaining 52 FPS on video data.

   

Implementation:

Below video from Balaji Srinivasan shows practical implementation of building a Face Mask Detector using Keras, Tensorflow, MobileNet and OpenCV. We will also see how to apply this on a Live Video Camera. With further improvements these types of models could be integrated with CCTV cameras to detect and identify people without masks.