Detect Masks in Real Time with OpenCV, Keras & Deep Learning
1. GOVERNMENT COLLEGE OF ENGINEERING ,AURANGABAD
TY BTECH CSE 2021-2022
FACE MASK DETECTION SYSTEM
PRESENTED BY:
1.ABHISHEK HADOLTIKAR
2.PRATIK RATHOD
3.SOFI SHAH
4.GAURAV KURKUTE
GUIDED BY:
PROF. PRASHANT PATHAK
(CSE DEPARTMENT)
3. INTRODUCTION
We are glad to be her with you today. The topic of our minor project is face mask detector
In this project we have used OpenCV, Keras/Tensorflow, and Deep Learning, We introduce a
mask face detection model that is based on computer vision and deep learning. The Proposed
model can e integrated with surveillance cameras to impede the COVID-19 transmission by
allowing the detection of people who are wearing masks not wearing face masks. The model
is integration between deep learning and classical machine learning techniques with
opencv,tensor and Keras.
4. Objective
1) To enforce the manmade for wearing masks in public places following the COVID-19 pandemic.
2) To effectively provide a working model for accurate mask detection.
3) To utilize image processing approaches to identify the presence of a mask on face.
4) To develop an efficient computer vision based system focused on the real time automated
monitoring of people to detect face mask in public places.
5. Problem Statement
The large scale losses that have been noticed across the world due to covid-19 pandemic
have been highly shocking and lead to a lot of loss of property and life. The pandemic was
sudden and the people and government could not prepare themselves effectively
beforehand to mitigate the effects of this epidemic. The virus is highly deadly and had
caused multiple casualties which could be prevented through effective preventive
measures. Therefore use of mask enables effective prevention and further spread of the
virus which can be the main ingredient for stopping the infections in their path.
1) To ensure that the mask rule is been followed there needs to be an automatic
technique that can provide highly accurate intelligent system for mask detection
through image processing.
2) Wearing a mask in public settings is an effective way to keep the communities safe. As
a response to the COVID-19 pandemic, we open-sourced a mask detection applications
created by neutral that uses AI to detect if people are wearing masks or not. We
focused on making our face mask detector ready for real-world applications, such as
CCTV cameras, where faces are small, blurry, and far from the camera.
6. Motivation to select this Topic
• To ensure the safety of the citizens during the global pandemic.
• To effective implement image processing approaches for the purpose of facial
mask detection.
7. Tools and technologies used
8. opencv: OpenCV is the huge open-source library for the computer vision, machine
learning, and image processing
and now it plays a major role in real-time operation which is very important in today’s
systems
8. Theory
• In this PROJECT we created a COVID-19 face mask detector using OpenCV,
Keras/Tensorflow and deep Learning.
• To create our face mask detector, we trained a two-class model of people
wearing masks and people not wearing face masks.
• We fine-tuned MobileNetV2 on our mask dataset and obtained a classifier
that is ~99% accurate.
• We then took this face mask classifier and applied it to image by :
Detecting faces in images.
Extracting each individual face
• Applying our face mask classifier
• Our face mask detector is accurate, and since we used the MobileNetV2
architecture, it’s also computationally efficient.
9. System Architecture
Load face
mask dataset
Train face mask
classifier with
Keras/Tensorflow
Serialize face
mask classifier to
disk
Phase #1: Train Face Mask Detector
Phase #2 : Apply Face Mask Detector
Load face mask
classifier from disk
Detect faces in
image/video
stream
Extract each
face ROI
Apply face mask
classifier to each
face ROI to
determine “mask”
or “no mask”
Show results
Two phase COVID-19 face mask detector
10. Module A: Frame Capturing
This is the Initial step of the proposed model. Here an open CV library is
installed to enable the camera to capture the live video stream. Once the
system is activated it start capturing the video frames, these frames are fed to
cascade classifier to detect faces in that. This cascade classifier uses the HAAR
features to identify the faces in the extracted frame as these features are stored
in the cascade xml files. As the faces are identified, then the images set to
preprocess by rescaling them with the width and the height of 150 X 150 with
the channel size of 3. Then this image object is temporarily stored on the
secondary drive to obtain the better features of the images for detection of
mask.
11. Module B: Region of Interest
A region of interest (ROI) is a portion of an image that you want to filter or perform
some other operation on. You define an ROI by creating a binary mask, which is a
binary image that is the same size as the image you want to process wit pixels that
define the ROI set to 1 and all other pixels set to 0.
13. Advantages
Public places like Bus stand, Air ports and Railway stations
Offices and Educations institutes
Cost effective
Curb Covid-19 pandemic
Life Saving
Benefit
14. Scope
The system is easy to operate and it can be used in crowded areas. It
also ensures the compliances for wearing mask and the system provides
accurate assessment of the individual in public areas whether the
person is wearing a mask or not.
Can be implemented as mobile applications
Can be developed as api
15. Conclusion
Efficient Image capturing
Efficient Dataset training through CNN
Successful face mask Detection
Maintaining alert status