Robust Real-Time Face Mask Detection Under Challenging Visual Conditions Using YOLOv8

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.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-08-20
DOI
https://doi.org/10.5281/zenodo.22023439
Primary Topic
Face recognition and analysis
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Robust Real-Time Face Mask Detection Under Challenging Visual Conditions Using YOLOv8

Muhammad Umer
Zenodo (CERN European Organization for Nuclear Research)
Face recognition and analysis
preprint

Robust Real-Time Face Mask Detection Under Challenging Visual Conditions Using YOLOv8

Muhammad Umer
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Namal University (PK)
Face recognition and analysis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Robust Real-Time Face Mask Detection Under Challenging Visual Conditions Using YOLOv8 — Muhammad Umer · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS