Engineering Proceedings (Jul 2023)

Face Mask Wearing Classification Using Machine Learning

  • Kalaimagal Ramakrishnan,
  • Vimala Balakrishnan,
  • Hui Yeok Wong,
  • Shi Hui Tay,
  • Kar Lok Soo,
  • Weng Kiat Kiew

DOI
https://doi.org/10.3390/engproc2023041013
Journal volume & issue
Vol. 41, no. 1
p. 13

Abstract

Read online

In late December 2019, a cluster of previously unidentified coronavirus cases emerged in Wuhan, China. Subsequently, the virus quickly spread to the whole world in a matter of few months. At that point in time, there were no known treatments for COVID-19. Therefore, to limit the spread of virus transmission, the public was advised to maintain social distancing and wear a face mask. In Malaysia, most people were compliant and adhered to the standard of procedure (SOP). However, it was observed that many people were not wearing the mask correctly. Therefore, this paper aims to analyze how image classification using machine learning algorithms can be used to detect whether a face mask is properly worn. In this research, a total of 1222 color images (selfies) were used to build five machine learning models, in particular Naïve Bayes (NB), Support Vector Machine (SVM), Decision Tree (DT), Random Forest (RF) and K-Nearest Neighbors (KNN), to classify three methods of mask-wearing: mask correctly worn, mask incorrectly worn, and mask not worn. Our results show that Decision Tree is the best model among these five models in terms of accuracy (85.7%), precision (85.9%), recall (85.7%), and F1-Score (85.7%). However, it was observed that when classifying mask-wearing images the decision tree approach was not able to identify images with a similar pattern, for example, in the cases of mask under the nose and mask correctly worn. From an awareness perspective, this study emphasizes the need for the public to properly wear their face mask to reduce the spread of COVID-19 and the effectiveness of image classification in detection of face mask wearing.

Keywords