FACE MASK DETECTION SYSTEM USING AI

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2022

FACE MASK DETECTION SYSTEM USING AI


1
Tejas B, 2Abhijit S, 3Darshan S, 4Suraj P
1,2,3,4
Department of Computer Engineering, PVG’S COLLEGE OF ENGINEERING & SSD IOM, NASHIK
1,2,3,4
SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE
1
bansode.tejas99@gmail.com, 2shermaleabhijit99@gmail.com, 3darshanshinde4943@gmail.com,
4
pawarsurajs828@gmail.com

Abstract :- In current pandemic, Covid-19 has created been proven to ease our lives from the micro levels to
United States understand the importance of Face Masks big impossible tasks. In the last few years, there has
and that we ought to perceive the crucial effects of not been a rise in the onset of algorithms that have been
carrying one, currently over ever. Right now, there proven to be the solution to our complex, life
aren't any mask detectors put in at the jammed places, threatening problems. One such field is the image and
however we tend to believe that it's of utmost object detection, which has helped us find and spot
importance that at transportation junctions, densely people and things with just one click. Computer Vision
inhabited residential district, markets, academic plays a crucial role in our lives now. Who would have
establishments and care areas, it's currently vital to line thought that while sitting in one city you can easily spot
up mask detectors to make sure the security of the the people in the other cities? It's almost unimaginative
general public. during this paper we've tried to make a how Computer vision is now a very innovative aspect
2 phased mask detector which can be simple to deploy of the technology. In 2019, the whole world witnessed
at the mentioned shops. With the assistance of pc the onset of the deadly Corona Virus, which now, still
Vision, it's currently attainable to sight and implement after almost a year has not left us and is still making the
this on massive scale. we've used CNN for the human race fight for its existence. In between the
implementation of our model. The implementation is survival fights, we have realized how technology is very
completed in Python, and also the python script much our only life saver. From extensive internet
implementation can train our mask detector on our facilities to 24/7 services online, technology has been
selected dataset victimization TensorFlow and Keras. our true companion in these hard times. But even when
we've side additional sturdy options and trained our we have everything present at one click, there can't be
model on numerous variations, we tend to created no lives outside. In the past few months every country,
bound to have massive varied and increased dataset so every state has found its own new norms to fight the
the model is in a position to obviously, determine and pandemic. And no matter what we do, we do need to
detection the face masks in real time videos. The trained step outside to survive. Schools, Offices, Colleges,
model was tested on each time period videos and static Markets, Transportation, are the few crucial check
footage and in each the cases the accuracy was over the points for any country. As much as we ask the public to
opposite designed models. be safe, the people miss their [without any restrictions
lives. And so, it is now very important to closely watch
1) Introduction :- the public and make them understand the importance of
In the last few years, we have seen Science and the tiny and small details of survival kit. “FACE MASK
Technology advancing so much that now we are at a DETECTION SYSTEM USING AI” One such crucial
stage where, we know that with the right knowledge of factor is the extensive usage of face masks in our lives.
the technology, the humans can achieve things that Studies have proven that with the help of use of face
seemed nearly impossible just a few decades ago. Now, masks, we can lower the chances of catching the Corona
we have the advancing technologies and knowledge of Virus by 80 to 85%, if it's used properly. But, even so,
Machine Learning and Artificial Intelligence, which has it is nearly impossible to enforce the face masks

© 2021, JOIREM |www.joirem.com


Journal Publication of International Research for Engineering and Management (JOIREM)
Volume: 10 Issue: 04 | may-2022
completely on the human race. With the help of AI and images captured by CCTV and classify whether or not
Computer Vision, we have the best chance at enforcing people are wearing masks.
the mask policy on the humans. With the help of our
system, we aim on detecting the presence of face masks
on static images and real time videos. Object detection,
Classification, Regression, image and object tracking
and analysis are our key aspects of the paper. We are
aiming at a two phased CNN face mask detector. The
first phase is the training phase wherein we have trained
our model and the second phase the application, where
the masks are detected with "with" or "without masks"
tags. Other than the images we also aim to implement
this on the real time videos, where the real time faces
are detected, tracked and the data about the faces with
or without masks is returned. Our paper can be of crucial
help at the Stations, airports, Markets, Hospitals,
Offices, Schools and many more, where the crowd can
be monitored in real time.
2) LITERATURE REVIEW:-
The existing models have used deep learning but they
lack the variation in the dataset which means that their Fig 1. Architecture of Proposed System
model is not that efficient when it comes to real time
CNN plays a vital part in computer vision related
images and videos. Deep learning technique has been
instances in pattern recognition. To remove top-level
useful for big data analysis work focuses on some
features, CNN uses convolution parts to blend with
commonly implemented deep learning architectures and
the primary pictures. The recommended starting
their applications. Deep learning can be used in
network allows the network to become acquainted
unsupervised learning algorithms to process the
with the kernel mix. Planning to construct a good
unlabelled data. A CNN model for speedy face
Convolutional Neural Network architecture is still a
detection has been introduced by Li et al that evaluates
primary concern. K. He et al. suggested Residual
low resolution an input image and discards non-face
Network (ResNet), which may use personality
sections and accurately processes the regions that are at
planning from the previous layer, to construct a
a greater resolution for precise detection. Our model is
much more advanced neural network. Because
a trained custom deep learning and computer vision
article locators are typically carried on portable or
model which can detect if a person is wearing a mask or
embedded devices with limited computational
not. Our model has not used morphed or unreal masked
resources, Mobile Network (MobileNet) is proposed.
pictures in the dataset. Our model is very accurate as we
This
have used MobileNetV2 architecture, it has made the
model computationally efficient too. This made it easier
to deploy the model to embedded system. We can use
this face mask detection system in places that require
face mask detection in view of the current pandemic.
The model can be deployed at Airports, Railway
Stations, Offices, Schools and other public places.
3) PROPOSED WORK:-
Fig 2-Convolutional Neural Network
The goal of the face mask detection system is to detect
whether a person is wearing a face mask or not, warn Convolutional Layer:-
authorities, and impose penalties on the person before
sending a message to that person's mobile phone in It is the fundamental block of CNN. Convolution is
order to reduce the spread of COVID-19. This system basically the fusion of two functions to receive another
uses a Convolutional Neural Network (CNN) to analyse function. Here. the input data, which is a four-

© 2021, JOIREM |www.joirem.com


Journal Publication of International Research for Engineering and Management (JOIREM)
Volume: 10 Issue: 04 | may-2022
dimensional tensor (number of images. height. width The fully connected layers are added in the model and
and number of channels) is convolved with a they have complete connections to activation layers. In
convolutional filter called kernel to obtain the this layer all the inputs are connected to the activation
convolved feature. It has been utilized to remove unit of the upcoming layer. The given images are
features using back propagation with the removed classified as multi class and the activation function
feature can be used for pattern recognition. The result of which is used in layers and they give out the result of
the convolutional layer is turned to be a feature map. estimated output classes in terms of probability.
The attributes which are followed in CNN are
convolution filter with width and height, sum of input Dataset:-
and output channels. convolution filter depth and The collection is made up of 3918 photos separated into
convolution operations. two categories: faces with masks and faces without
masks. Faces without masks is a Kaggle dataset that
Pooling Layer:-
comprises faces with diverse skin colours, angles,
The obtained feature map is influenced by the area of occlusion, and other features. Faces with masks
features in the input. This sensitivity can be overtaken comprises masks with hands, masks, and other items
in which the feature map requires down sampling of that cover the face, giving us an advantage when it
features. This makes the resulting feature map more comes to improving dataset variants.
speed to the variations in bearings of the aspect in the
The second collection contains photographs of persons
image. Pooling operations can be applied to make
associated with the organisation where our project is
calculations faster, reducing the dimensions of the input
installed. This data is essential for facial recognition and
matrix except any loss in aspect by summing up the
sending emails to certain individuals.
existence of aspects in the feature map. This average
presence of an aspect is summed up using two types of 4) MATHEMATICAL MODEL:-
pooling methods. One is Average pooling and the other
is maximum pooling also called Max pooling. In this we take a little matrix of numbers (called kernel or
paper, average pooling has been implemented. This filter), pass it over our image, and rework it supported
pooling function sums up the average of all the values on the values from the filter.
in the current kernel region and turns up a single value G [m,n]=(f×h) [m,n]=ΣjΣi h [j,k] f [m−j,n−k]
as the result. Average Pooling Layer is put in 2×2
patches of the feature map with a pace of (2, 2). This Since our image shrinks on every occasion, we tend to
process includes summing the average for each patch of perform convolution, we are able to have it off solely a
the feature map. Which is meant that every 2-2 square restricted range of times before our image disappears
of the feature map is sampled down to an average value fully,
in the square.
P=(f−1)/2
Flatten Layer:
Instead of shifting the kernel by one pel, we are able to
Flatten layer combines all available native aspects of the increase the amount of steps. So, step length is
preceding convolutional layers without affecting the additionally treated mutually of the convolution layer
batch size. Every feature map channel in the outer of a 𝑛+2𝑝−𝑓
CNN layer is a result of multiple 2-D kernels which are hyper parameters.𝑛𝑜𝑢𝑡 = 𝑓𝑙𝑜𝑜𝑟(1 + 𝑠
)
developed from each channel of the input layer and
The filter and also the image you would like to it to
stacked to form a "flattened 2-D array. This layer
should have a similar range of channels.
converts a two-dimensional feature of a matrix into a
one-dimensional array of vectors which is given into a [𝑛, 𝑛, 𝑛𝑐] × [𝑓, 𝑓, 𝑛𝑐] = [𝑓𝑙𝑜𝑜𝑟 (1 +
𝑛 + 2𝑝 − 𝑓
) , 𝑓𝑙𝑜𝑜𝑟 (1
fully connected neural network classifier. The 𝑠
𝑛 + 2𝑝 − 𝑓
tf.keras.layers. Flatten function reforms the tensor to a + ) , 𝑛𝑓]
𝑠
shape which will be equal to the sum of elements
present in the tensor.

Fully-connected Layer:

© 2021, JOIREM |www.joirem.com


Journal Publication of International Research for Engineering and Management (JOIREM)
Volume: 10 Issue: 04 | may-2022
In the above fig System identify the person is not
wearing mask and show the output by using red frame,
Name of person, accuracy of wearing mask or not.

Fig 5 : Mask Detection


The figure above helps to identify whether the person
is wearing a mask or not. And email alerts are sent to
people who don't wear masks.

Fig 3 -Dataset With and without face mask


5) MODEL TESTING:-
Our system helps to identify the organizational person Fig 6 :Email alert
if he or she is wearing or not wearing mask The above figure shows an e-mail alert that has been
sent to a person who is not wearing a mask.

6) CONCLUSION:-
We have developed the system which might monitor
the world through the period of time camera, with none
extra devices. The planned system may be a easy
period of time video analyzer. It's the potential to
examine whether or not the individuals wear masks or
not. It will be put in in any supermarkets and public
places. This helps America to defeat the widespread of
COVID-19 virus. as a result of carrying masks reduces
the community unfold of COVID-19 virus. we will use
this for several different choices like checking and
collateral all the purchasers have carrying facemask.
The system completely checks the persons enter
Fig 4 : Face recognition of organizational through the most gate. we will method the video
person recorded and notice whether or not the person is
carrying a facemask or not. If the person wears his/her
facemask, then everything is ok; otherwise it should

© 2021, JOIREM |www.joirem.com


Journal Publication of International Research for Engineering and Management (JOIREM)
Volume: 10 Issue: 04 | may-2022
send some email alert message like " You are not
wearing a mask. If you try to re-enter the campus
without a mask, you have to pay 50 rupees fine”

REFERENCES
1]Rahman, Mohammad Marufur; Manik, Md. Motaleb
Hossen; Islam, Md. Milon; Mahmud, Saifuddin; Kim, 6]Kumar, G. and Shetty, S. Application Development
Jong-Hoon (2020). [IEEE 2020 IEEE International IOT, for Mask Detection and Social Distancing Violation
Electronics and Mechatronics Conference Detection using Convolutional Neural Networks. DOI:
(IEMTRONICS) - Vancouver, BC, Canada (2020.9.9- 10.5220/0010483107600767
2020.9.12)] 2020 IEEE International IOT, Electronics
7]Ejaz, Md. Sabbir; Islam, Md. Rabiul (2019). [IEEE
and Mechatronics Conference (IEMTRONICS) - An
2019 International Conference on Sustainable
Automated System to Limit COVID-19 Using Facial
Technologies for Industry 4.0 (STI) - Dhaka,
Mask Detection in Smart City Network. , (), 1– 5.
Bangladesh (2019.12.24-2019.12.25)] 2019
doi:10.1109/IEMTRONICS51293.2020.9216386
International Conference on Sustainable Technologies
2]Sakshi, S., Gupta, A. K., Singh Yadav, S., & Kumar, for Industry 4.0 (STI) - Masked Face Recognition Using
U. (2021). Face Mask Detection System using CNN. Convolutional Neural Network. , (), 1–6.
2021 International Conference on Advance Computing doi:10.1109/STI47673.2019.9068044
and Innovative Technologies in Engineering
8]Z. Wang, P. Wang, P. C. Louis, L. E. Wheless, and Y.
(ICACITE). doi:10.1109/icacite51222.2021.940
Huo, “Wear mask: fast Inbrowser face mask detection
3]Islam, M. S., Haque Moon, E., Shaikat, M. A., & with server less edge computing for COVID-19,” 2021,
Jahangir Alam, M. (2020). A Novel Approach to Detect https://arxiv.org/abs/2101.00784
Face Mask using CNN. 2020 3rd International
9]I. B. Venkateswarlu, J. Kakarla and S. Prakash, "Face
Conference on Intelligent Sustainable Systems (ICISS).
mask detection using Mobile Net and Global Pooling
doi:10.1109/iciss49785.2020.9315
Block," 4 2020 IEEE 4th Conference on Information &
4]Suresh, K., Palangappa, M., & Bhuvan, S. (2021). Communication Technology (CICT), 2020, pp. 1-5,
Face Mask Detection by using Optimistic doi: 10.1109/CICT51604.2020.9312083.
Convolutional Neural Network. 2021 6th International
10]N. Mehendale B-412, K. J. Somaiya College of
Conference on Inventive Computation Technologies
Engineering, Mumbai, India Tel.: +91-9820805405 E-
(ICICT). doi:10.1109/icict50816.2021.9358
mail: ninad@somaiya.edu
5]Jiang, X.; Gao, T.; Zhu, Z.; Zhao, Y. Real-Time Face
10]K.Nithiyasreea and T.Kavithab a Student, b
Mask Detection Method Based on YOLOv3.
Assistant Professor(SS) a, b Department of Computer
Electronics 2021, 10, 837. https://
Science and Engineering Periyar Maniammai Institute
doi.org/10.3390/electronics10070837
of Science & Technology, Vallam, Thanjavur-613403,
Tamil Nadu, India

© 2021, JOIREM |www.joirem.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy