A Deep Learning-Based Computer Vision Model for Real-Time Face Mask Detection
Abstract
Automated monitoring can support mask-compliance screening in environments where continuous manual observation is challenging. This paper presents a computer-vision framework that combines a lightweight, MobileNet-based feature extractor with residual learning, integrated alongside compliance logging and an edge-deployment architecture.The underlying experimental evaluation utilizes a balanced dataset of approximately 45,000 facial images split across mask and no-mask classes using an 80:10:10 training-validation-testing protocol. Images were normalized to 224×224 pixels and subjected to diverse data augmentations, including rotation, horizontal flipping, zooming, brightness adjustment, scaling, and translation. Evaluated on a 4,500-image test set, the model achieves a classification accuracy of 98.29% (95% Wilson score interval: 97.87%–98.63%). Derived performance metrics demonstrate a mask class precision, recall, and F1-score of 98.14%, 98.44%, and 98.29%, respectively, matching the balanced performance of the no-mask class (98.44% precision, 98.13% recall, 98.29% F1-score), yielding a macro-average performance of 98.29%.Hardware edge benchmarking demonstrates device inference latencies of 62 ms on a Raspberry Pi 4 and 28 ms on a NVIDIA Jetson Nano. This study establishes a verified baseline for lightweight compliance classification and details the essential dataset-provenance, face-detection, and pipeline constraints required for reliable, real-world edge deployment.