SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3272
Covid Mask Detection and Social Distancing Using Raspberry pi
Vinod Raut1, Suyog Raskar2, Suraj Ravande3, Rahul Laudiya4, Prof. Jayshri Palkar5
1,2,3,4 Students, Electronics and Telecommunication Engineering, Keystone School of Engineering, Pune
5Assistant Professor, Electronics and Telecommunication Engineering, Keystone School of Engineering,Pune
-------------------------------------------------------------------***--------------------------------------------------------------------
Abstract - COVID -19 spreads through the air from one
person to another person which is close to each other. like
this, it forms a chain of infection. In order to stop corona-
virus from spreading, is to break the chain of a virus by
implementing Small Changes our daily life like wearing
putting face mask and social distance & Sanitizing hands
Our system helps to check whether a person entering into
public or Corporate places have they put a mask on their
faces or not and it also checks whether they are
maintaining a safe distance fromeach other. This system
Can be easily implemented on any embedded system. To
implement this system we have usedsome algorithms like
CNN(Convolutional neural network)and YOLO they are
used to train the data and to detect different objects from
the live image. Monitoring Social distances regulations and
checking people's masks is most likely to lead to a Scarcity
of resources and is supposed to allow errors creeping in due
to human intervention, So In this Kind of situation, our
System Comes in handy This Paper Describes the approach to
prevent the increase of the Coronavirus by monitoring in
any time if any person is maintaining Social distance and
face masks in a public place. using machine learning this
system can identify the person with mast and without mask
if no mask has occurred then the System willgive an alert
or it will make Sound using a buzzer.
Key Words: Machine Learning, CNN, YOLO, Opencv
1.INTRODUCTION
Before December 2019, We never thought that the one
Small Virus can stop the whole world and can create a
panic situation all the peoples have to stop their works
Schools, malls and other places where Crowd can gather
together are closed for long period of time. Coronavirus is
very dangerous as it is affecting the Social and economic
health of the countries
.Coronaviruses is kind of virus which gets spreads when
an infected person breaths out droplets and very Small
particles that contain the virus. And that droplets get
inhaled by other peoples and they get affected by it Same
pattern gets continuous, it frames a chain of infection.
So to avoid or break the chain of virus all Countrieshave
announced lockdowns in their countries. but inorder to
feed the families people Can not live forever in lock
down’s So. WHO (world health organization) Suggests
that along with vaccinations.
People should wear a mask and Social distance this will
also help to break the chain. In this situation our system
Comes handy. Because of machine learning everythingis
easy and possible to do Our system takes like pictures and
video recordings. Converts it into different frames and
compare it with trained data set to do that it takes thehelp
of CNN and YOLO algorithms. CNN (Convolutional neural
network)is algorithm used to analyzer different visual
imagery c and YOLO (Youonly looks once) is used to detect
objects in the images. in public place Some like malls,
Schools, corporate offices and many other places they have
to monitor it manually monitoring social distance and
checking people mask is most likely to lead to scarcity of
resources and is supposed to introduced errors due to
human interaction.
1.1 Literature Survey
[1] S. S. Paima, N. Hasanzadeh, A. Jodeiri, and
&H.Soltanian Zadeh, “Detection of COVID-19 from chest
radiographs"in Proceedings of the 2020 27thNationaland
5th International Iranian Conference on Biomedical
Engineering(ICBME), IEEE, Tehran, Iran, November 2020.
This paper also provides a comparative study of different
face detection and face mask classification models.The
system performance is evaluated in terms of precision,
support, sensitivity and accuracy that demonstrate the
practical applicability.
[2] M. Cos¸kun, A. Uçar, O. Yildirim, and Y.Demir, “Face
recognition based on convolutional neural network,” in
Proceedings of the 2017 International Conference on
Modern Electrical and Energy Systems ,Kremenchuk,
Ukraine,November 2017. This paper proposes a modified
Convolutional Neural Network architecture by adding two
normalization operations to two of the layers.The batch
normalization provided acceleration of the network.
[3] Sultana, Sufian, and Dutta, “ In image classification
using convolutional neural network(CNN) ,” in
Proceedings of the 2018 Fourth International Conference
on Research in Computational Intelligence and
Communication Networks , IEEE, Kolkata, India, November
2018 . In this paper, We have explained different
Convolutional Neural Network architectures for image
verification. Through this paper, we have shown
advancements in Convolutional neural network (CNN)
from LeNet-5 to latest SENet model.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3273
[4] Safa Teboulbi ,Messaoud Seifeddine,Mohamed Ali
Hajjaji,Mtibaa Abdellatif." perfect timeImplementation of
AI-Based Face Mask Detection and Social Distancing
Measuring System for COVID- 19 "September 2021 . This
research paper focuses onmask Detected. Detection
model as an machine vision system. The pretrained
models such as the MobileNet, ResNet Classifier, and VGG
are used in our contex.
[5] A Deep Learning Model for Face Mask Detection A.
A.Abd El-Aziz,Nesrine A. Azim, Mahmood A.Mahmood,
and Hamoud Alshammari International Journal of
Computer Science and Network Security, VOL.21 No.10,
October 2021 . In this paper, we propose a simple and
effective model for real-time monitoring using the
convolution neural network to detect a face mask or not.
2. Block Diagram and System Analysis
When the circuit is powered up the USB camera that is
connected to the raspberry pi with begin take picture.
Raspberry pi is a series of small signal board computers
(SBC3)that can be plugged with input output devices such
as monitor, speaker etc
.We are using the pycharm IDE and the spyder.Input
image is compared to the image dataset that have already
been provided. The output is displayed on the monitor. If
it is unable to detect mask & social distance. No output
will be displayed. the audio module capture the user’s
voice. which the controller that convert to text.
Hardware
Power supply: The power supply is used to power the
circuit. Controller: The Raspberry Pi serves as our
controller. It would be possible to save an image dataset.
It will compare the extracted imageto the saved dataset
before sending the results to the monitor and speaker. It
can also convert voice to text using Google API since it has
built-in Wi-Fi. USB Camera: An optical device for
capturing still images or recording moving images.
Speaker: Transducers that transform electromagnetic
waves into sound waves are known as speakers. The
controller sends a signal to the speakers, which then
outputs it .monitor: The output will be displayed in text
form on the LCD.
2.1 Software
Python 3, Opencv, Tensorflow, Pycharm, Spyder, keras
3.1 Steps for Face Mask Face:-
A) FACE DETECTION -: convolutional neural network
based Deep Learning model is used for face
recognition, we used this model because it has a
great advantage compared to other models, some
advantages are convolutional neural network model
can detect the faces even in low resolution [224X
224]. Also used MobilenetV2 model of accuracy of
93.9%, pixels of 90X 90 isthe base for face size that
can be detected. The output gets displayed with the
bounding box across the face, then this crop face is
loaded into thefacemask mod.
B) COLLECTING DATA -:To train data face mask
model, we used Face Detection model. Custom
datasets are collection in our project consisting of
real-time images of a person face with and without
protection of face mask. The dataset that we have
collected is 3836 photo snaps and then split into two
classes, one is with_mask another is without_mask
with_mask has 1921 images and without_mask has
1915 images. Initially we have collected more than
4600 photo snaps in which handful are deleted for
being blurred, not cleared.The dataset is separated
into 79% of training data and 21% of testing data
this is done using the help of sklearnlib.The images
used for the training set is roughly around 3020
images and for testing data around 816 images.
With Mask
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3274
Without Mask
C) MASK DETECTION -: OpenCV’s face detector based
on the SSD framework which comes with
MobilenetV2 architecture. To obtaina bounding box
for an object in this case object means mask, we
need to apply the photo snap with object
detection.SSD are originally developed by Google,
they are between regions with convolutional neural
networks and You Only Look Once Version 3
methods of object detection. This are more straight
forward algorithm and faster than regions with
convolutional neural networks The current model
is combined with both MobilenetV2 architecture
and SSD framework, so our model will have the
quick, efficient deep learning- based method for
Mask Detection.
3.2 STEPS FOR SOCIALDISTANCING
A) PERSON DETECTION -: The Proposed model uses
Resnet50 which is a subclass of MobilenetV2 and
convolution neural network for the process of
person detection using the framework of Tensor
Flow. The key feature of this model is that it is able to
detect many classes of objects at the same time. The
graphics processing unit (GPU)acceleration is
enabled which helps in performing faster
computation compared to previous models. Various
set of features such as mouth, eyes, arms, nose,
movement of body are extracted in order to get
effective results. Histogram equalization is used to
increase the contrast of input live images or video.
B) DISTANCE COMPUTING -: The model used in this
application has a very effectively trained
MobilenetV2for persondetection intheimage
.The model will take the video frame as the input
and output a list of coordinate in a bounding box in a
rectangular shape across every person detected in
the frame. The rectangular bounding box is
represented as [ x, y, width, height].Every and each
person in the video frame will have a centroid for
the resulting bounding box. with the help of this
centroids of two bounding boxes. He model will
calculate the biste distance between .two people for
calculating distance We use The Euclidean distance
formula, it is used to calculate distance. between two
real value of Vectors. As a result of the system is if the
distance is less than 3feet, then the system will show
display .if it is greater than or equal to 6 feet then it
will diplay Social distancing is maintaine by the
persons.
4. Algorithm
4.1
Step 1: Take live input image from USB camera.
Step 2: Face Detection .In this step, system will detectthe
face and create a box around the face.
Step 3: If face is detected then it will go to the next step
which is face processing /feature extraction.& If face is
not detected then it will display face is not detected.
Step 4: In this step system will extract some features like
Convolution, Alignment, etc from the image.
Step 5: The image will get compared with images in the
dataset which we trained previously before
implementing the project.
Step 6: If mask gets detected it will label image as mask
detected in green.& If not then will label it as mask not
detected in red.
4.2
Step 1: Take input image video frame from USB camera
Step 2: Detection of pedestrians
Step 3: Camera view calibration Step 4: distance
measurement Step 5: Output or Result display
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3275
Fig (a) - Face Mask Flowchart
Fig (b) – Social distance Flowchart
We are especially thankful to our task project guide
Prof.Jayshri Palkar who consistently upheld and guided
us.We express our colossal delight and appreciation to all
employees of the Department of Electronics and
Telecommunication Engineering, Keystone School of
Engineering, Pune
7. Acknowledgement
5. FlowChart 6. RESULT
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3276
8. Conclusion
In this system we have implemented face mask and
socialdistancing using convolutional neural Network (CNN)
and You Only Looks once (YOLO). Methods include
quarantines, and the closing of schools, workplaces,
stadiums, theatres, or shopping centres. Individuals may
apply social distancing methods by staying at home, limiting
travel, avoiding crowded areas, physically distancing and
using no-contact greetings themselves from others.
9. REFERENCES
[1] Zhanpeng Zhang, Zhifeng Li, Kaipeng
Zhang, and YuQiao. 2016.Joint Face Detection and
Alignment Using Multitask Cascaded
Convolutional Networks.IEEE Signal Processing
Letters 23, 10 (2016),
[2] Nour Eldeen M.Khalifa,Mohamed Hamed
N.Taha, Gunasekaran Manogaran, And Mohamed
Loey, . 2021.Ahybrid deep transfer learning model
with machine learning methods for face mask
detection in the era of the Corona virus
pandemic.Measurement(2021).
[3] Sheshang, Degadwala,et al.Visual Social
Distance Alert System Using Deep Learning, 2020
4th International Conference on Electronics,
Communication and Aerospace Technology . IEEE,
2020.
[4] Sushanth Arunachalam,Ramadass, Lalitha,
and Z. Sagayasree.Applying deep learning
algorithms to maintain social distance in public
places through drone technology.International
Jonnal of Pervasive Computing and
Communications (2020).
[5] A. Uçar, O. Yildirim, Y.Demir,and M.
Cos¸kun, “Face recognition based on convolutional
neural network,” in Proceedings of the 2017
International Conference on Modern Electrical and
Energy Systems , November 2017.
[6] Rachna Jain,Preeti Nagrath, Agam Madan,
Rohan Arora, Piyush Kataria, and Jude
Hemanth.2021, SSDMNV2 A real time DNN-based
face mask detection system using single shot
multibox detector and MobileNetV2.(2021),
[7] R. Girshick,J. Redmon,A.Farhadi, S.Divvala,
YOLO: Unified, real-time object detection, In
Proceedings of the IEEE conference on computer
vision and patternrecognition,2016
[8] Jian Sun, Kaiming He. Ross B.Girshick, and
Shaoqing Ren . 2016.CNN:Towards Real-Time
Object Detection with Region Proposal
Networks.Machine Intelligence and EEE
Transactions on Pattern Analysis (2016),
[9] Baojin Huang,Guangcheng Wang,
Zhangyang Xiong.Qi Hong, Zhongyuan Wang, Hao
Wu,Jinbi Liang, Kui Jiang, Peng Yi,Yingjiao Pei.
Heling Chen. Yu Miao.Zhibing Huang, and
NanxiWang . 2020.Masked Face Recognition Dataset
andApplication. CoRR (2020).
[10] Sufian,Sultana, and Dutta, “ In image
classification using convolutional neural
network(CNN) ,” in Proceedings of the 2018 Fourth
International Conference on Research in Co
Communication Networks and mputational
Intelligence , IEEE, November2018 .

More Related Content

PDF
Deep Learning Assisted Tool for Face Mask Detection
PDF
Real Time Face Mask Detection
PDF
Face Mask and Social Distance Detection
PDF
Intelligent System For Face Mask Detection
PDF
FACE MASK DETECTION AND COUNTER IN THINGSPEAK WITH EMAIL ALERT SYSTEM FOR COV...
PDF
Survey on Face Mask Detection with Door Locking and Alert System using Raspbe...
PDF
Face Mask Detection and Face Recognition Using Machine Learning
PDF
Face Mask Detection using CNN and OpenCV
Deep Learning Assisted Tool for Face Mask Detection
Real Time Face Mask Detection
Face Mask and Social Distance Detection
Intelligent System For Face Mask Detection
FACE MASK DETECTION AND COUNTER IN THINGSPEAK WITH EMAIL ALERT SYSTEM FOR COV...
Survey on Face Mask Detection with Door Locking and Alert System using Raspbe...
Face Mask Detection and Face Recognition Using Machine Learning
Face Mask Detection using CNN and OpenCV

Similar to Covid Mask Detection and Social Distancing Using Raspberry pi (20)

PDF
Covid Face Mask Detection Using Neural Networks
PDF
Review on Arduino-Based Face Mask Detection System
PDF
FACE MASK DETECTION USING MACHINE LEARNING AND IMAGE PROCESSING
PDF
Face Mask Detection and Contactless Body Temperature Sensing
PDF
FACE MASK DETECTION USING ML
PDF
IRJET- Skin Disease Detection using Neural Network
PDF
Face Mask Detection System Using Artificial Intelligence
PDF
INDOOR AND OUTDOOR NAVIGATION ASSISTANCE SYSTEM FOR VISUALLY IMPAIRED PEOPLE ...
PDF
Face-Mask Alert System Using Transfer Learning
PDF
Social Distance Detection System
PDF
Face Mask Detection utilizing Tensorflow, OpenCV and Keras
PDF
ACCESS CONTROL SYSTEM USING FACE MASK DETECTION USING ARTIFICIAL INTELLIGENCE
PDF
Precaution for Covid-19 based on Mask detection and sensor
PDF
Social Distance Detector Using Computer Vision, OpenCV and YOLO Deep Learning...
PDF
Realtime Face mask Detector using YoloV4
PDF
AI-based Mechanism to Authorise Beneficiaries at Covid Vaccination Camps usin...
PDF
Real Time Social Distance Detector using Deep learning
PDF
FACEMASK AND PHYSICAL DISTANCING DETECTION USING TRANSFER LEARNING TECHNIQUE
PDF
A Social Distancing Monitoring System Using OpenCV to Ensure Social Distancin...
PDF
NEW CORONA VIRUS DISEASE 2022: SOCIAL DISTANCING IS AN EFFECTIVE MEASURE (COV...
Covid Face Mask Detection Using Neural Networks
Review on Arduino-Based Face Mask Detection System
FACE MASK DETECTION USING MACHINE LEARNING AND IMAGE PROCESSING
Face Mask Detection and Contactless Body Temperature Sensing
FACE MASK DETECTION USING ML
IRJET- Skin Disease Detection using Neural Network
Face Mask Detection System Using Artificial Intelligence
INDOOR AND OUTDOOR NAVIGATION ASSISTANCE SYSTEM FOR VISUALLY IMPAIRED PEOPLE ...
Face-Mask Alert System Using Transfer Learning
Social Distance Detection System
Face Mask Detection utilizing Tensorflow, OpenCV and Keras
ACCESS CONTROL SYSTEM USING FACE MASK DETECTION USING ARTIFICIAL INTELLIGENCE
Precaution for Covid-19 based on Mask detection and sensor
Social Distance Detector Using Computer Vision, OpenCV and YOLO Deep Learning...
Realtime Face mask Detector using YoloV4
AI-based Mechanism to Authorise Beneficiaries at Covid Vaccination Camps usin...
Real Time Social Distance Detector using Deep learning
FACEMASK AND PHYSICAL DISTANCING DETECTION USING TRANSFER LEARNING TECHNIQUE
A Social Distancing Monitoring System Using OpenCV to Ensure Social Distancin...
NEW CORONA VIRUS DISEASE 2022: SOCIAL DISTANCING IS AN EFFECTIVE MEASURE (COV...
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Ad

Recently uploaded (20)

PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
composite construction of structures.pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
DOCX
573137875-Attendance-Management-System-original
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Construction Project Organization Group 2.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
Digital Logic Computer Design lecture notes
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
composite construction of structures.pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
573137875-Attendance-Management-System-original
Operating System & Kernel Study Guide-1 - converted.pdf
Lecture Notes Electrical Wiring System Components
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Construction Project Organization Group 2.pptx
OOP with Java - Java Introduction (Basics)
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Internet of Things (IOT) - A guide to understanding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mechanical Engineering MATERIALS Selection
CYBER-CRIMES AND SECURITY A guide to understanding
additive manufacturing of ss316l using mig welding
Digital Logic Computer Design lecture notes
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026

Covid Mask Detection and Social Distancing Using Raspberry pi

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3272 Covid Mask Detection and Social Distancing Using Raspberry pi Vinod Raut1, Suyog Raskar2, Suraj Ravande3, Rahul Laudiya4, Prof. Jayshri Palkar5 1,2,3,4 Students, Electronics and Telecommunication Engineering, Keystone School of Engineering, Pune 5Assistant Professor, Electronics and Telecommunication Engineering, Keystone School of Engineering,Pune -------------------------------------------------------------------***-------------------------------------------------------------------- Abstract - COVID -19 spreads through the air from one person to another person which is close to each other. like this, it forms a chain of infection. In order to stop corona- virus from spreading, is to break the chain of a virus by implementing Small Changes our daily life like wearing putting face mask and social distance & Sanitizing hands Our system helps to check whether a person entering into public or Corporate places have they put a mask on their faces or not and it also checks whether they are maintaining a safe distance fromeach other. This system Can be easily implemented on any embedded system. To implement this system we have usedsome algorithms like CNN(Convolutional neural network)and YOLO they are used to train the data and to detect different objects from the live image. Monitoring Social distances regulations and checking people's masks is most likely to lead to a Scarcity of resources and is supposed to allow errors creeping in due to human intervention, So In this Kind of situation, our System Comes in handy This Paper Describes the approach to prevent the increase of the Coronavirus by monitoring in any time if any person is maintaining Social distance and face masks in a public place. using machine learning this system can identify the person with mast and without mask if no mask has occurred then the System willgive an alert or it will make Sound using a buzzer. Key Words: Machine Learning, CNN, YOLO, Opencv 1.INTRODUCTION Before December 2019, We never thought that the one Small Virus can stop the whole world and can create a panic situation all the peoples have to stop their works Schools, malls and other places where Crowd can gather together are closed for long period of time. Coronavirus is very dangerous as it is affecting the Social and economic health of the countries .Coronaviruses is kind of virus which gets spreads when an infected person breaths out droplets and very Small particles that contain the virus. And that droplets get inhaled by other peoples and they get affected by it Same pattern gets continuous, it frames a chain of infection. So to avoid or break the chain of virus all Countrieshave announced lockdowns in their countries. but inorder to feed the families people Can not live forever in lock down’s So. WHO (world health organization) Suggests that along with vaccinations. People should wear a mask and Social distance this will also help to break the chain. In this situation our system Comes handy. Because of machine learning everythingis easy and possible to do Our system takes like pictures and video recordings. Converts it into different frames and compare it with trained data set to do that it takes thehelp of CNN and YOLO algorithms. CNN (Convolutional neural network)is algorithm used to analyzer different visual imagery c and YOLO (Youonly looks once) is used to detect objects in the images. in public place Some like malls, Schools, corporate offices and many other places they have to monitor it manually monitoring social distance and checking people mask is most likely to lead to scarcity of resources and is supposed to introduced errors due to human interaction. 1.1 Literature Survey [1] S. S. Paima, N. Hasanzadeh, A. Jodeiri, and &H.Soltanian Zadeh, “Detection of COVID-19 from chest radiographs"in Proceedings of the 2020 27thNationaland 5th International Iranian Conference on Biomedical Engineering(ICBME), IEEE, Tehran, Iran, November 2020. This paper also provides a comparative study of different face detection and face mask classification models.The system performance is evaluated in terms of precision, support, sensitivity and accuracy that demonstrate the practical applicability. [2] M. Cos¸kun, A. Uçar, O. Yildirim, and Y.Demir, “Face recognition based on convolutional neural network,” in Proceedings of the 2017 International Conference on Modern Electrical and Energy Systems ,Kremenchuk, Ukraine,November 2017. This paper proposes a modified Convolutional Neural Network architecture by adding two normalization operations to two of the layers.The batch normalization provided acceleration of the network. [3] Sultana, Sufian, and Dutta, “ In image classification using convolutional neural network(CNN) ,” in Proceedings of the 2018 Fourth International Conference on Research in Computational Intelligence and Communication Networks , IEEE, Kolkata, India, November 2018 . In this paper, We have explained different Convolutional Neural Network architectures for image verification. Through this paper, we have shown advancements in Convolutional neural network (CNN) from LeNet-5 to latest SENet model.
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3273 [4] Safa Teboulbi ,Messaoud Seifeddine,Mohamed Ali Hajjaji,Mtibaa Abdellatif." perfect timeImplementation of AI-Based Face Mask Detection and Social Distancing Measuring System for COVID- 19 "September 2021 . This research paper focuses onmask Detected. Detection model as an machine vision system. The pretrained models such as the MobileNet, ResNet Classifier, and VGG are used in our contex. [5] A Deep Learning Model for Face Mask Detection A. A.Abd El-Aziz,Nesrine A. Azim, Mahmood A.Mahmood, and Hamoud Alshammari International Journal of Computer Science and Network Security, VOL.21 No.10, October 2021 . In this paper, we propose a simple and effective model for real-time monitoring using the convolution neural network to detect a face mask or not. 2. Block Diagram and System Analysis When the circuit is powered up the USB camera that is connected to the raspberry pi with begin take picture. Raspberry pi is a series of small signal board computers (SBC3)that can be plugged with input output devices such as monitor, speaker etc .We are using the pycharm IDE and the spyder.Input image is compared to the image dataset that have already been provided. The output is displayed on the monitor. If it is unable to detect mask & social distance. No output will be displayed. the audio module capture the user’s voice. which the controller that convert to text. Hardware Power supply: The power supply is used to power the circuit. Controller: The Raspberry Pi serves as our controller. It would be possible to save an image dataset. It will compare the extracted imageto the saved dataset before sending the results to the monitor and speaker. It can also convert voice to text using Google API since it has built-in Wi-Fi. USB Camera: An optical device for capturing still images or recording moving images. Speaker: Transducers that transform electromagnetic waves into sound waves are known as speakers. The controller sends a signal to the speakers, which then outputs it .monitor: The output will be displayed in text form on the LCD. 2.1 Software Python 3, Opencv, Tensorflow, Pycharm, Spyder, keras 3.1 Steps for Face Mask Face:- A) FACE DETECTION -: convolutional neural network based Deep Learning model is used for face recognition, we used this model because it has a great advantage compared to other models, some advantages are convolutional neural network model can detect the faces even in low resolution [224X 224]. Also used MobilenetV2 model of accuracy of 93.9%, pixels of 90X 90 isthe base for face size that can be detected. The output gets displayed with the bounding box across the face, then this crop face is loaded into thefacemask mod. B) COLLECTING DATA -:To train data face mask model, we used Face Detection model. Custom datasets are collection in our project consisting of real-time images of a person face with and without protection of face mask. The dataset that we have collected is 3836 photo snaps and then split into two classes, one is with_mask another is without_mask with_mask has 1921 images and without_mask has 1915 images. Initially we have collected more than 4600 photo snaps in which handful are deleted for being blurred, not cleared.The dataset is separated into 79% of training data and 21% of testing data this is done using the help of sklearnlib.The images used for the training set is roughly around 3020 images and for testing data around 816 images. With Mask
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3274 Without Mask C) MASK DETECTION -: OpenCV’s face detector based on the SSD framework which comes with MobilenetV2 architecture. To obtaina bounding box for an object in this case object means mask, we need to apply the photo snap with object detection.SSD are originally developed by Google, they are between regions with convolutional neural networks and You Only Look Once Version 3 methods of object detection. This are more straight forward algorithm and faster than regions with convolutional neural networks The current model is combined with both MobilenetV2 architecture and SSD framework, so our model will have the quick, efficient deep learning- based method for Mask Detection. 3.2 STEPS FOR SOCIALDISTANCING A) PERSON DETECTION -: The Proposed model uses Resnet50 which is a subclass of MobilenetV2 and convolution neural network for the process of person detection using the framework of Tensor Flow. The key feature of this model is that it is able to detect many classes of objects at the same time. The graphics processing unit (GPU)acceleration is enabled which helps in performing faster computation compared to previous models. Various set of features such as mouth, eyes, arms, nose, movement of body are extracted in order to get effective results. Histogram equalization is used to increase the contrast of input live images or video. B) DISTANCE COMPUTING -: The model used in this application has a very effectively trained MobilenetV2for persondetection intheimage .The model will take the video frame as the input and output a list of coordinate in a bounding box in a rectangular shape across every person detected in the frame. The rectangular bounding box is represented as [ x, y, width, height].Every and each person in the video frame will have a centroid for the resulting bounding box. with the help of this centroids of two bounding boxes. He model will calculate the biste distance between .two people for calculating distance We use The Euclidean distance formula, it is used to calculate distance. between two real value of Vectors. As a result of the system is if the distance is less than 3feet, then the system will show display .if it is greater than or equal to 6 feet then it will diplay Social distancing is maintaine by the persons. 4. Algorithm 4.1 Step 1: Take live input image from USB camera. Step 2: Face Detection .In this step, system will detectthe face and create a box around the face. Step 3: If face is detected then it will go to the next step which is face processing /feature extraction.& If face is not detected then it will display face is not detected. Step 4: In this step system will extract some features like Convolution, Alignment, etc from the image. Step 5: The image will get compared with images in the dataset which we trained previously before implementing the project. Step 6: If mask gets detected it will label image as mask detected in green.& If not then will label it as mask not detected in red. 4.2 Step 1: Take input image video frame from USB camera Step 2: Detection of pedestrians Step 3: Camera view calibration Step 4: distance measurement Step 5: Output or Result display
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3275 Fig (a) - Face Mask Flowchart Fig (b) – Social distance Flowchart We are especially thankful to our task project guide Prof.Jayshri Palkar who consistently upheld and guided us.We express our colossal delight and appreciation to all employees of the Department of Electronics and Telecommunication Engineering, Keystone School of Engineering, Pune 7. Acknowledgement 5. FlowChart 6. RESULT
  • 5. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 09 Issue: 04 | Apr 2022 www.irjet.net p-ISSN: 2395-0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 3276 8. Conclusion In this system we have implemented face mask and socialdistancing using convolutional neural Network (CNN) and You Only Looks once (YOLO). Methods include quarantines, and the closing of schools, workplaces, stadiums, theatres, or shopping centres. Individuals may apply social distancing methods by staying at home, limiting travel, avoiding crowded areas, physically distancing and using no-contact greetings themselves from others. 9. REFERENCES [1] Zhanpeng Zhang, Zhifeng Li, Kaipeng Zhang, and YuQiao. 2016.Joint Face Detection and Alignment Using Multitask Cascaded Convolutional Networks.IEEE Signal Processing Letters 23, 10 (2016), [2] Nour Eldeen M.Khalifa,Mohamed Hamed N.Taha, Gunasekaran Manogaran, And Mohamed Loey, . 2021.Ahybrid deep transfer learning model with machine learning methods for face mask detection in the era of the Corona virus pandemic.Measurement(2021). [3] Sheshang, Degadwala,et al.Visual Social Distance Alert System Using Deep Learning, 2020 4th International Conference on Electronics, Communication and Aerospace Technology . IEEE, 2020. [4] Sushanth Arunachalam,Ramadass, Lalitha, and Z. Sagayasree.Applying deep learning algorithms to maintain social distance in public places through drone technology.International Jonnal of Pervasive Computing and Communications (2020). [5] A. Uçar, O. Yildirim, Y.Demir,and M. Cos¸kun, “Face recognition based on convolutional neural network,” in Proceedings of the 2017 International Conference on Modern Electrical and Energy Systems , November 2017. [6] Rachna Jain,Preeti Nagrath, Agam Madan, Rohan Arora, Piyush Kataria, and Jude Hemanth.2021, SSDMNV2 A real time DNN-based face mask detection system using single shot multibox detector and MobileNetV2.(2021), [7] R. Girshick,J. Redmon,A.Farhadi, S.Divvala, YOLO: Unified, real-time object detection, In Proceedings of the IEEE conference on computer vision and patternrecognition,2016 [8] Jian Sun, Kaiming He. Ross B.Girshick, and Shaoqing Ren . 2016.CNN:Towards Real-Time Object Detection with Region Proposal Networks.Machine Intelligence and EEE Transactions on Pattern Analysis (2016), [9] Baojin Huang,Guangcheng Wang, Zhangyang Xiong.Qi Hong, Zhongyuan Wang, Hao Wu,Jinbi Liang, Kui Jiang, Peng Yi,Yingjiao Pei. Heling Chen. Yu Miao.Zhibing Huang, and NanxiWang . 2020.Masked Face Recognition Dataset andApplication. CoRR (2020). [10] Sufian,Sultana, and Dutta, “ In image classification using convolutional neural network(CNN) ,” in Proceedings of the 2018 Fourth International Conference on Research in Co Communication Networks and mputational Intelligence , IEEE, November2018 .