0% found this document useful (0 votes)
31 views7 pages

Project Final Report Group 9

Uploaded by

amrzaben
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

Project Final Report Group 9

Uploaded by

amrzaben
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Face Mask Detector

1. Introduction
The coronavirus, commonly called COVID-19, has impacted the global community
over the last couple of years. According to information from the World Health
Organization (WHO), there have been millions of confirmed cases of COVID-19, with
a significant number of fatalities.
However, mask face recognition technology has penetrated modern society as a
phenomenon of today’s contemporary daily life. This technology has an essential
function in keeping people alive and healthy. However, the contexts differ from those
of 2020 in general and local settings. More importantly, contemporary research explores
the development of mask detection models starting with specific conditions where
CCTV monitoring guarantees adherence to mandatory wearing. Nonetheless, this
approach compromises dynamic changes yet acknowledges targeted preventative
measures.
This project focuses on developing a mask face detection system utilizing multiple
classifiers within a Convolutional Neural Network (CNN). In terms of security
applications, mask face detection exhibits faster processing than alternative security
systems, allowing for simultaneous analysis or detection of multiple faces. Employing
CNN enhances accuracy in identifying masked faces within a specific area. Compared
to other approaches, the system's quickness is made possible by its quick response to
detect faces entering the webcam area.

2. Problem Definition and Algorithm


2.1 Task Definition
It is an exciting task to develop a mask detection algorithm using Convolutional Neural
Network (CNN) because it will directly affect public health. When it comes to global
health emergencies in the form of pandemics, ensuring that protocols for mask-wearing
are monitored and enforced is critically necessary to prevent infectious diseases from
spreading. The automation through a CNN-based algorithm guarantees the
effectiveness and scalability of operations, which contributes to safety measures. The
algorithm’s efficiency at detecting non-masked persons in different settings, such as
crowded public areas or workplaces, contributes to implementing preventive actions by
organizations. So, mask detection is sufficiently relevant to be used as a case study in
the contemporary relevance of technology for public benefit.
2.2 Algorithm Definition
Our approach to image classification is based on CNNs, which are widely known as the
best for such tasks. The architecture design included three convolutional layers and two
dense layers, aiming to ensure that it was compact to ensure flexibility during its
training process according to available computational resources. The advantages of
CNNs are that they automatically learn hierarchical features and model spatial
dependencies in image data, so we selected these deep-learning models for our
purpose. The ReLU function was applied in convolutional and dense layers to introduce
non-linearity, while the final layer utilized the softmax activation function to assign
probabilities to different classes.
The use of CNNs in this regard is a strategic implementation resulting from their natural
ability to capture features from images, considering the complexities associated with
visual data for adequate classification. The CNN architecture demonstrated that training
efficiency was important by making the most of the computational resources. In
general, the fact that we use CNNs as part of our mentioned image classification
solution indicates their capability to treat features better than other techniques, which
makes them suitable for problems involving tasks concerning more details regarding
visual information.

3. Experimental Evaluation
3.1 Methodology
To objectively evaluate our method, we used a set of essential metrics such as AUC,
accuracy, recall, and precision precisely on the test data to rate its performance
comprehensively. The experiment intended to test the hypothesis that, even though data
augmentation is considered optional for most deep learning algorithms, it can
dramatically improve model performance in a small dataset. The experimental
methodology included preprocessing photos with data augmentation, training the
model, and evaluating its performance on a testing set.
For the experiment, a relatively small dataset was used, with the use of data
augmentation to enhance its size artificially. The training and test data were carefully
chosen to generalize effectively in different instances. 80% of the data was set aside for
training, and 20% was provided in a test, which is standard practice when conducting
machine learning evaluations, ensuring adequate relevant information was used to train.
In contrast, the reserved testing set was an independent measure of the model's
generalization performance.
In addition to the traditional metrics, real-world performance data was collected by
implementing the model with a live webcam to detect whether individuals were wearing
masks. This real-time application assessed the model's performance in a scenario
relevant to its intended use. In the presentation and analysis of results, detailed
consideration was given to each metric, showing the strengths and weaknesses of the
model under discussion. Also, comparisons were drawn between other methods dealing
with similar problems to put the performance of our proposed approach in perspective.
Alongside the 80-20 training split and practical implementation, the selected radical
evaluation framework was built to encompass more than just the model's utility by its
results, providing further opportunities for image classification scholars.
While Support Vector Machines (SVM) have been employed in related papers for face
mask detection, the prevalent advantages of Convolutional Neural Networks (CNNs) in
this context must be considered. SVMs rely on features and require assistance to capture
complex patterns and relationships inside images, particularly in challenging
applications such as face mask recognition. On the other hand, CNN outperforms by
automatically learning hierarchical features, allowing for better adaption to the nuanced
complexity of visual input. However, SVM has been employed in previous research but
the current trend suggests that CNNs are a more practical approach for face mask
recognition, resulting in an efficient model.

3.2 Results
Table 1 Results

Epoch Loss Accuracy Precision Recall AUC


1 0.7235 0.4964 0.4964 0.4964 0.4988

2 0.6779 0.6009 0.6009 0.6009 0.6367

3 0.6493 0.6182 0.6182 0.6182 0.6688


4 0.6157 0.6827 0.6827 0.6827 0.7385
5 0.6124 0.6855 0.6855 0.6855 0.7421

6 0.6033 0.7109 0.7109 0.7109 0.7612

7 0.5789 0.6936 0.6936 0.6936 0.7666

8 0.5098 0.7591 0.7591 0.7591 0.8400


9 0.5059 0.7591 0.7591 0.7591 0.8326

10 0.4781 0.7791 0.7791 0.7791 0.8526

11 0.4662 0.7964 0.7964 0.7964 0.8655


12 0.3925 0.8345 0.8345 0.8345 0.9038
13 0.3821 0.8373 0.8373 0.8373 0.9093
14 0.3567 0.8536 0.8536 0.8536 0.9216
15 0.3418 0.8564 0.8564 0.8564 0.9279

16 0.3729 0.8518 0.8518 0.8518 0.9145

17 0.3267 0.8627 0.8627 0.8627 0.9343

18 0.3179 0.8618 0.8618 0.8618 0.9382


19 0.4084 0.8209 0.8209 0.8209 0.9012

20 0.3647 0.8345 0.8345 0.8345 0.9202

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Loss Accuracy Precision Recall AUC

Figure 1 Performance Evolution


Loss Over Epochs
0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Loss

Figure 2 Loss Over Epochs

3.3 Discussion
As show above in Table 1 and illustrated in Figure 1, precision, recall, and accuracy are
all equal, it means that the model has correctly predicted all instances of both classes
(true positives and true negatives), and there are no false positives or false negatives.
This is an ideal situation, but it is important to know that it is uncommon.
The initial run of the code runs all epochs and keeps record of the model with the highest
accuracy. As show in Table 1 and in the 2 figures above, epoch 17/20 had the best
accuracy, and therefore the model will be saved and ready to run whenever the program
is needed. This model achieved an accuracy, precision and recall of 86.27%, an AUC
of 93.43% and a loss value of 0.3267.
Although our model produced promising results, it is important to highlight the
drawbacks of our model. The most important drawback and the one that needs attention
in future work is that our model can only detect blue masks, as it was only trained on
this type of mask. It needs to be trained on different types and colors of masks despite
the blue medical masks being the most common ones, this is because there now exists
many variations and colors and it would need to detect them all for it to be practical. It
is also important to mention that the model can’t detect masks when they are resting on
the chin, this is an advantage as many people just place the masks on their chin which
is not safe.

4. Related Work
4.1 Face Mask Detection Using Transfer Learning of InceptionV3
[1] addresses the critical challenge of identifying individuals not complying with the
mask-wearing protocols in public spaces, particularly in the context of the COVID-19
pandemic. The authors employed the InceptionV3 deep learning model through transfer
learning. Trained on the Simulated Masked Face Dataset (SMFD), the model benefits
from image enhancement techniques applied to the training data. The achieved accuracy
is remarkable, achieving 99.9% during training and a perfect 100% during testing,
highlighting the solution's efficiency in successfully detecting individuals without
masks. While the results are undoubtedly attractive, this method comes with a high cost
of resources due to the increased number of layers required. Our method will be more
superior as the resources required for it are significantly lower while maintaining a high
value of accuracy at the same time.

4.2 Deep Learning-based Face Mask Detection Using YoloV5


Focusing on the pivotal role of face masks in mitigating the spread of COVID-19 in
public settings, [2] employs the YoloV5 deep learning model. The authors conducted
comprehensive experiments, testing different numbers of training sessions ranging from
20 to 500. The findings reveal that the model trained with 300 epochs achieves optimal
performance, achieving an impressive accuracy of 96.5%. This shows the model's
capability to accurately identify face masks to help in effectively controlling the
transmission of the virus. The high number of epochs, compared to our model which
uses 20, requires high computational power, and that is how our model surpasses this
model while maintaining relatively high accuracy values.

5. Code and Dataset


Code: The code can be found in this repository under the name
FaceMaskDetector.ipynb
Dataset: The dataset is a publicly available dataset and can be found here.
6. Conclusion
In conclusion, our project utilizing Convolutional Neural Networks (CNNs) for
identifying blue masks on faces is an effective solution. With a revised data
augmentation process that fine-tunes the native capabilities of CNNs in automatic
feature extraction, we have witnessed a drastic performance improvement for the model
developed within our dataset. We concentrate on recognizing blue masks, emphasizing
that our CNN-based technique is relevant to real-world scenarios due to its efficacy in
detecting facial masks.

Bibliography
[1] Jignesh Chowdary, G., et al. "Face mask detection using transfer learning of inceptionv3." Big
Data Analytics: 8th International Conference, BDA 2020, Sonepat, India, December 15–18, 2020,
Proceedings 8. Springer International Publishing, 2020.
[2] Ieamsaard, Jirarat, Surapon Nathanael Charoensook, and Suchart Yammen. "Deep learning-
based face mask detection using yolov5." 2021 9th International Electrical Engineering Congress
(iEECON). IEEE, 2021.

You might also like