Skip to main content
QUICK REVIEW

[Paper Review] Real-time Face Mask Detection in Video Data

Yuchen Ding, Zichen Li|arXiv (Cornell University)|May 5, 2021
Face recognition and analysisComputer Science2 references12 citations
TL;DR

This paper presents two real-time face mask detection pipelines using deep learning: one combining a pre-trained face detector with a classifier on synthetic data, and another using a one-stage object detector (YOLO) fine-tuned on real-world images. The YOLO-based pipeline achieved 89% mAP(0.5) and 52 FPS, demonstrating high efficiency and strong performance for real-world deployment in surveillance systems.

ABSTRACT

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 real-time video streams. To accomplish this goal, we devised two separate approaches and evaluated their performance and run-time efficiency. The first approach leverages a pre-trained 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, fine-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. We have concluded that if a larger dataset with bounding-box labels can be curated, this task is best suited using object detection architectures such as YOLO and SSD due to their superior inference speed and satisfactory performance on key evaluation metrics.

Motivation & Objective

  • To develop a real-time system for detecting correct and incorrect face mask usage in video streams during the COVID-19 pandemic.
  • To evaluate the trade-off between accuracy and inference speed in mask detection pipelines.
  • To compare two distinct deep learning approaches: a two-stage face detector + classifier pipeline and a one-stage object detection pipeline.
  • To assess the feasibility and performance of using synthetic data versus small real-world datasets for mask detection.
  • To explore the long-term implications of bias, security, and real-world deployment risks in automated mask detection systems.

Proposed method

  • Employed MTCNN as a pre-trained face detector to extract faces from video frames.
  • Trained a mask-wearing image classifier on a synthetic dataset of 180,000 images with three classes: correctly worn, incorrectly worn, and no mask.
  • Used YOLOv5 as a one-stage object detector fine-tuned on a real-world dataset of 14,233 annotated images with face bounding boxes and mask-wearing labels.
  • Applied knowledge distillation techniques to improve model accuracy and efficiency, including noisy teacher and self-learning methods.
  • Evaluated model performance using standard metrics: test accuracy, mAP(0.5), and frames per second (FPS) for real-time inference.
  • Explored adversarial robustness and security considerations, including model hardening via distillation and potential attack vectors.

Experimental results

Research questions

  • RQ1Can a two-stage pipeline using a pre-trained face detector and a classifier on synthetic data achieve high accuracy and real-time performance in mask detection?
  • RQ2How does the performance of a one-stage object detection model like YOLO compare to a two-stage pipeline in terms of mAP and inference speed on real-world video data?
  • RQ3To what extent can knowledge distillation improve the accuracy of lightweight models without sacrificing inference speed?
  • RQ4What are the key risks and ethical concerns associated with deploying automated mask detection systems in public surveillance?
  • RQ5How can model robustness be enhanced against adversarial attacks and data poisoning in real-world deployment scenarios?

Key findings

  • The two-stage pipeline achieved a test accuracy of 99.97% on the synthetic dataset and sustained 6 FPS on real-time video data.
  • The one-stage YOLO-based pipeline achieved 89% mAP(0.5) on real-world images while maintaining 52 FPS, demonstrating strong real-time performance.
  • Knowledge distillation significantly improved model accuracy, with one experiment showing a jump from 37% to 96.5% accuracy on a small sample using iterative distillation techniques.
  • The study concluded that object detection architectures like YOLO and SSD are better suited for this task when a larger, labeled dataset is available due to superior speed and performance.
  • Security risks, including adversarial attacks and data privacy breaches, were identified as critical concerns requiring mitigation strategies such as model hardening and access control.
  • Bias evaluation and demographic fairness testing were highlighted as essential future steps before real-world deployment to prevent discriminatory outcomes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.