Deep Learning and YOLOv8 Utilized in an Accurate Face Mask Detection System

Deep Learning and YOLOv8 Utilized in an Accurate Face Mask Detection System

16 January 2024 | Christine Dewi, Danny Manongga, Hendry, Evans Mailoa and Kristoko Dwi Hartomo
This study presents an accurate face mask detection system utilizing deep learning and YOLOv8, a state-of-the-art object detection algorithm. The system aims to identify and classify face masks in images, with a focus on medical masks. The research combines the Face Mask Dataset (FMD) and Medical Mask Dataset (MMD) into a single dataset to enhance detection performance. The proposed model achieves a "Good" level of 99.1% accuracy, surpassing previous studies. The model's performance is evaluated using metrics such as mean average precision (mAP), precision, recall, and F1 score. The YOLOv8 model is trained on a dataset of 1415 images, with 100 epochs, weight_decay = 0.0005, learning rate = 0.001, batch size = 16, and image size = 416. The model demonstrates high accuracy in detecting medical masks, with a 99.1% mAP for the "good" class. The study also compares the performance of YOLOv8n, YOLOv8s, and YOLOv8m models, finding that YOLOv8m achieves the highest mAP of 78.4%. The model's architecture includes a novel C2f module derived from the CSP idea and the ELAN concept from YOLOv7. The study highlights the advantages of YOLOv8, including its speed, precision, and ability to handle diverse object sizes and aspect ratios. However, the model has limitations, such as difficulty in detecting small objects and partially occluded objects. The research concludes that the YOLOv8m model is an effective method for detecting medical face masks and suggests future work on using explainable AI for mask detection. The study uses publicly available datasets from Kaggle and provides links to the datasets for further research.This study presents an accurate face mask detection system utilizing deep learning and YOLOv8, a state-of-the-art object detection algorithm. The system aims to identify and classify face masks in images, with a focus on medical masks. The research combines the Face Mask Dataset (FMD) and Medical Mask Dataset (MMD) into a single dataset to enhance detection performance. The proposed model achieves a "Good" level of 99.1% accuracy, surpassing previous studies. The model's performance is evaluated using metrics such as mean average precision (mAP), precision, recall, and F1 score. The YOLOv8 model is trained on a dataset of 1415 images, with 100 epochs, weight_decay = 0.0005, learning rate = 0.001, batch size = 16, and image size = 416. The model demonstrates high accuracy in detecting medical masks, with a 99.1% mAP for the "good" class. The study also compares the performance of YOLOv8n, YOLOv8s, and YOLOv8m models, finding that YOLOv8m achieves the highest mAP of 78.4%. The model's architecture includes a novel C2f module derived from the CSP idea and the ELAN concept from YOLOv7. The study highlights the advantages of YOLOv8, including its speed, precision, and ability to handle diverse object sizes and aspect ratios. However, the model has limitations, such as difficulty in detecting small objects and partially occluded objects. The research concludes that the YOLOv8m model is an effective method for detecting medical face masks and suggests future work on using explainable AI for mask detection. The study uses publicly available datasets from Kaggle and provides links to the datasets for further research.
Reach us at info@study.space