Comparative Analysis of Image Classification Algorithms for Face Mask Detection

Authors

April 27, 2021

Downloads

Background: The COVID-19 pandemic remains a problem in 2021. Health protocols are needed to prevent the spread, including wearing a face mask. Enforcing people to wear face masks is tiring. AI can be used to classify images for face mask detection. There are a lot of image classification algorithm for face mask detection, but there are still no studies that compare their performance.

Objective: This study aims to compare the classification algorithms of classical machine learning. They are k-nearest neighbors (KNN), support vector machine (SVM), and a widely used deep learning algorithm for image classification which is convolutional neural network (CNN) for face masks detection.

Methods: This study uses 5 and 3 cross-validation for assessing the performance of KNN, SVM, and CNN in face mask detection.

Results: CNN has the best average performance with the accuracy of 0.9683 and average execution time of 2,507.802 seconds for classifying 3,725 faces with mask and 3,828 faces without mask images.

Conclusion: For a large amount of image data, KNN and SVM can be used as temporary algorithms in face mask detection due to their faster execution times. At the same time, CNN can be trained to form a classification model. In this case, it is advisable to use CNN for classification because it has better performance than KNN and SVM. In the future, the classification model can be implemented for automatic alert system to detect and warn people who are not wearing face masks.