Real-Time Face Mask Detection

You are on page 1of 11

ACKNOWLEDGEMENT

I am pleased to acknowledge my sincere thanks to Board of Management of


SATHYABAMA for their kind encouragement in doing this project and for completing
it successfully. I am grateful to them.

I convey my thanks to Dr. T.Sasikala M.E., Ph.D., Dean, School of Computing ,


Dr.S.Vigneshwari M.E., Ph.D., and Dr.L.Lakshmanan M.E., Ph.D., Heads of the
Department of Computer Science and Engineering for providing me necessary support
and details at the right time during the progressive reviews.

I would like to express my sincere and deep sense of gratitude to my Project Guide
Dr.S.Gowri for his valuable guidance, suggestions and constant encouragement
paved way for the successful completion of my project work.

I wish to express my thanks to all Teaching and Non-teaching staff members of the
Department of Computer Science and Engineering who were helpful in many ways for the
completion of the project.
TRAINING CERTIFICATE
ABSTRACT

After a rapid spread of Coronavirus (COVID – 19) in Wuhan –China in


December 2019 ,World Health Organization (WHO) confirmed that this
was a dangerous virus that could spread from person to person through
droplets and airborne contaminants. To prevent the spread of
Covid19,people should wear mask during this pandemic. Many new
models are developed utilizing convolutional Neural Network to build a
model as accurately as possible . The method proposed in this project
uses the ResNet model to obtain multiple faces with a single (SSD –
Single Shot Multibox Detector) image using a network (model) and
MobileNetV2 Architecture used as face mask detector. This system
should be used in Real-time applications which require face mask
detection for safety purpose due to the outbreak of Covid-19.
TABLE OF CONTENTS

CHAPTER No. TITLE PAGE No

ABSTRACT
LIST OF FIGURES
LIST OF TABLES
LIST OF ABBREVATIONS

1 INTRODUCTION 11

2. RELATED WORKS 12

3. PROPOSED WORKS 14

A. Dataset Description 14

B. Data Preprocessing 16

C. Training Phase 17

D. Using Proposed model in Real- 19


Time

4. EXPERIMENTAL RESULTS ANALYSIS 20

5 CONCLUSIONS 25

REFERENCES 26

APPENDIX

A.SCREENSHOTS 28
LIST OF FIGURES

Figure No. Figure Name Page No.


1.1 Sample Images from Dataset 15

1.2 Classification of Dataset 15

2 Proposed model Chart 16

3 Runtime Flow Chart 20

3.2 Predicted output without Mask 21

3.3 Predicted Output with Mask 21

3.4 Training Accuracy and Validation 22


Accuracy
3.5 Training Loss and Validation Loss 23

3.6 Graphical Representation of Table 3 24


LIST OF TABLES

Table No. Table Name Page

1 ITERATION OF LOSS AND ACCURACY 18

2 PERFORMANCE REPORT 23

3 COMPARISON BETWEEN DIFFERENT 24


ARCHITECTURES
Introduction :

Corona Virus (COVID19) has caused a great deal of damage


worldwide. At First corona virus identified in WUHAN - CHINA in December
2019, the World Health Organization (WHO) initially declared this disease as
a corona virus outbreak and later declared it an epidemic. [1] Globally, as of
now 15 September 2021, there were 225,680,021 confirmed Cases and
4,644,740 people died due to Covid-19 reported by WHO. The Corona virus
has been transmitted from one person to another in a variety of ways. The
disease spreads to a non-infected person when an infected person coughs or
sneezes at some point. The only way to prevent the spread of corona
infection is to keep the community distance and to wear face masks. But
people do not take this seriously and roam the streets without wearing the
right mask and not following proper safety procedures. Physically, it is difficult
to keep track of a large number of people in public places. It is therefore
important to create a software that can automatically identify people, whether
they are wearing a mask or not wearing a mask. Face detection is a
technology used to detect human faces in digital images over a long period of
time. Using this technology, we can create a model for getting a face mask
detection. In this paper, the face mask detection model has been developed
using ResNet (SSD), OpenCV, Tensorflow, keras and MobileNetV2
architecture. This model is based on SSD (Single shot Multibox detector) and
Resnet-10 architecture as the backbone. We use the Resnet (SSD) model to
identify the face while the MobilenetV2 architecture is used to identify the
object detection which is the mask detection. Here on this paper Resnet
(SSD) [2] and MobileNetV2 models are used in combination to get the
highest accuracy face mask detection model. This Algorithm provides more
accuracy than other face mask detection algorithms like LeNet-5, AlexNet,
YoloV4 etc. The dataset used for this program contains 7553 images which
are provided by Kaggle. This model can also be used in the Realtime
application to monitor peoples in public places. This system should be used
in public places such as school, airport, railway stations etc. By using this
system, it is easy to control people and helps to reduce active cases of
coronavirus. The rest of this paper is structured as follows;The second
section describes the corresponding activities performed similarly to this
paper in the name of Related Works.Section Three describes the
methodology and implementation of this system. In the fourth phase the
experimental results will be shared with the extracted images and the fifth
phase concludes with the conclusion and references.

Related Works :

This section describes the related works which are done previously in
this field. There are many models are used to develop Face mask detection
system. Here the list of some [4][5][6][7][8][9][10][13][14] models which are
discussed below. Author Mohamed LakhdarMokeddem et al. [3]Developed
the face mask detection system using YOLOV4 model, which is similar to
SSD model. Yolov4 is a high precision model and single-stage object
detection algorithm which is proposed in 2020. In this paper, the dataset is
divided into three classes 1.wider face 2.FMD 3.RMFD contains 14409
images. This model gives results of average precision for 416*416 is 83%
and precision equal to 86.29 with input 512*512 and precision equal to 88.82
with input size 608*608 which is less than our proposed model. Author J. R.
V. Jeny et al.[4]Developed a face mask detector using MTCNN model. The
datasets used in this paper contain 1139 images in which 659 images are
with mask and remaining 480 are without mask images, which are trained
and tested. As a result, this model gives F1 score as 0.91 whereas our
proposed model gives 0.99 F1 scores as a result. so our model is slightly
more accurate than this model In this paper [5]The author T. Q. Vinh et al.
used Yolov3 algorithm and haar cascade detector to detect the face. This
algorithm was developed by Joseph Redmon et al. in the year 2018.This
model has proven to be effective in object detection and vehicle detection
systems. The dataset consists of 7000 images provided by MAFA. This
model achieves an accuracy of 90.1 in the training of dataset In this paper
[6]The author Mittal et al. developed a lightweight convolutional neural
network-based model to achieve a comparable accuracy with different
models developed in the past. The author uses the YoloV3 model to train the
dataset. The dataset contains 494,414 sample images. This deep CNN
based mask detection achieved 97.7% accuracy. In this paper [7]The author
J. Ieamsaard et al. developed the face mask detection system using deep
learning model using YoloV5 algorithm. The experimental results for this face
mask detection system obtained from the deep learning models with different
epochs, including 20,50,100,300,500. The dataset used in this model
contains 853 images. Each image has different sizes, its label and bounding
boxes are assembled in the PASCAL VOC format. The deep learning model
for the face mask detection system has good performance with the accuracy
of 96.5% with 300 Epochs. In this paper [8] The Author developed a transfer
learning model to automate the process of detecting the mask in the face of
human beings. The author developed this model using pre-trained deep
learning model. This mask detection system is trained with Simulated
Masked Face Dataset (SMFD). The transfer learning of InceptionV3 model
achieved 99% accuracy in the training phase. In this paper [9] the author
developed a combination of light weight neural network MobilenetV2 and
single shot detector to achieve the balance of resource limitations and better
accuracy. The dataset which is used to train the model consists of 3165
images. This system achieves 91.7% of precision score and 0.91 of recall
values with FPA=28.07. In This paper [10] the author developed a face mask
detection system using ResNet-101 and raspberry bi board. This model
consists of two key components, One is deep transfer learning ResNet-101
as a feature extractor and the second one is a basic machine learning
decision tree. This model is trained using 1570 images and achieves 96.02%
of precision score.
III. PROPOSED WORK

This model is developed using Keras, TensorFlow, ResNet(SSD),


MobilenetV2 and OpenCV. At first to detect the face from the given input we
are using Resnet-10 which is single-shot Multibox detector(SSD) [2]. It is
capable of detecting faces from Real-time video or from any images with high
rate of accuracy. To obtain accurate result pretrained Resnet Caffe models
are used in this system. MobileNetV2 architecture is used to detect the face
and mask from a video stream. It is used to acquire faster and accurate
detection of mask from the video stream. Using MobilenetV2, the base model
has been created to access the imagenet which is pre-trained model to
obtain better results.

A. Dataset Description

Dataset plays an important role in order to get better accuracy in the


proposed model. The dataset used in this model collected from Kaggle
platform. FACE MASK DETECTION DATASET [11] is the name of collected
dataset from Kaggle. This dataset consists of 7553 images in total divided
into 2 categories 1.With mask contains 3725 images 2. Without mask
contains 3828 images. This dataset will undergo preprocessing, training and
testing to acquire a better result.
TABLE III. COMPARISON BETWEEN DIFFERENT ARCHITECTURES

Fig.3.6. Graphical Representation of Table 3

You might also like