0% found this document useful (0 votes)
238 views4 pages

Face Mask Detection

Businessesare constantly overhauling their existing infrastructure and processes to be more efficient, safe, and usable for employees, customers, and the community. With the ongoing pandemic, it's even more important to have advanced applications and services in place to mitigate risk. For public safety and health, authorities are recommending the use of face masks and coverings to control the spread of Coronovirus. The COVID-19 pandemic is devastation to

Uploaded by

Velumani s
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)
238 views4 pages

Face Mask Detection

Businessesare constantly overhauling their existing infrastructure and processes to be more efficient, safe, and usable for employees, customers, and the community. With the ongoing pandemic, it's even more important to have advanced applications and services in place to mitigate risk. For public safety and health, authorities are recommending the use of face masks and coverings to control the spread of Coronovirus. The COVID-19 pandemic is devastation to

Uploaded by

Velumani s
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/ 4

ISSN 2278-3091

Volume 10, No.3, May - June 2021


Justin Ipe Abraham et al., International Journal of Advanced Trends in Computer Science and Engineering, 10(3), May - June 2021, 1520 – 1523
International Journal of Advanced Trends in Computer Science and Engineering
Available Online at http://www.warse.org/IJATCSE/static/pdf/file/ijatcse051032021.pdf
https://doi.org/10.30534/ijatcse/2021/051032021

Face Mask Detection


Justin Ipe Abraham , Celia Mary Augusty2, Gayathri Devi S3, Greeshma Gopan4, Greeshma Sabu5, Libin M Joseph6
1
1
PG Student,Department of Computer Applications-,Saintgits College of Engineering(Autonomous) Pathamuttom Kottayam
Kerala,India, justinabraham36@gmail.com
2
PG Student,Department of Computer Applications-,Saintgits College of Engineering(Autonomous) Pathamuttom Kottayam
Kerala,India, celiamaryaugusty1998@gmail.com
3
PG Student,Department of Computer Applications-,Saintgits College of Engineering(Autonomous) Pathamuttom Kottayam
Kerala,India, gayathridevineduvelil@gmail.com
4
PG Student,Department of Computer Applications-,Saintgits College of Engineering(Autonomous) Pathamuttom Kottayam
Kerala,India,greeshmagopan27@gmail.com
5
PG Student,Department of Computer Applications-,Saintgits College of Engineering(Autonomous) Pathamuttom Kottayam
Kerala,India, igreeshmasabu@gmail.com
6
Assistant Professor,Department of Computer Applications-,Saintgits College of Engineering(Autonomous) Pathamuttom
Kottayam Kerala,India, libin.mj@saintgits.org

 mandatory for everyone but as the day progresses scientists


ABSTRACT and doctors have recommended everyone to wear a face mask.
Businesses are constantly overhauling their existing
infrastructure and processes to be more efficient, safe, and Now to detect whether a person is wearing a face mask or not,
usable for employees, customers, and the community. With we will use a face mask detection technique Wearing a face
the ongoing pandemic, it's even more important to have mask will help prevent the spread of infection and prevent the
advanced applications and services in place to mitigate risk. individual from contracting any airborne infectious germs.
For public safety and health, authorities are recommending When someone coughs, talks sneezes they could release
the use of face masks and coverings to control the spread of germs into the air that may infect others nearby. Face masks
Coronovirus. The COVID-19 pandemic is devastation to the are part of an infection control strategy to eliminate
mankind irrespective of caste, creed, gender, and religion. cross-contamination. The trend of wearing face masks in
Using a face mask can undoubtedly help in managing the public is rising due to the COVID-19 coronavirus epidemic
spread of the virus. COVID-19 face mask detector uses deep all over the world. Before Covid19, People used to wear
learning techniques to successfully test whether a person is masks to protect their health from air pollution. While other
wearing a face mask or not. Using a deep learning method people are self-conscious about their looks, they hide their
called Convolutional Neural Network, got an accuracy of 98.6 emotions from the public by hiding their faces. Scientists
%. It can work with still images and also works with a live proofed that wearing face masks works on impeding
video stream. Cases in which the mask is improperly worn are COVID-19 transmission we introduce a face mask detection
when the nose and mouth are partially covered is considered model that is based on deep learning and convolution neural
as the mask is not worn. Our face mask identifier is the least networks.
complex in structure and gives quick results and hence can be
used in CCTV footage to detect whether a person is wearing a 2. LITERATURE SURVEY
mask perfectly so that he does not pose any danger to others. Sammy V. Militante and Nanette V. Dionisio [1] proposed
Mass screening is possible and hence can be used in crowded the project “Real-Time Facemask Recognition with Alarm
places like railway stations, bus stops, markets, streets, mall System using Deep Learning”.
entrances, schools, colleges, etc. By monitoring the In this research study, deep learning techniques are applied to
placement of the face mask on the face, we can make sure that construct a classifier that will collect images of a person
an individual wears it the right way and helps to curb the wearing a face mask and not from the database and
scope of the virus. differentiate between these classes of facemask-wearing and
not facemask-wearing. The artificial neural network has been
Key words : Coronovirus, COVID-19,face mask detector, demonstrated to be a vigorous procedure for feature extraction
Convolutional Neural Networks from unprocessed data. This study proposes the use of a
convolutional neural network to design the facemask
1. INTRODUCTION classifier and to include the effect of the number of the
The world is fighting the Covid-19 pandemic. There is so convolutional neural layer on the prediction accuracy. This
much essential equipment to fight against Coronavirus. One project is implemented in a Raspberry Pi using OpenCV,
of the most essential is Face Mask. Firstly face mask was not TensorFlow, and Python programming language. Raspberry
Pi (RPi) is designed as a Chip System (SoC) where the critical

1520
Justin Ipe Abraham et al., International Journal of Advanced Trends in Computer Science and Engineering, 10(3), May - June 2021, 1520 – 1523

circuits such as the Central Processing Unit( CPU), the performed with the help of a fully convolutional network.
Graphics Processing Unit (GPU), input, and output are This paper with the twin objective of creating a Binary face
carried by a single circuit board. The GPIO pins provide an classifier that can detect faces in any orientation irrespective
essential element to help enable the RPi to be accessible to of alignment and train it in an appropriate neural network to
hardware programming for controlling electronic circuits and get accurate results. The model requires inputting an RGB
data processing on input/output devices. Add a power image of any arbitrary size to the model. The model's basic
adapter, keyboard, mouse, and monitor that works on the function is feature extraction and class prediction. The output
Raspberry Pi in compliance with the HDMI connector. New of the model is a feature vector that is optimized using
models are available to interact via WiFi to the internet. The Gradient descent and the loss function used is Binomial Cross
RPi can be run using the Raspbian operating system. Entropy. a method of obtaining segmentation masks directly
from the images containing one or more faces in different
The first step of the real-time facemask recognition system is orientations. The input image of any arbitrary size is resized
image acquisition. High-quality images of the person posing to 224 × 224 × 3 and fed to the FCN network for feature
with facemask wearing and not wearing facemask are Face extraction and prediction. The output of the network is then
Mask Detection obtained through digital cameras, cellphone subjected to post-processing. Initially, the pixel values of the
cameras, or scanners. A Knowledge-based dataset is created face and background are subjected to global thresholding.
by proper labeling of the captured images with unique classes. After that, it is passed through a median filter to remove the
The obtained images that will be engaged in a preprocessing high-frequency noise and then subjected to a Closing
step are further enhanced specifically for image features operation to fill the gaps in the segmented area. After this
during processing. The segmentation process divides the bounding box is drawn around the segmented area. the model
images into several segments and is utilized in the extraction consists of a total of 17 convolutional layers and 5
of facemask-covered areas in the person's face from the max-pooling layers. The initial image size which is fed to the
background. Feature-Extraction section involves the model is 224×224×3. As the image is processed through the
coevolutionary layers that obtain image features from the layers for feature extraction it's passed through convolutional
resize images and is also joined after each convolution with layers and max-pooling layers. t the gaps in the segmented
the ReLU. Max and average pooling of the feature extraction region are filled and most of the unwanted false erroneous
decreases the size. Ultimately, both the convolutional and the prediction removed. All the experiments have been performed
pooling layers act as purifiers to generate those image on Multi Human Parsing Dataset containing about 5000
characteristics. The final step is to classify images, to train images, each with at least two persons. Out of these, 2500
deep learning models along with the labeled images to be images were used for training and validation while the
trained on how to recognize and classify images according to remaining were used for testing the model. this model has
learned visual patterns. The authors used an open-source also shown great results in recognizing non-frontal faces.
implementation via the TensorFlow module, using Python Along with this, it is also able to detect multiple facial masks
and OpenCV including the VGG-16 CNN model. supervised in a single frame. The post-processing provides a large boost
model of learning, with training and test sets, divided to 80% to pixel-level accuracy. The mean pixel-level accuracy for
for instruction and 20% for research. Three metrics were used facial masks 93.884%.
to measure the model's performance: accuracy, training time,
and learning error. In the conduct of experiments, the input Joshua Gisemba Okemwa Victor Mageto2[3] proposed the
parameters were set equal to 224 according to its input image project "Using CNN and HOG Classifier to Improve Facial
width and height, batch size during training is set to 64 Expression Recognition". Facial expression recognition
images and 100 iterations is set to the number of epochs. (FER) is growing in a large scope due to the diversification of
ADAM optimizer with a learning rate of 0.0001 is set for its field of application. FER is now applicable in crime
optimization. The study applies 12,500 images per class and prevention, smart city development, as well as other economic
this data is enough to train a deep learning model. The 96% sectors like transportation, advertising, and health. Many
validation accuracy was achieved during the training of the feature extraction methods and classification techniques have
CNN model. previously been developed to give better accuracy and
performance in face recognition. A convolution neural
Toshanlal Meenpal, Ashutosh Balakrishnan, and Amit network CNN is an unsupervised deep learning algorithm
Verma [2] proposed the project "Facial Mask Detection using with the ability to learn image characteristics and make
Semantic Segmentation". This paper proposes a model for differentiation of one aspect to another. We applied HOG
face detection using semantic segmentation in an image by classifier for feature extraction and CNN to detect and classify
classifying each pixel as a face and non-face i.e effectively the expressions. Overall we achieved high accuracy and
creating a binary classifier and then detecting that segmented optimization results of 77.2%. This method achieved higher
area. The model works very well not only for images having results than previous work is done using the SVM algorithm
frontal faces but also for non-frontal faces. The paper also and HOG classifier with an accuracy of 55%. The dataset was
focuses on removing the erroneous predictions which are selected for analysis which contained 35887 images. This
bound to occur. Semantic segmentation of the human face is open-source dataset was created by Pierre Luc Carrier and

1521
Justin Ipe Abraham et al., International Journal of Advanced Trends in Computer Science and Engineering, 10(3), May - June 2021, 1520 – 1523

Aaron Courville for the Kaggle competition in 2013. The 5. TEST REPORTS/COMPARISON REPORTS AND
dataset is made up of 48x48 sized grayscale images with 7 ACCURACY
different emotions. The expressions present include anger,
sadness, happiness, surprise, neutral, disgust, and fear. The experimental results of the system performance are
Emotions such as Angry, Disgust, Fear, Happy, Sad, Surprise, evaluated with the following classifiers and optimizer.
and Neutral are given indexes as 0, 1, 2, 3,4, 5, and 6. These Table 1: Results of the proposed system with Haar cascade
images were further classified into two groups; the training classifier:
phase and the testing phase. It was done to verify the
Classifier Filter Optimizer Train Train Test Test
performance and accuracy of our results.
Loss gain Loss gain
3. PROPOSED SYSTEM
The proposed system can be integrated with CCTV cameras
and that data may be administered to see if people are wearing Haar No Filter ADAM 0.2033 0.9960 0.0138 0.9869
masks. When the person appears at the entrance. This person Cascade used
might be wearing a mask or not wearing the mask. The CCTV
camera looks for the faces and detects persons without masks. From the Table 1 it is observed that performance of ADAM
That person will be denied access and he/she could see a optimizer is good in both training and testing.
message appearing on the screen or panel showing some kind Table 2: Results of the proposed system with HaarCascade
of alert message. The access will be denied till he/she wear a classifier and Bilateral filter:
mask. The authorities will be alerted via an email in real-time
if the person is not wearing the mask. Classifier Filter Optimizer Train Train Test Test
Loss gain Loss gain
4. FLOW CHART

Haar Bilateral ADAM 0.0067 0.9875 0.0557 0.9869


Cascade

From the Table 2 it is observed that performance of ADAM


optimizer with Bilateral filter is not good in both training and
testing when compared with ADAM in Haar cascade
classifier
Table 3: Results of the proposed system with Haar cascade
classifier and Gaussian Filter.
Classifier Filter Optimizer Train Train Test Test
Loss gain Loss gain

Haar Gaussia ADAM 0.0214 0.9826 0.0686 0.9743


Cascade n

From the Table 3 it is observed that performance of ADAM


optimizer is good with Gaussian filter.
Result:
From the results of two classifiers it is observed that ADAM
optimizer of Haar cascade classifier performance is very good
.While testing, it is observed that Haar cascade classifier is
yielding the best results with high accuracy.

6. METHODOLOGY

The proposed system uses a transfer learning approach to


performance optimization with a deep learning algorithm and
a computer vision to automatically monitor people in public
places with a camera and to detect people with mask or no
1522
Justin Ipe Abraham et al., International Journal of Advanced Trends in Computer Science and Engineering, 10(3), May - June 2021, 1520 – 1523

mask. We also do fine tuning, which is another form of REFERENCES


transfer learning, more powerful than just the feature
extraction. 1. Martinez, A.M.: Recognizing Imprecisely Localized,
In this process camera video feeds are converted to grayscale Partially Occluded, and Expression Variant Faces from a
to improve speed and accuracy and are send to the model for Single Sample per Class. IEEE Transaction On Pattern
further processing. We employed a convolutional neural Analysis and Machine Intelligence 24(6), 748–763 (2002)
network. The CNN model is a form of neural network that 2. X. Zhu and D. Ramanan, “Face detection, pose
allows us to extract higher representations for image estimation, and landmark localization in the wild,” in
information. Unlike conventional image recognition, which Proceedings of the IEEE Conference on Computer Vision
allows you to define the image features manually, CNN takes and Pattern Recognition (CVPR), pp. 2879–2886,
the raw pixel data from the image, trains the model, and then
Providence, RI, USA, June 2012.
extracts the features for better classification automatically.
CNN uses full pooling to replace output. 3. K. He, X. Zhang, S. Ren et al., “Deep residual learning
for image recognition,” in Proceedings of the IEEE
7. CONCLUSION Conference on Computer Vision and Pattern Recognition
(CVPR), pp. 770–778, Las Vegas, NV, USA, July 2016.
Our work distinguishes face masks from images and live 4. “Face Mask Detection”, Kaggle.com, 2020. [Online].
video streams.This classifier can be used to classify images as Available:https://www.kaggle.com/andrewmvd/face-mask-d
well as live video streams. Faces were extracted from etection. 2020.
photographs and videos after they were identified. Then, our 5. “TensorFlow White Papers”, TensorFlow, 2020. [Online].
face mask classifier was applied to achieve the required Available:https://www.tensorflow.org/about/bib. 2020.
results. The green and red rectangular frame respectively 6. K. Team, “Keras documentation: About Keras”, Keras.io,
2020. [Online]. Available: https://keras.io/about. 2020.
represent the detected face and mask. Our face mask identifier
7. “OpenCV”, Opencv.org, 2020. [Online]. Available:
has the simplest structure and provides instant results, so it
https://opencv.org/.2020.
can be used in CCTV footage to determine if an individual is
8. S. Feng, C. Shen, N. Xia, W. Song, M. Fan and B. J.
wearing a mask correctly and thus poses no risk to others. In Cowling, "Rational use of face masks in the COVID-19
crowded places such as train stations, bus stops, markets, pandemic", The Lancet Respiratory Medicine, vol. 8, no. 5,
highways, mall exits, schools, colleges, and so on, mass pp. 434-436, 2020.
screening is possible and can be used. 9. M. Loey, G. Manogaran, M. H. N. Taha and N. E. M.
Khalifa, "A hybrid deep transfer learning model with
8. FUTURE SCOPE machine learning methods for face mask detection in the
era of the COVID-19 pandemic", Measurement: Journal of
On a CPU, the model currently provides 5 FPS inference the International Measurement Confederation, 2020.
speed. We hope to increase this to 15 FPS in the future,
making our solution suitable for CCTV cameras without the
use of a GPU. In the field of mobile deployment, Machine
Learning is becoming increasingly common.. As a result, we
want to convert our models to TensorFlow Lite versions.
Tensor can be integrated into our architecture.
We believe there are a number of other scenarios that could be
included in this approach to provide a more comprehensive
sense of security. Here are a couple of the features that are
currently being worked on: Coughing and Sneezing
Detection, According to WHO guidelines, chronic coughing
and sneezing is one of the primary signs of COVID-19
infection and one of the main routes of disease transmission to
non-infected people.Coughing and Sneezing Detection:
According to WHO recommendations, chronic coughing and
sneezing is one of the main symptoms of COVID-19.
Secondly, thermal screening is performed with handheld
contactless IR thermometers, requiring health workers to
come in close proximity to the person to be screened, putting
them at risk of infection and making it nearly impossible to
capture temperature for each individual.

1523

You might also like