Professional Documents
Culture Documents
Face Mask Detection by Using Convolutional Neural Network 2
Face Mask Detection by Using Convolutional Neural Network 2
Master (Thesis)
First Seminar
Face Mask Detection By using
Convolutional Neural Network
Introduction
Abstract
Objectives
Related Work
Background Theory
System Architecture
Conclusion
References
3
Introduction
So the helpful and safe-keeping method is wearing a face mask in all areas where
people are gathered.
Wearing a face mask for infection protection has become a new normal.
But most of the people are not wearing face masks in public places so the spread of
viruses is increasing.
4
Abstract
Face recognition and object detection are the popular research work.
The proposed system is designed to classify people who is wearing face masks or not.
The model is constructed and trained with face mask dataset that contain two categories
with_mask and without_mask.
Face images are trained with CNN to detect the mask region on faces and then testing is
applied.
If a person is wearing a mask, the mask region is displayed with a green anchor box.
If a person is not wearing a mask, the mouth region is displayed with a red anchor box.
The proposed system will evaluates the accuracy and performance of VGG16, a
convolutional neural network (CNN).
5
Objectives
To automate the process of identifying the people who are not wearing mask
6
Related work I
This paper accomplished identifying people who are not wearing masks provides a
better recognition rate in the Principal Component Analysis.
Authors were able to find that extracting features from people wearing face masks is
lesser than people who are not wearing face masks.
They also found that accuracy has much decreased after classifying people wearing a
face mask, which gave an accuracy of 70% .
7
Related work II
"A real-time facemask recognition using deep learning methods and Convolutional
Neural Networks(CNN)”,Sammy V. Militante and Nanette V. Dionisio
The authors’ study presents defined and rapid results for facemask detection.
The study was about distinguishing between people wearing a facemask and people
who are not wearing a facemask.
Authors were able to use the CNN model to train their model, which helped them to
achieve 80% result as performance accuracy.
8
Dataset for Training and Testing
Face mask detection dataset have been used "Kaggle’s Medical Face Mask Dataset.
Dataset consists of 7553 RGB image in two folders as (with mask and without mask).
9
Background Theory
Convolutional layer
Pooling layer
CNN is trained on a real world dataset and can be tested with live video streaming
with a good accuracy.
10
Background Theory
Classification Pipeline
Dataset
Split Dataset
Data Feature Evalute
Training/
preprocessing Extraction
Classification Classifier
Testing
CNN
11
Background Theory
Mask
No Mask
input image
Feature Extraction
12
Convolutional layer
• It contains a set of convolutional kernels which gets convolved with the input
image (N-dimensional metrics) to generate an output feature map.
13
Pooling layer
The main purpose of pooling is to reduce the size of the input image.
Use to discard some unimportant information which can help to reduce the calculation
by some parameter.
There are different types of pooling techniques.
Maximum pooling is used because maximum pooling is more effective in accuracy.
The last layer of Fully-Connected layers is used as the output layer (classifier) of the CNN
architecture.
The FC layers take input from the final convolutional or pooling layer.
It is in the form of a set of metrics (feature maps) and those metrics are flattened to create a
vector.
This vector is then fed into the FC layer to generate the final output of CNN.
Mask
Feature maps
No mask
Testing
Load face
Training image
Load face
image
Data preprocessing
Data preprocessing
VGG 16 Classification
classifer
training model Yes If No
wearing
Mask
Display mask Display mouth
region with region with
green box red box
End 16
Data preprocessing
The total number of images in the dataset is virtualized in both categories_ 'with mask'
and 'without mask'.
For both datasets, the images are resized into a fixed size of 224x224 RGB image.
Resized images are easier for the model to deal with since they are in the same
dimensions.
17
VGG 16
It is one of the popular algorithms for image classification and is easy to use with transfer
learning.
18
VGG 16
The Kernel size is 3x3 and the pool size is 2x2 for all the layers.
The input to the VGG 16 model is 224x224x3 pixels images.
The first and second convolutional layers are made up of 64 feature kernel filters with a
filter size of 3x3.
The dimensions of the input change to 224x224x64 as it passes through the first and
second convolutional layers.
The output is then sent to the max pooling layer with a stride of 2.
The third and fourth convolutional layers are made up of 128 feature kernel filters with a
filter size of 3x3.
19
VGG 16
Following these two layers is a max pooling layer with stride 2, and the resultant
output is 56x56x128.
Fifth, sixth, and seventh levels make use of 256 feature maps.
Eighth to thirteenth are two groups of convolutional layers with kernel size 3x3.
All of these convolutional layer sets contain 512 kernel filters. Following these
layers is a max pooling layer with a stride of 1.
Fourteen and fifteen levels are completely linked hidden layers of 4096 units,
followed by a SoftMax output layer (sixteenth layer) of 1000 units.
20
Model Performance Evaluation
The evalution method can examine true positive, true negative ,false positive and false
negative.
The confusion matrix can be used to analyze the potential of a classifier. A confusion matrix
generates actual values and predicted values after the classification process. The confusion
matrix table as in Table.
Predicted class
Actual Class
Positive Negative
True Positive (TP): When the actual label is 1, and the classifier also predicted the label to be 1
False Positive (FP): When the actual label is 0, but the classifier falsely predicted it to be 1
True Negative (TN): When the actual label is 1, and classifier also predicted as 0
False Negative (FN): When the actual label is 0, but the classifier predicted the label to be 0
21
Model Performance Evaluation
Accuracy is one of the most widely used evaluation metrics for recognition and classification
problems. It represents the ratio between the correct number of predictions and the total number
of samples, which can be defined as follows:
Accuracy = (TP + TN)/(TP + TN + FP + FN)
Precision is a positive prediction number that shows how correct the system is. The following is a
mathematical equation to consider:
Precision = TP/(FP + TP)
Recall is also referred to as sensitivity, and it indicates how many confident instances the model
properly identifies. A mathematical expression is as follows:
Recall = TP/(FN+TP) 22
Conclusion
Face mask detection is becoming more and more importance over the past year due to
the spread of the COVID-19 virus.
The proposed system aims to classify face mask wearing or not for COVID-19
precaution.
This system can be applied in many crowded areas like metro stations, markets,
schools, railway stations and so on to monitor the crowd and to ensure that everyone is
wearing mask.
The input images should have only face regions and the primary intention is to detect
mask region.
The proposed technique can be integrated into any high-resolution video surveillance
devices and not limited to mask detection only.
23
Thesis Time Schedule
Second Seminar
Pre-Seminar
Third Seminar
24
References
Face Mask Detection System using Mobilenetv2, Mayank Arora, Sarthak Garg, Srivani A,2021
Implementation of Principal Component Analysis on masked and non-masked face
Recognition,Ejaz Md. S., Islam Md. R., Sifatullah M., Sarker,2019.
A real time face mask detection system using convolutional neural network, Hiten Goyal·
Karanveer Sidana · Charanjeet Singh ·Abhilasha Jain· Swati Jindal,2021.
Fundamental Concepts of Convolutional Neural Network,Anirudha Ghosh, Abu Sufian , Farhana
Sultana, Amlan Chakrabarti, Debashis De,2020.
https://www.kaggle.com/datasets/andrewmvd/face-mask-detection.
Covid-19 Face Mask Detection Using TensorFlow, Keras and OpenCV, Arjya Das , Mohammad
Wasif Ansari, Rohini Basak,2019
W.H.O., “Coronavirus disease 2019 (covid-19): situation report”.
25
Thank You