1. Introduction {#s0005}
===============

The trend of wearing face masks in public is rising due to the COVID-19 coronavirus epidemic all over the world. Before Covid-19, People used to wear masks to protect their health from air pollution. While other people are self-conscious about their looks, they hide their emotions from the public by hiding their faces. Scientists proofed that wearing face masks works on impeding COVID-19 transmission [@b0005]. COVID-19 (known as coronavirus) is the latest epidemic virus that hit the human health in the last century [@b0010]. In 2020, the rapid spreading of COVID-19 has forced the World Health Organization to declare COVID-19 as a global pandemic. According to [@b0015], more than five million cases were infected by COVID-19 in less than 6 months across 188 countries. The virus spreads through close contact and in crowded and overcrowded areas.

The coronavirus epidemic has given rise to an extraordinary degree of worldwide scientific cooperation. Artificial Intelligence (AI) based on Machine learning and Deep Learning can help to fight Covid-19 in many ways. Machine learning allows researchers and clinicians evaluate vast quantities of data to forecast the distribution of COVID-19, to serve as an early warning mechanism for potential pandemics, and to classify vulnerable populations. The provision of healthcare needs funding for emerging technology such as artificial intelligence, IoT, big data and machine learning to tackle and predict new diseases. In order to better understand infection rates and to trace and quickly detect infections, the AI \'s power is being exploited to address the Covid-19 pandemic [@b0020] such as the detection of COVID-19 in medical chest X-rays [@b0025].

Policymakers are facing a lot of challenges and risks in facing the spreading and transmission of COVID-19 [@b0030]. People are forced by laws to wear face masks in public in many countries. These rules and laws were developed as an action to the exponential growth in cases and deaths in many areas. However, the process of monitoring large groups of people is becoming more difficult. The monitoring process involves the detection of anyone who is not wearing a face mask. In France, to guarantee that riders wear face masks, new AI software tools are integrated in the Paris Metro system\'s surveillance cameras [@b0035]. The French startup DatakaLab [@b0040], which developed the software, reports that the goal is not to recognize or arrest people who do not wear masks but to produce anonymous statistical data that can help the authorities predict potential outbreaks of COVID-19.

In this paper, we introduce a mask face detection model that is based on deep transfer learning and classical machine learning classifiers. The proposed model can be integrated with surveillance cameras to impede the COVID-19 transmission by allowing the detection of people who are not wearing face masks. The model is integration between deep transfer learning and classical machine learning algorithms. We have used deep transfer leering for feature extractions and combined it with three classical machine learning algorithms. We introduced a comparison between them to find the most suitable algorithm that achieved the highest accuracy and consumed the least time in the process of training and detection.

The novelty of this research is using a proposed feature extraction model have an end-to-end structure without traditional techniques with three classifiers machine learning algorithms for mask face detection. The organization for the rest of the paper is as follows. [Section 2](#s0010){ref-type="sec"} reviews previous related works. [Section 3](#s0015){ref-type="sec"} describes the characteristics of the dataset. [Section 4](#s0020){ref-type="sec"} illustrates the proposed model in detail. [Section 5](#s0040){ref-type="sec"} reports and analyses the experimental results, and [Section 6](#s0070){ref-type="sec"} presents the conclusions and possibilities of future work.

2. Related works {#s0010}
================

Generally, most of the publication focus is on face construction and identity recognition when wearing face masks. In this research our focus is on recognizing the people who are not wearing face masks to help in decreasing the transmission and spreading of the COVID-19. Researchers and scientists have proved that wearing face masks help in minimizing the spreading rate of COVID-19. In [@b0045], the authors developed a new facemask-wearing condition identification method. They were able to classify three categories of facemask-wearing conditions. The categories are correct facemask-wearing, incorrect facemask-wearing, and no facemask-wearing. The proposed mothed has achieved 98.70% accuracy in the face detection phase. Sabbir et al [@b0050], have applied the Principal Component Analysis (PCA) on masked and unmasked face recognition to recognize the person. They found that the accuracy of face resonation using the PCA is extremity affected by wearing masks. The recognition accuracy drops to less than 70% when the recognized face is masked. Also, PCA was used in [@b0055]. The authors proposed a method that is used for removing glasses from a human frontal facial image. The removed part was reconstructed using recursive error compensation using PCA reconstruction.

In [@b0060], the authors used the YOLOv3 algorithm for face detection. YOLOv3 uses Darknet-53 as the backbone. The proposed method achieved 93.9% accuracy. It was trained on CelebA and WIDER FACE dataset including more than 600,000 images. The testing was the FDDB dataset. Nizam et al [@b0065] proposed a novel GAN-based network that can automatically remove masks covering the face area and regenerate the image by building the missing hole. The output of the proposed model is a complete face image that looks natural and realistic.

In [@b0070], the authors presented a system for detecting the presence or absence of a compulsory medical mask in the operating room. The overall objective is to minimize the false positive face detections as possible without missing mask detections in order to trigger alarms only for medical staff who do not wear a surgical mask. The proposed system archived 95% accuracy.

Muhammad et al [@b0075] presented an interactive method called MRGAN. The method depends on getting the microphone area from the user and using the Generative Adversarial Network to rebuild this area. Shaik et al [@b0080] used deep learning real-time face emotion classification and recognition. They used VGG-16 to classify seven facial expressions. The proposed model was trained on the KDEF dataset and achieved 88% accuracy.

3. Datasets characteristics {#s0015}
===========================

This research conducted its experiments on three original datasets. The first dataset is Real-World Masked Face Dataset (RMFD) [@b0085]. The author of RMFD created one of the biggest masked face datasets used in this research. The RMFD dataset consists of 5000 masked faces and 90,000 unmasked faces. [Fig. 1](#f0005){ref-type="fig"} illustrates samples of faces with and without masks. In this research, 5000 images for faces with masks and without masks have been used with a total of 10,000 images to balance the dataset. The RMFD dataset used for the training, validation, and testing phases.Fig. 1RMFD dataset images samples.

The second dataset is a Simulated Masked Face Dataset (SMFD) [@b0090]. The SMFD dataset consists of 1570 images, 785 for simulated masked faces, 785 for unmasked faces. Examples for images of the SMFD are presented in [Fig. 2](#f0010){ref-type="fig"} . The SMFD dataset used for the training, validation, and testing phases.Fig. 2SMFD dataset images samples.

The Third dataset used in this research is the Labeled Faces in the Wild (LFW) [@b0095]. It is a simulated masked face dataset that contains 13,000 masked faces for celebrities around the round. [Fig. 3](#f0015){ref-type="fig"} illustrates samples of LFW images. The LFW dataset used for the testing phase only as a benchmark testing dataset which the proposed model never trained on it.Fig. 3LFW dataset images samples.

4. The proposed model {#s0020}
=====================

The introduced model includes two main components, the first component is deep transferring learning (ResNet50) as feature extractor and the second component is a classical machine learning like decision trees, SVM, and ensemble. According to [@b0100], [@b0105], ResNet-50 has achieved better results when it is used as a feature extractor. [Fig. 4](#f0020){ref-type="fig"} illustrates the proposed classical transfer learning model. Mainly, the ResNet50 used for the feature extraction phase while the traditional machine learning model used in the training, validation, and testing phase.Fig. 4The proposed deep transfer learning model.

A residual neural network (ResNet) is a kind of deep transfer learning based on residual learning [@b0110]. All types of ResNet-101, ResNet-50, and ResNet-18 are versions of ResNet to get rid of the problem of vanishing gradients that have their specific residual block. ResNet-50 with 50-layers are deep, start with a convolution layer, and end with a fully-connected layer, and in between followed by 16 residual bottleneck blocks each block has three layers of convolution layer as shown in [Fig. 5](#f0025){ref-type="fig"} .Fig. 5Proposed ResNet-50 as the feature extractor.

In classification, the last layer in ResNet-50 was removed and replaced with three traditional machine learning classifiers (Support vector machine (SVM), decision tree, and ensemble) to improve our model performance. The main contribution of this research is to construct SVM, decision trees, and ensemble that do not overfit the training process.

4.1. Support vector Machine {#s0025}
---------------------------

One of the most popular and spectacular supervised learning techniques with related learning algorithms for treatment classification and regression tasks in patterns is SVM. SVM is a classification machine learning algorithm based on hinge function as shown in Eq. [(1)](#e0005){ref-type="disp-formula"}, where z is a label from 0 to 1, $w.I - b$ is the output, w and b are coefficients of linear classification, and I is an input vector. The loss function to be minimized can be implemented in Eq. [(2)](#e0010){ref-type="disp-formula"} [@b0115], [@b0120].$$h_{j} = max{({0,1} - z_{j}\left( {w.I_{j} - b} \right))}$$ $$loss = \frac{1}{n}\sum\limits_{i = 1}^{n}max(0,h_{i})$$

4.2. Decision tree {#s0030}
------------------

The decision tree is the classification model of computation based on entropy function and information gain. Entropy computes the amount of uncertainty in data as shown in Eq. [(3)](#e0015){ref-type="disp-formula"}. Where D is current data, and q is a binary label from 0 to 1, and p(x) is the proportion of q label. To measure the difference of entropy from data, we calculate information gain (I) as illustrated in eq. [(4)](#e0020){ref-type="disp-formula"}. Where v is a subset of data [@b0125], [@b0130].$$E{(D)} = \sum\limits_{i = 1}^{m} - p\left( q_{i} \right).log{(p\left( q_{i} \right))}$$ $$I = E\left( D \right) - \sum_{v \in D}p\left( v \right)E\left( v \right)$$

4.3. Ensemble methods {#s0035}
---------------------

Ensemble methods are algorithms of machine learning that create a collection of classifiers. An ensemble of classifiers is a collection of classifiers whose individual decisions (usually by weighted or unweighted voting) are merged in one way or another to identify new instances [@b0135]. The used Ensemble methods are K-Nearest Neighbors Algorithm (k-NN) [@b0140], Linear Regression [@b0145] and Logistic Regression [@b0150]. The steps of the ensemble method are: 1) generate M classifiers 2) Train each classifier alone 3) merge the M classifiers and average their output. We improve our ensemble by using complex weight (α) to get better results as illustrated in Eq. [(5)](#e0025){ref-type="disp-formula"} [@b0155].$$\overline{z} = \sum\limits_{i = 1}^{M}\alpha_{i}z_{i}$$

5. Experimental results {#s0040}
=======================

All the experimental trials have been conducted on a computer sever equipped by an Intel Xeon processor (2 GHz), 96 GB of RAM. The MATLAB software package was selected in this research for the development and implementation of the different experimental trails. The experiments trails include the following specifications and setup:•Three classifiers (Decision trees, SVM, and Ensemble).•Three datasets:--A dataset of RMFD with real face masks for (training, and testing phases), will be referred to DS1.--A dataset of SMFD with fake face masks for (training, and testing phases), will be referred to DS2.--A combined dataset from DS1, and DS2 for (training, and testing phases), will be referred to DS3.--A dataset of LFW with simulated face masks for (testing), will be referred to DS4.•Datasets for the (training, and testing) are split up to (70% for training, 10% for validation, 20% for testing phase)

To evaluate the performance of the different classifiers, performance matrices are needed to be investigated through this research. The most common performance measures to be calculated are Accuracy, Precision, Recall, and F1 Score [@b0160], and they are presented from Eqs. [(6)](#e0030){ref-type="disp-formula"}, [(7)](#e0035){ref-type="disp-formula"}, [(8)](#e0040){ref-type="disp-formula"}, [(9)](#e0045){ref-type="disp-formula"}.$$Accuracy = \frac{TP + TN}{\left( {TP + FP} \right) + \left( {TN + FN} \right)}$$ $$Precision = \frac{TP}{(TP + FP)}$$ $$Recall = \frac{TP}{(TP + FN)}$$ $$F1Score = 2 \ast \frac{Precision \ast Recall}{(Precision + Recall)}$$

where TP is the count of True Positive samples, TN is the count of True Negative samples, FP is the count of False Positive samples, and FN is the count of False Negative samples from a confusion matrix. The authors of this research build their deep transfer learning based on [@b0165], [@b0170], [@b0175], [@b0180], [@b0185], [@b0190] to improve image classification accuracy, but the classification accuracy wasn\'t acceptable. The experimental results will be presented in five subsections, and the first subsection will discuss the achieved results for the decision trees classifier while the second subsection will introduce the results for the SVM classifier. Subsection number three will present the obtained results for the ensemble classifier. Subsection four will illustrate the confusion matrices for the different classifiers. Finally, the fifth subsection will illustrate a comparative results analysis with related works according to the testing accuracy.

5.1. Validation, testing accuracy, and performance metrics for decision trees classifier {#s0045}
----------------------------------------------------------------------------------------

As mentioned earlier in the experimental setup, three datasets (DS1, DS2, and DS3) will be experimented on for training, validation and testing. The DS4 will be used for testing only. [Fig. 6](#f0030){ref-type="fig"} illustrates the achieved results for the decision trees classifier in the validation phase for the different datasets.Fig. 6Decision trees classifier validation accuracy with performance metrics for the different datasets.

For the DS1, the decision trees classifier achieved a validation accuracy with performance metrics ranging from 92% to 94%. The DS1 contains real masks with different poses for face and different masks types. Moreover, the decision trees classifier in DS2 achieved a percentage of 96% for the validation accuracy with performance metrics. The DS2 contains fake masks over real faces images. In DS3, the decision trees classifier achieved a percentage of 98% for the validation accuracy with performance metrics. DS3 is a combined dataset from DS1 and DS2. DS3 is a large dataset in terms of the number of images which help in achieving better accuracies, and more data means better accuracies in machine learning [@b0195]. Although the time is relative from machine to another machine, it is a good indicator to measure the performance of the classifier [@b0200]. [Fig. 7](#f0035){ref-type="fig"} illustrates the time consumed by the decision trees classifier for the training process for the different datasets.Fig. 7Consumed time for the training process for the decision trees classifier for different datasets.

The consumed time is relative to the dataset size and machine capabilities. The dataset\'s number of images is illustrated in the dataset characteristics section. To evaluate the performance of the decision trees classifier, different testing strategies has been tested through this research and they are summarized as follow:•Training over DS1, and testing over DS1, DS2, DS3, and DS4.•Training over DS2, and testing over DS1, DS2, DS3, and DS4.•Training over DS3, and testing over DS1, DS2, DS3, and DS4.

[Fig. 8](#f0040){ref-type="fig"} illustrates the achieved percentage for the testing accuracy and performance metrics for the different testing strategies for the decision trees classifier.Fig. 8Testing accuracy with performance metrics for the decision trees classifier with different testing strategies.

[Fig. 8](#f0040){ref-type="fig"} shows exciting results, and they are (1) on the training over DS1, the decision trees classifier wasn't able to achieve a good classification accuracy 68% in DS2, as DS2 contains a lot of variation of fake masks. That's also will reflect in the DS3 which is a combined dataset from DS1, and DS2. (2) on the training over DS2, the decision trees classifier was able to achieve 93% for DS1, which contains real masks. (3) on the training over DS3, the decision trees classifier achieved the highest accuracy with performance metrics in all datasets. All the achieved results are above 95%. (4) on the DS4 which is used only for testing and never been trained on it, the decision trees classifier achieved a competitive accuracy with 99% whatever the training is performed over DS1, DS2 or DS3.

From this subsection, we conclude that the decision trees classifier achieved the highest accuracy possible when the training is performed over the DS3. The highest testing accuracy for DS1, DS2, DS3, and DS4 was 96.78%, 95.64%, 96.5%, and 99.89% respectively.

5.2. Validation, testing accuracy, and performance metrics for decision SVM classifier {#s0050}
--------------------------------------------------------------------------------------

The same experimental trials which were conducted using decision trees classifiers will be performed on the SVM classifier. [Fig. 9](#f0045){ref-type="fig"} presents the validation accuracy and performance metrics for the SVM classifier for the different datasets.Fig. 9SVM classifier validation accuracy with performance metrics for the different datasets.

[Fig. 9](#f0045){ref-type="fig"} shows that the SVM classifier achieved a higher validation accuracy for all datasets than the decision trees classifier. In DS1, SVM achieved 98% while decision trees achieved 93% in the validation accuracy. In DS2, the SVM classifier achieved 100% while decision trees achieved 96%. In DS3, SVM achieved 99% while decision trees achieved 98%. The SVM classifier surpasses the validation accuracy along with performance metrics than the decision trees classifier. One more notable remark, training over the DS2 achieved the highest validation accuracy possible with 100% accuracy while in the decision trees classifier the highest validation accuracy was 98% in DS3.

The consumed time also is an essential factor in evaluating the performance of the classifier, and [Fig. 10](#f0050){ref-type="fig"} illustrated the wasted time for the SVM classifier for the different datasets.Fig. 10Consumed time for the training process for the SVM classifier for the different datasets.

Using the SVM classifier, the more the data exists, the more time the classifier will consume time, DS3 contains the largest number of images among the introduced datasets, so the DS3 consumes more time in the training process. A notable remark that the consumed time for the SVM classifier is less than the decision trees classifier for all the datasets. In the DS1, The SVM classifier consumed less time than decision trees classifier by 0.29 s (improvement by 59%). While in the DS2, The SVM classifier consumed less time than the decision trees classifier by 0.06 s (improvement by 68%). In the DS3, The SVM classifier consumed less time than the decision trees classifier by 0.06 s (improvement by 57%).

[Fig. 11](#f0055){ref-type="fig"} illustrates the achieved percentage for the testing accuracy and performance metrics of the SVM classifier for the different testing strategies which were introduced in the decision trees classifier section.Fig. 11Testing accuracy with performance metrics for the SVM classifier with different testing strategies.

[Fig. 11](#f0055){ref-type="fig"} shows acceptable results and they are (1) the behavior of the SVM classifier is similar to the decision trees classifier but the SVM classifier achieves a higher testing accuracy. On the training over DS1, the SVM classifier, achieved 82% over DS2 in the testing accuracy while decision trees classifier achieved 68%. On the training over DS2, the SVM classifier, achieves higher accuracies over 97% for all datasets, while the decision trees classifier achieved accuracies over 93%. The same pattern happens for the training over DS3, the SVM classifier, achieved higher accuracies over 98% for all datasets, while the decision trees classifier achieved accuracies over 95%. (2) on the DS4 which is used only for testing and never been trained on, the SVM classifier achieved a higher accuracy with 99% whatever the training is performed over DS1, DS2 or DS3.

From this subsection, we conclude according to the achieved results that the SVM classifier is better than decision trees classifier in terms of validation, testing accuracy, performance metrics, and consumed time. The highest testing accuracy for DS1 was achieved by training over DS3 with 99.4%. For DS2, the highest accuracy was achieved by training over DS2 with 99.49%. In DS3, the highest accuracy was achieved by training over DS3 with 99.19%, and for DS4, the highest testing accuracy was achieved by training over DS3 with 100%.

5.3. Validation, testing accuracy, and performance metrics for the ensemble classifier {#s0055}
--------------------------------------------------------------------------------------

The same experimental trials which were conducted on decision trees and SVM classifier will be performed on the ensemble classifier. [Fig. 12](#f0060){ref-type="fig"} presents the validation accuracy and performance metrics for the ensemble classifier for the different datasets.Fig. 12Ensemble classifier validation accuracy with performance metrics for the different datasets.

[Fig. 12](#f0060){ref-type="fig"} illustrated that the ensemble classifier achieves the highest accuracy when there are more data exist for the training. The ensemble classifier achieved 100% in the testing accuracy for DS3. It outperformed the decision trees and the SVM classifier. While in DS2, The SVM achieved the highest validation accuracy, with 100%, the ensemble classifier achieved 94%. In DS1, The SVM achieved the highest validation accuracy, with 98% percent, while the ensemble classifier achieved 97%.

[Fig. 13](#f0065){ref-type="fig"} presents the consumed time for the training process for the ensemble classifier. [Fig. 7](#f0035){ref-type="fig"} shows clearly that the ensemble wasted more time than the decision trees and the SVM classifier. The consumed time for the training of DS3 is 29.2 s while for the SVM, and the decision trees classifier were 0.33, and 0.79 s. From the achieved results, we can conclude that the ensemble classifier performance according to consumed time is not competitive at all. This is due to the nature of the ensemble classifier to try all possible classifiers that achieve the highest accuracy, which by definition takes a long time if it is compared to the other classifiers.Fig. 13Consumed time for the training process for the ensemble classifier for the different datasets.

[Fig. 14](#f0070){ref-type="fig"} illustrates the achieved percentage for the testing accuracy and performance metrics of the ensemble classifier for the different testing strategies which were introduced in the decision trees classifier section.Fig. 14Testing accuracy with performance metrics for the ensemble classifier with different testing strategies.

Relevant results appear in [Fig. 14](#f0070){ref-type="fig"}, and they are (1) on the training over DS1, the ensemble classifier outperformed the SVM classifier, it achieved 99.64%, 88.21%, 95.93, and 99.95% for DS1, DS2, DS3, and DS4 respectively. While the SVM classifier achieved 99.28%, 82.56%, 93.97%, and 99.92% for DS1, DS2, DS3 and DS4 accordingly. (2) on the training over DS2, the SVM classifier achieved higher testing accuracy than the ensemble classifier. (3) on the training over DS3, the ensemble classifier outperformed the SVM classifier, it achieved 99.28%, 99.49%, 99.35%, and 100% for DS1, DS2, DS3, and DS4 respectively. While the SVM classifier achieved 99.27%, 98.72%, 99.19%, and 100% for DS1, DS2, DS3 and DS4 respectively. (4) on the DS4 which is used only for testing and never been trained on, the ensemble classifier achieved a higher accuracy over 99% whatever the training is performed over DS1, DS2 or DS3. The ensemble classifier outperformed the SVM classifier in terms of testing accuracy in all training strategies.

From this subsection, we conclude according to the achieved results that the ensemble classifier is better than decision trees, and SVM classifier in terms of validation, testing accuracy, performance metrics when the training is over DS1, and DS3. While, when the training is over DS2, the SVM classifier outperforms the other classifiers. Moreover, in terms of the consumed time for the training, the SVM classifier is the least consumption of time.

5.4. Confusion matrix and class accuracy for the SVM and ensemble classifier {#s0060}
----------------------------------------------------------------------------

Confusion matrices are another useful insight into the performance of the classifiers. Training over combined datasets (DS3) is the most appropriate choice to achieve the highest accuracy possible for the different classifiers. As for decision trees, the confusion matrices are not included in this section as it reached the least testing accuracy. [Fig. 15](#f0075){ref-type="fig"} illustrates the confusion matrices for the SVM classifier in the testing phase for DS1, DS2, and DS3 when the training is over DS3.Fig. 15Confusion matrix of testing accuracy for (a) DS1, (b) DS2, and (c) DS3 for the SVM classifier over the training of DS3.

The achieved testing accuracy for DS1 is 99.4%, for DS2 is 98.7%, and DS3 is 99.2%. [Fig. 16](#f0080){ref-type="fig"} illustrates the confusion matrices for the ensemble classifier in the testing phase for DS1, DS2, and DS3 when the training is over DS3.Fig. 16Confusion matrix of the testing accuracy for (a) DS1, (b) DS2, and (c) DS3 for the ensemble classifier over the training of DS3.

The achieved testing accuracy for DS1 is 99.3%, for DS2 is 99.5%, and DS3 is 99.3%. The confusion matrix for DS4 for both SVM and ensemble classifier is the same with 100% testing accuracy. The research decision, according to achieved results which were very close to each other between the SVM, and the ensemble classifier, is to select the SVM classifier for the following reasons:•All testing accuracy results for training over DS3 is very close only, 0.01% difference for DS3 between the SVM, and the ensemble classifier.•In the testing accuracy for DS4, over the training of DS3, the SVM classifier achieved 100% the same result as for the ensemble classifier.•The SVM classifier consumes less time in training as a performance indicator.

5.5. Comparison with related works {#s0065}
----------------------------------

The work presented in [@b0085] used the same datasets, which include the real masked dataset RMFD (DS1) and the fake masked dataset LFW (DS4). The authors of [@b0085] achieved a testing accuracy ranging from 50% to 95%. In the presented work, the testing accuracy for DS1 ranging from 93.44% using the decision tree classifier and 99.64% using the ensemble classifier. For DS4, the testing accuracy ranging from 99.76% using the decision tree classifier and 100% using the SVM classifier.

For the fake masked dataset SMFD (DS2), there is no reported accuracy according to the author of the dataset (<https://github.com/prajnasb/observations>). In this work, we report an accuracy ranging from 94.54% using the decision tree classifier, and 99.49% using the SVM classifier.

For the combined masked dataset (DS3), there is no reported accuracy according to related works as we present it through this work, we report an accuracy ranging from 96.50% using the decision tree classifier, and 99.35% using the SVM classifier. As a future study, we plan to approach the masked face from a neutrosophic environment with deep transfer learning models.

6. Conclusion and future works {#s0070}
==============================

The coronavirus COVID-19 pandemic is causing a global health crisis. Governments all over the world are struggling to stand against this type of virus. The protection from infection caused by COVID-19 is a necessary countermeasure, according to the World Health Organization (WHO). In this paper, a hybrid model using deep and classical machine learning for face mask detection was presented. The proposed model consisted of two parts. The first part was for the feature extraction using Resnet50. Resnet50 is one of the popular models in deep transfer learning. While the second part was for the detection process of face masks using classical machine learning algorithms. The Support Vector Machine (SVM), decision trees, and ensemble algorithms were selected as traditional machine learning for investigation.

Three datasets had experimented on, and different training and testing strategies had adopted through this research. The plans include training on a specific dataset while testing over other datasets to prove the efficiency of the proposed model. The presented works concluded that The SVM classifier achieved the highest accuracy possible with the least time consumed in the training process. The SVM classifier in RMFD achieved 99.64% testing accuracy. In SMFD, it gained 99.49%, while in LFW, it reached 100% testing accuracy. A comparative result had carried out with related works. The proposed model super passed the associated works in terms of testing accuracy. The major drawback is not tray most of classical machine learning methods to get lowest consume time and highest accuracy. One of the possible future tasks is to use deeper transfer learning models for feature extraction and use the neutrosophic domain as it shows promising potential in the classification and detection problems.

Funding {#s0075}
=======

This research received no external funding.

Ethical approval {#ce.section_xvn_lj3_nmb}
================

This article does not contain any studies with human participants or animals performed by any of the authors.

Declaration of Competing Interest
=================================

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
