0% found this document useful (0 votes)
66 views

Face Mask Detection and Door Unlocking System Using Deep Learning

Recent viral outbreaks have disrupted people's lives and culminated in a pandemic that largely affected all of humanity. Due to COVID -19, many people are forced to stay home but many people are going outside because of many reasons. As people visit any office they must wear masks.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Face Mask Detection and Door Unlocking System Using Deep Learning

Recent viral outbreaks have disrupted people's lives and culminated in a pandemic that largely affected all of humanity. Due to COVID -19, many people are forced to stay home but many people are going outside because of many reasons. As people visit any office they must wear masks.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

10 XII December 2022

https://doi.org/10.22214/ijraset.2022.47965
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XII Dec 2022- Available at www.ijraset.com

Face Mask Detection and Door Unlocking System


Using Deep Learning
Akhil Kumar Gaddam1, Bhargava Krishna Menugonda2
1, 2
Department of Electronic and Computer Engineering, Sreenidhi Institute of Science & Technology, Hyderabad India

Abstract: Recent viral outbreaks have disrupted people's lives and culminated in a pandemic that largely affected all of humanity.
Due to COVID -19, many people are forced to stay home but many people are going outside because of many reasons. As people
visit any office they must wear masks. But many people don’t wear them due to reluctance, this project is to check if the
employees visiting the office wear masks or not. Making use of deep learning, we have built a system that can figure out if an
individual is wearing a mask or not. This system may be used in many different locations, such as offices, malls, hospitals, and
even private homes. The use of servo motors allows the door to be locked if any individual is not wearing a mask, and a buzzer
can be used to warn the person to put on a mask. By using a Raspberry Pi and other existing systems, we can keep the cost of the
system as low as possible, making it accessible to a wide range of people.
Keywords: Outbreak, Pandemic, Buzzer, Deep Learning, Accuracy

I. INTRODUCTION
The face mask is becoming a requirement in our lifestyle. Throughout the coronavirus, and COVID-19 crisis in the year 2019 and
2020 people throughout the globe are utilizing masks as a protective technique against the virus during the pandemic, and owing to
the growth of high pollution rate in this world, the mask has become obligatory [1]. But most people are not aware of wearing masks
and some individuals forget their responsibilities to wear masks and walk into public locations. This core concept is to explain how
technology is beneficial for identifying face masks on any individual. In this method, we monitor and identify those who
wear masks. We used a deep learning detection technique for each person in the picture and opens the door if the person is wearing
it, and if the person is not wearing a mask, it does not open the door. This system is developed to detect people you violating
wearing face masks in both indoor and outdoor spaces, including hospitals, workplaces, metro stations, and a variety of other
locations

II. PROBLEM STATEMENT


The main challenge is to identify people using face masks in public spaces such as Hospitals, offices, public transportation,
marketplaces, Malls, and other similar places [2]. Plenty of individuals violate the rule of not wearing a mask in public areas. So,
one of the greatest preventions is to wear an over-the-neck mask in public areas so transmission of new viruses may be minimized.
Our described model can recognize faces and differentiate masked faces from unmasked ones in webcam recordings well as real-
world footage where the faces are small and unclear and where individuals are wearing masks in various shapes and colors. This
system will use cameras to capture images of people in public spaces and apply deep learning algorithms to identify individuals who
are not wearing masks [3]. The system will also provide notifications to enforce compliance with mask-wearing guidelines, helping
to reduce the spread of the virus and this is important to safeguard people's safety and prevent COVID-19 from spreading. The
challenge is to accurately detect face masks in real time, even in crowded and dynamic environments. The solution should be able to
handle variations in lighting, facial expressions, and head movements.

III. SOFTWARE REQUIREMENTS


A. OpenCV
An open-source library of computer vision and machine learning methods is called OpenCV (Open Source Computer Vision
Collection). It is meant to help developers create computer vision applications fast and effectively. OpenCV provides a wide variety
of tools for image and video processing, including machine learning methods, which may be used to construct applications such as
face recognition, object identification, and augmented reality. OpenCV is extensively used in the area of computer vision and is a
popular option among developers and researchers owing to its flexibility of use and strong feature. The proposed method makes the
usage of all the features of OpenCV in rearranging the different sizes and variety of color conversions of images.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 651
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XII Dec 2022- Available at www.ijraset.com

B. Tensor flow
An open-source software library for artificial intelligence and machine learning. It is a symbolic math library that is used by neural
network applications in machine learning. It was developed by Google and is being used for a variety of purposes by several
businesses and organizations. TensorFlow gives users the ability to create and train neural networks to find patterns and connections
in large datasets. It is an effective tool for many situations in the real world. It is a very adaptable platform that makes it possible to
create and use machine learning models, allowing for effective experimentation and study enabling programmers to build massive
neural networks with several layers, train them on a data set, and then use the trained model to make predictions or to classify new
data points. TensorFlow also offers tools for viewing and troubleshooting the built-in models. Developing the newest generation of
intelligent systems is extensively implemented in the area of deep learning.

C. Keras
Python-based Keras is an open-source neural network library. It can work on top of Theano, Microsoft Cognitive Toolkit, or
TensorFlow. It is user-friendliness, flexibility, and extensibility are its key design objectives as it attempts to allow rapid
development with deep neural networks. Convolutional and recurrent neural networks, as well as hybrids of the two, are supported
by Keras. It also has support for common utility layers and pre-processing layers like batch normalization, dropout, and pooling it
can be widely used for a variety of applications, including image and text classification, object detection, and natural language
processing. Keras is known for its ease of use and user-friendly interface, making it a popular choice for developers and researchers
in the field of deep learning.

IV. PROPOSED SYSTEM


The proposed system for face mask detection would have the following components:
1) Image Capture: The system would employ a camera to capture the photos of individuals in a particular setting. The
photographs would be saved in a database.
2) Image Pre-processing: The acquired photographs would be pre-processed to reduce noise and increase the quality of the images.
3) Face Identification and Mask Detection: The system would utilize a deep learning-based face detection algorithm to identify
the presence of faces in the photos [4]. It would then utilize a convolutional neural network (CNN) to identify the presence of
masks in the faces.
4) Reporting: The system would also create information on the number of persons using face masks in a specific setting. This may
be used to check the compliance of persons with the face mask policy.
5) Unlocking System: In this system, if the individual is wearing the mask then the door opens up.
6) Alarm System: The system would be set to issue an alert anytime a person without a face mask is spotted.

V. MODULES
Several key components are typically involved in the face mask detection development system using deep learning. These include
the following:
1) Data Collection and pre-processing: To train a deep learning model, a large dataset of images containing individuals wearing
face masks are required. These images must be carefully annotated to indicate the presence of a face mask in each image. This
dataset is then typically pre-processed to ensure that the images are suitable for training the model.
2) Model Architecture: The next step is to design the structure of the deep learning model that will be used for face mask detection.
This typically involves using convolutional neural networks (CNNs) to bring out features from the pictures and illustrate them
as either containing a face mask or not [5].
3) Model Training: Once the model architecture has been designed, the model is trained on the dataset using a suitable machine
learning algorithm. This typically involves optimizing the model's parameters to minimize the difference in predicted and true
labels of the training data.
4) Model Evaluation: After the model has been trained, it is important to evaluate its performance on a held-out dataset to assess
its accuracy and reliability. This typically involves calculating metrics such as precision, recall, and F1 score.
5) Model Deployment: Once the model has been trained and evaluated, it can be deployed for use in a live face mask detection
system. This typically involves integrating the model into a computer vision system that can process video streams or still
images in real-time to detect the presence of face masks.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 652
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XII Dec 2022- Available at www.ijraset.com

VI. CIRCUIT DIAGRAM

Fig1: Circuit diagram

From the above circuit diagram shown,


1) The raspberry pi has a power source of 2.5v from a voltage adaptor. I used a mobile charger.
2) The Raspberry pi camera is connected to the camera port using the CSI connector which is in the form of a ribbon cable.
3) We can connect the pi to the display using the HDMI connection or wireless stream using a VNC viewer.
4) We use a breadboard for extended connections.
5) The servo red pin i.e., the voltage input for the servo to the GPIO pin no:2 which is 5V out from the raspberry pi to the servo
6) The servo’s control signal pin is connected to GPIO pin no: 18 which can generate PWM signals.
7) The servo’s ground pin can be connected to any ground pin in the pi as all the GND pins are interconnected in the pi module.
These are connected with a 2.2 kΩ resistor for protection.
8) The LEDs are connected to GPIO pins 14 and 15 which can generate normal voltages.
9) And the buzzer’s positive pin is connected to GPIO 21 pin.

VII. PROCESS FLOW DIAGRAM / FLOWCHART

Fig2: Process flow of mask detection system

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 653
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XII Dec 2022- Available at www.ijraset.com

From the above flow chart,


1) The main module raspberry pi which contains the database contains training models, main code and images, and data required
for data processing.
2) The database contains two sections with masks and without masks containing images and data for training the mask detection
model.
3) If the mask is detected then the servo opens the door for a set time and closes.
4) If the face mask is not detected then the door is locked and the buzzer is activated for acoustic warnings and LEDs for visual
warnings.

VIII. WORKING WITH OUTPUT

Fig3: Mask detected the system displays “Mask Detected”

Fig4: Mask not detected, the door is closed and the buzzer is ON

Fig5: Mask is detected door is Open using servo and the LED is on and after 10 sec the door automatically closes and goes off

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 654
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue XII Dec 2022- Available at www.ijraset.com

IX. FUTURE SCOPE


The future scope of face mask detection using deep learning is vast. With the ongoing COVID-19 pandemic, the use of face masks
has become a necessity in many places. Using deep learning, it is possible to develop highly accurate models that can instantly
determine whether or not someone is wearing a face mask. The creation of intelligent wearable technology is another possible use
for face mask detection using deep learning. These wearable gadgets utilize sensors and deep learning algorithms to determine
whether a person is wearing a face mask or not. If the individual isn't wearing a face mask, the device could vibrate or provide some
other type of alert to remind them to put on their face mask. This can be useful in a variety of settings, including airports, schools,
and public events, to ensure that people are following guidelines and taking appropriate precautions to protect themselves and others.
We have designed this system specifically for public locations like Hospitals where the mask is essential, and public areas like
shopping malls and park spots and gatherings. As this system is relatively modest this can be expanded more and transformed into a
full-time product. This kind of implementation into small-scale systems like raspberry pi can motivate the developers as this project
illustrates that we don’t need pricey systems and hardware to design from scratch and can be produced utilizing cheap and small-
scale instruments like the Pi.

X. CONCLUSION
To prevent the spread of the virus, Actions must be made in the wake of the COVID-19 epidemic, we developed a facemask
detector and door-unlocking system. We used the dataset, which contains both masked and unmasked facial photos, to train, validate,
and test the model. This face mask detector may be used at a variety of locations, including airports, shopping centers, and other
busy areas, to keep an eye on the general public and stop the spread of disease by determining who is adhering to the minimum
requirements and who is not. This research might be combined with embedded technology and used to check that public safety laws
are followed in public places including airports, train stations, workplaces, and schools. The presence or absence of a face mask may
be precisely determined in real-time using deep learning algorithms. Our results show that these algorithms have a high level of
accuracy and can be useful in a variety of settings, including airports, schools, and public events the use of deep learning algorithms
for face mask detection has shown to be a promising solution for effectively detecting the use of face masks in public settings.
Through the implementation of convolutional neural networks, our model was able to accurately identify individuals wearing face
masks with a high degree of reliability. Additionally, our approach was able to handle variations in mask type, face orientation, and
lighting conditions. These results demonstrate the potential for using deep learning algorithms to assist in the enforcement of face
mask mandates and promote public safety. Further research can be done to improve the performance of these models and explore
their potential applications in other areas.
REFERENCES
[1] Terence C. Cheng, Seonghoon, Kim Kanghyock Koh, The Impact of COVID-19 on Subjective Well-Being: Evidence from Singapore
[2] J. Jessica Farias, Ronaldo Pilat, Violating social distancing amid COVID-19 pandemic: Psychological factors to improve compliance,
DOI:10.31234/osf.io/apg9e
[3] David J. Brady, Lu Fang, Zhan Ma, Deep learning for camera data acquisition, control, and image estimation
[4] Ahmad Almadhor, Deep Learning Based Face Detection Algorithm for Mobile Applications
[5] GagandeepKaur, RiteshSinha, Face mask recognition system using CNN model, Neuroscience Informatic Volume 2, Issue 3, September 2022, 100035

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 655

You might also like