Effectiveness of Detection-based and Regression-based Approaches for Estimating Mask-Wearing Ratio

Khanh-Duy Nguyen, Hai-Dang Nguyen, Trung-Nghia Le, Junichi Yamagishi, Isao Echizen · DOI

Abstract

This study evaluates two primary computer vision paradigms—detection-based and regression-based—for estimating mask-wearing compliance in dense public environments. Utilizing the newly developed NFM dataset, which features over 580,000 annotations of "tiny faces" in real-world street views, the research highlights a critical trade-off: detection-based methods offer high accuracy (Pearson correlation of 0.94) but are computationally intensive, while regression-based methods provide significant speed advantages (nearly 4x faster) at the cost of classification precision.

Introduction

Monitoring mask-wearing compliance is essential for public health policy, yet automating this via surveillance is challenging. Real-world "street-view" imagery often contains small, occluded faces in varying lighting conditions, rendering standard internet-photo-trained models ineffective. This paper addresses the lack of comprehensive datasets for these conditions and compares two distinct algorithmic strategies for ratio estimation.

The NFM Dataset

A core contribution of this work is the New Face Mask (NFM) dataset. It comprises 581,108 face annotations across 18,088 frames extracted from high-quality street-view videos of Japanese cities. Unlike previous datasets, NFM focuses on realistic surveillance constraints, with a high proportion of faces smaller than 32x32 pixels. The dataset includes diverse environmental conditions, such as nighttime and snow, and covers both pre-pandemic and pandemic-era footage to provide a wide range of mask-wearing ratios.

Methodology

The authors compare two fundamentally different approaches to the task of ratio estimation:

1. Detection-based: Improved RetinaFace

This approach treats mask-wearing estimation as an object detection and classification task. The authors enhanced the RetinaFace architecture by integrating a Bi-directional Feature Pyramid Network (BiFPN) for multi-scale feature extraction and a context module to improve the detection of small faces.

Architecture of the improved RetinaFace detection-based model featuring BiFPN and context modules.

2. Regression-based: CSRNet

Adapted from crowd-counting research, this method uses CSRNet to generate density maps for masked and unmasked faces. Instead of bounding boxes, it predicts the spatial density of each class, integrating the maps to find total counts.

Pipeline for estimating mask-wearing ratio using dual CSRNet models to generate separate density maps.

This method is inherently more robust to high congestion where individual face boundaries are blurred, though it struggles with precise classification compared to detection-based models.

Key Results and Discussion

The experimental results demonstrate a clear performance gap between the two paradigms:

  • Accuracy vs. Classification: The improved RetinaFace achieved a Pearson correlation coefficient of 0.94, far exceeding CSRNet’s 0.73. While CSRNet is effective at counting, its lack of an explicit classification layer makes it prone to misidentifying face types in dense crowds.
  • Computational Efficiency: CSRNet operated at 3.17 FPS, nearly four times faster than the detection-based model (0.81 FPS). Its compact size makes it suitable for edge deployment.
  • Detection Gains: The improved RetinaFace showed a 2.6% increase in mAP over the baseline, particularly in identifying unmasked faces, thanks to the BiFPN and focal loss implementation.

Conclusion

The choice between detection and regression depends on the specific application requirements. For high-precision policy analysis, detection-based models are superior. For real-time monitoring on resource-constrained hardware, regression-based models offer a viable, albeit less accurate, alternative. Future research may explore hybrid frameworks that dynamically switch between these methods based on crowd density.

Summary updated

BibTeX
@inproceedings{nguyen2021effectiveness,
  author = {Khanh-Duy Nguyen and Hai-Dang Nguyen and Trung-Nghia Le and Junichi Yamagishi and Isao Echizen},
  title = {{Effectiveness of Detection-based and Regression-based Approaches for Estimating Mask-Wearing Ratio}},
  booktitle = {FG},
  year = {2021},
  doi = {10.1109/fg52635.2021.9667046},
}
Figure