Source-linked AI summary

Multi-Stage CNN Architecture for Face Mask Detection

Amit Chavda, Jason Dsouza, Sumeet Badgujar, Ankit Damani

arXiv:2009.07627v2cs.CVeess.IV

TL;DR

Manually tracking face-mask compliance across large premises is infeasible, despite mask use being associated with reduced viral-transmission risk. This paper combines face detection, mask classification, and video tracking in a two-stage CNN system; its selected models detect masked and unmasked faces across multiple faces and angles, and Centroid Tracking improves video-stream performance.

  • Problem

    Manually enforcing face-mask policies and tracking violations across large premises is infeasible, although mask use reduces viral-transmission risk (Howard et al., 2020; Verma et al., 2020).

    Source: §1 · p. 1
  • Method

    A two-stage CNN detects faces with RetinaFace, classifies them with a lightweight mask classifier, and uses Centroid Tracking between video frames.

    Source: §1 · p. 1, §4.1 · p. 9
  • Results

    The selected RetinaFace and NASNetMobile system detects masked and unmasked faces in multi-face images across a wide range of angles, and Centroid Tracking helped improve video-stream performance.

    Source: §3.4 · pp. 7–8, §4.1 · p. 9
  • Takeaways & Limitations

    The system is presented as deployable with image or video capture devices such as CCTV for automated face-mask monitoring.

    Source: §1 · p. 2, §4.1 · p. 9

    The model currently runs at 5 FPS on a CPU; improving this to 15 FPS is future work.

    Source: §4.2 · p. 9

Abstract

from arXiv · show

The end of 2019 witnessed the outbreak of Coronavirus Disease 2019 (COVID-19), which has continued to be the cause of plight for millions of lives and businesses even in 2020. As the world recovers from the pandemic and plans to return to a state of normalcy, there is a wave of anxiety among all individuals, especially those who intend to resume in-person activity. Studies have proved that wearing a face mask significantly reduces the risk of viral transmission as well as provides a sense of protection. However, it is not feasible to manually track the implementation of this policy. Technology holds the key here. We introduce a Deep Learning based system that can detect instances where face masks are not used properly. Our system consists of a dual-stage Convolutional Neural Network (CNN) architecture capable of detecting masked and unmasked faces and can be integrated with pre-installed CCTV cameras. This will help track safety violations, promote the use of face masks, and ensure a safe working environment.

1. Introduction:

Some sectors cannot shift to remote work, while large-premise mask compliance is impractical to enforce manually. The paper proposes a two-stage face-detection and mask-classification system with video tracking for monitoring.

  • Studies report that face masks reduce viral-transmission risk, but manually tracking compliance across large premises is infeasible (Howard et al., 2020; Verma et al., 2020).Source: §1 · p. 1
  • 65% of employees were anxious about returning to the office as some sectors prepared to resume in-person work (Woods, 2020).Source: §1 · p. 1
  • The proposed two-stage CNN detects faces, classifies each as “Mask” or “No Mask,” and tracks faces across video frames.Source: §1 · p. 1
  • The authors state that tracking makes detections robust to motion-blur noise and that the system can integrate with CCTV for monitoring safety violations.Source: §1 · p. 2

2. Methods:

The methods motivate face-mask detection as a localization-and-classification task, then propose a two-stage CNN pipeline that detects faces and classifies their regions as masked or unmasked. The dataset and classifier training are designed to provide Stage 2 with inputs resembling those expected at deployment.

2.1.1. Traditional Object Detection:

  • Multi-stage detectors use region proposals and can outperform single-stage detectors, which generally run faster but may sacrifice accuracy.Traditional object-detection methods also rely heavily on feature engineering, unlike neural networks trained without that extra engineering.Source: §2.1.3 · p. 2, §2.1.1 · p. 2
  • Ejaz et al.'s PCA recognition falls below 70% on masked faces; Qin and Li define three wearing classes; Nieto-Rodríguez targets staff alerts; Loey et al. combine ResNet50 with classical classifiers.Qin and Li's system detects and crops faces before super-resolution and classification; Nieto-Rodríguez's approach seeks to minimize false positives without missing medical masks.Source: §2.1.4 · pp. 2–3

2.2. Proposed Methodology:

  • The proposed two-stage system detects and localizes faces first, then classifies their regions as Mask or No Mask and returns labeled face boxes.Stage 1 uses a pre-trained face detector; the system batches detected regions before Stage 2 classification.Source: §2.2 · p. 3, §2.2.1 · p. 3, §2.2.2 · p. 3
  • The intermediate block expands face boxes by 20%, crops the regions of interest, resizes and normalizes them, then batches them for classification.Stage 2 requires the person's whole head for accurate mask classification; the expansion is intended to include it with minimal overlap in most situations.Source: §2.2.3 · p. 4
  • The 7,855-image dataset combines masked-image sources with Flickr-Faces-HQ unmasked images; improperly worn masks and face-covering hands are labeled non-masked.Larxel masked images supplement RMFRD, whose images were biased toward Asian faces; training images pass through detection and ROI processing to match Stage 2 deployment inputs.Source: §2.2.5 · pp. 4–5
  • Three lightweight classifiers—MobileNetV2, DenseNet121, and NASNet—were trained, and NASNetMobile weights were selected based on comparative performance.Training used ImageNet-pretrained weights, an 80:10:10 train-validation-test split, 224 x 224 inputs, augmentation, and early stopping.Source: §2.2.4 · p. 4, §2.2.6 · p. 5

3. Experimental Analysis:

The analysis selects RetinaFace and NASNetMobile for a two-stage face-mask detector, then reports that centroid tracking improves detection in video streams. The final system detects masked and unmasked faces in multi-face images across a wide range of angles.

3.1. Face Mask Classifier Training Statistics:

  • NASNetMobile had slightly better overall training statistics, while DenseNet121 had the best F1-Score, motivating comparison of inference speed and model size.Tables 2 and 3 are identified as the training-statistics and classifier-performance tables, respectively.Source: §3.1 · p. 6, Table 2 · p. 6, Table 3 · p. 6

3.2. Face Detector Comparison:

  • RetinaFace was selected for Stage 1: its reported failure rate versus MTCNN fell from 26.31% to 9.37% at the NME threshold of 10%, and it handles side views.The detector comparison also reports that MTCNN and RetinaFace outperform Dlib on multiple faces and covered faces; Table 4 is identified as the inference-speed comparison.Source: §3.2 · pp. 6–7, Table 4 · p. 6

3.3. Face Mask Classifier Comparison:

  • NASNetMobile was selected over DenseNet121 because the models performed almost on par, while NASNetMobile was faster and lighter.The comparison identifies speed and model size as advantages for real-time applications and faster inference loading.Source: §3.3 · p. 7, Table 5 · p. 7

3.4. Final Results:

  • The final RetinaFace–NASNetMobile system detects masks in multi-face images across a wide range of angles, and centroid tracking significantly improved video-stream detection.The component choices and image result are reported in the final results; video performance is discussed separately.Source: §3.4 · pp. 7–8, §3.5 · p. 8

3.5. Video Analysis:

  • Centroid tracking stores detected-face ROI coordinates across frames, and a five-frame cache threshold at 30 FPS gave good results with few false-positive face detections.Tracking was added to stabilize detections amid video noise and motion blur, including when the detector misses an object during a frame transition.Source: §3.5 · p. 8, Figure 13 · p. 8, Figure 14 · p. 8

4. Discussion:

The paper concludes that its two-stage detector uses RetinaFace for face detection, NASNetMobile for mask classification, and centroid tracking to improve video-stream performance. The authors identify CPU speed and future model deployment and replacement as areas for further work.

4.1. Conclusions:

  • The proposed two-stage detector combines pre-trained RetinaFace, a NASNetMobile classifier trained on the created dataset, and centroid tracking, which helped improve video-stream performance.The authors describe automated workplace monitoring as a potential use for tracking mask use.Source: §4.1 · p. 9

4.2. Future Scope:

  • Current CPU inference runs at 5 FPS; planned work targets 15 FPS and includes TensorFlow Lite and TFRT deployment and replacing stages with improved models.The 15 FPS figure and deployment changes are future plans, not reported current performance.Source: §4.2 · p. 9
Loading 2009.07627v2…