Validation study demonstrates real-time three-class face mask detection across challenging visual conditions using YOLOv8n, indicating viable edge deployment for automated compliance monitoring.
Automated face mask compliance monitoring remains a practically important computer vision task, particularly for deployment in public-facing surveillance settings where manual supervision is costly and inconsistent. A persistent limitation of existing approaches is that most are developed and evaluated under controlled imaging conditions and as binary mask / no-mask classifiers, leaving two practically important problems under-addressed: detecting improperly worn masks, and maintaining detection reliability under low light, partial occlusion, and low-resolution input. This paper presents a real-time, three-class face mask detection framework (correctly worn mask, no mask, and incorrectly worn mask) built on the YOLOv8n (nano) architecture, chosen specifically for its favourable accuracy-to-latency trade-off on resource-constrained hardware. A custom dataset of 1,956 annotated images was assembled by merging and validating multiple labelled subsets, then split 70/15/15 into training, validation, and test sets. The model was fine-tuned from pretrained YOLOv8n weights for 50 epochs at 640×640 resolution. On the held-out test set, the model achieved a precision of approximately 0.91, recall of approximately 0.85, mAP@50 of approximately 0.89, and mAP@50–95 of approximately 0.70, with an average inference time of 3.9 ms per image (preprocessing and post-processing included, total ≈7.4 ms, equivalent to roughly 135 FPS) on an NVIDIA Tesla T4 GPU. Qualitative testing on low-light, occluded, blurred, and crowded images showed that the model degrades gracefully rather than failing outright, with confidence scores dropping under difficult conditions while predictions generally remained correct. The principal contribution of this work is a compact, edge-deployable, three-class detection pipeline together with an explicit, honestly reported evaluation of its behaviour under realistic, non-ideal visual conditions — an evaluation dimension that is frequently omitted in prior mask-detection literature.
No takes yet. Share an insight, caveat, or question.
Muhammad Umer (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: