0% found this document useful (0 votes)
80 views17 pages

Face Mask Detection Project

The document discusses building a face mask detection system using techniques like MobileNet-V2, a CNN architecture and training on a Kaggle dataset. It describes the methodology, architecture, training process and achieving 99% accuracy on classifying faces as wearing masks or not. The system can then be applied to detect faces in images and videos in real-time.

Uploaded by

varuag2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views17 pages

Face Mask Detection Project

The document discusses building a face mask detection system using techniques like MobileNet-V2, a CNN architecture and training on a Kaggle dataset. It describes the methodology, architecture, training process and achieving 99% accuracy on classifying faces as wearing masks or not. The system can then be applied to detect faces in images and videos in real-time.

Uploaded by

varuag2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

FACE MASK DETECTION

Submitted to :- Submitteb by :-
Mr. Surendra Mehra Gaurav Phogat 7CS11
Assistant Professor Hemant Singh Ch 7CS13
Department of CSE Himanshu K. Jha 7CS14
CONTENTS:

1. Introduction 6.MobileNet-V2

2.Problem Statement 7.Data Set used

3.Methodology 8.Future Work

4.Architecture 9.Conclusion

5.Training 10.References
INTRODUCTION

In the ongoing battle against the spread of infectious diseases,


particularly in the context of the global COVID-19 pandemic, the
integration of technology has become paramount. One such
technological initiative that has gained prominence is the
development of face mask detection systems in public spaces. The
primary objective of these systems is to swiftly and accurately
identify whether individuals within a given environment are wearing
masks. This process involves a dual-stage strategy: first, the
detection of faces, and subsequently, the identification of masks on
those faces.
PROBLEM STATEMENT

Before getting started, let us understand the problem better. We want to build a system
that can detect faces in real-world videos and identify if the detected faces are wearing
masks or not. So, what do we mean by real-world videos?

If you look at the people in videos captured by CCTV cameras, you can see that the
faces are small, blurry, and low resolution. People are not looking straight at the
camera, and the face angles vary from time to time. These real-world videos are
entirely different from the videos captured by webcams or selfie cameras, making the
face mask detection problem much more difficult in practice.
METHODOLOGY

In this PROJECT we created a COVID-19 face mask detector using OpenCV,


TensorFlow, and machine learning.To create our face mask detector, we trained a
two-class model of people wearing masks and people not wearing masks. We fine-
tuned MobileNet-v2 on our mask/no mask dataset and obtained a classifier that is -
99% accurate.

We then took this face mask classifier and applied it to images by:

1.Detecting faces in images.


2.Extracting each individual face
3.Applying our face mask classifier
-
Overview of steps :
ARCHITECTURE

The working of the Single Shot Detector algorithm relies on an input image
with a specified bounding box against the objects. The methodology of
predicting an object in an image depends upon very renowned convolution
fashion. For each pixel of a given image, a set of default bounding boxes
(usually 4) with different sizes and aspect ratios are evaluated. Moreover, for
all the pixels, a confidence score for all possible objects are calculated with
an additional label of ‘No Object’. This calculation is repeated for many
different feature maps.

In order to extract feature maps, we usually use the predefined trained


techniques which are used for high quality classification problems. We call
this part of the model a base model. For the SSD, we have VGG-16 network
as our base model.
Convolutional Neural Network:

In deep learning, a CNN model is usually fed with an image as an input


which is then made to pass through multiple layers. To begin with, the
input is made to pass through convolutional layers with kernels in
succession, followed by a pooling layer. This layer then reduces the
number of learning parameters and hence computations by turning down
the size of feature maps. It is afterwards carried through fully connected
layers, which at the end apply a softmax function that predicts the
probabilistic values for each class. The class having the maximum value
is then taken to be the class to which the object belongs.
Example of multi-layered Convolutional layers in a Architecture:
TRAINING
During the training phase, a critical aspect of object detection involves
examining each pixel within an image. This process entails comparing default
bounding boxes that vary in size and aspect ratios with the ground truth
boxes, which represent the actual location and dimensions of objects in the
image. The goal is to identify the most accurate bounding box for each object.

The comparison is achieved through the Intersection over Union (IoU)


method, a fundamental metric in object detection algorithms. IoU measures
the extent to which the predicted bounding box aligns with the ground truth.

The IoU score is calculated by dividing the area of intersection between the
predicted and actual bounding boxes by the area of their union. This ratio
provides a value between 0 and 1, where 0 indicates no overlap and 1 signifies
a perfect match.
Hyperparameters:

A hyperparameter is a parameter or a variable we need to set before


applying an algorithm into a dataset. These parameters express the “High
Level” properties of the model such as its complexity or how fast it should
learn. Hyperparameters are fixed before the actual training process begins.
MobileNet-V2
MobileNetV2 [12] is an architecture of bottleneck depth-separable
convolution building of basic blocks with residuals. It has two types of
blocks. The first one is a residual block with stride of 1. Second one is also
a residual block with stride 2 and it is for downsizing.
DATA SET USED
Dataset name: Face-mask-detection
Database link: https://www.kaggle.com/datasets/vijaykumar1799/face-mask-detection

Context:

Having seen multiple datasets related to face mask detection on Kaggle, one dataset which
stood out contained 3 classes (with mask, without a mask, and wearing mask incorrectly),
unfortunately, the dataset was highly imbalanced and uncleaned. So to improve this
dataset, images had to be augmented in such a way that each class has an equal distribution
of images and removing noisy images which could be considered as outliers. Thus this
dataset that I've created is a combination of an existing dataset that has been cleaned and
equally distributed across each class.

Content:
The dataset contains 3 folders labeled as to which class they belong to. the 3 classes are
"with_mask", "without _mask", and "mask_weared_incorrect".
Data Labelling :-
We are labeling data for annotation in this step this is mostly done because
machine does not understand the image itself it needs annotations to easy
interpret images and to train the model more accurately.
FUTURE WORK
More than fifty countries around the world have recently initiated wearing face masks as
compulsory. People have to cover their faces in public, supermarkets, public transports,
offices, and stores. Retail Companies often use software to count the number of people
entering their stores. They may also like to measure impressions on digital displays and
promotional screens. We are planning to improve our Face Mask Detection tool and
release it as an open-source project. Our software can be equated to any existing USB, IP
cameras, and CCTV cameras to detect people without a mask.

This detection live video feed can be implemented in web and desktop applications so that
the operator can see notice messages. Software operators can also get an image in case
someone is not wearing a mask.

Furthermore, an alarm system can also be implemented to sound a beep when someone
without a mask enters the area. This software can also be connected to the entrance gates
and only people wearing face masks can come in.
CONCLUSION
In summary, our innovative face mask detection project, meticulously crafted through the
seamless integration of the Python programming language, a Kaggle dataset, and a
sophisticated Convolutional Neural Network (CNN) architecture, serves as a compelling
demonstration of how cutting-edge technology can be strategically harnessed to
champion public health and safety initiatives. This amalgamation of powerful tools not
only showcases the versatility of modern programming languages but also underscores
the collaborative spirit inherent in leveraging community-driven datasets and state-of-
the-art neural network architectures.

At its core, our project addresses a pressing global concern by employing image
processing techniques to scrutinize facial features and make informed decisions
regarding mask adherence. By effectively classifying individuals based on the presence
or absence of face masks, our system acts as a vital tool in identifying those who may
unwittingly be exposing themselves and others to potential health risks, particularly in
the context of infectious diseases like the coronavirus.
REFERENCES:
[1] A. G. Howard, M. Zhu, B. Chen et al., "Mobilenets: efficient convolutional neural networks for mobile vision
applications," 2017, https://arxiv.org/abs/1704.04861.

[2] Wei Wang, Yutao Li, Ting Zou, Xin Wang, Jieyu You, Yanhong Luo, "A Novel Image Classification Approach
via Dense-MobileNet Models", Mobile Information Systems, vol. 2020,ArticleID 7602384, 8 pages, 2020.
https://doi.org/10.11 55/2020/7602384

[3] I. B. Venkateswarlu, J. Kakarla and S. Prakash, "Face mask detection using MobileNet and Global Pooling
Block," 4 2020 IEEE 4th Conference on Information & Communication Technology (CICT), 2020, pp. 1-5, doi:
10.1109/CICT51604.2020.9312083.

[4] M. S. Ejaz and M. R. Islam, "Masked Face Recognition Using Convolutional Neural Network," 2019
International Conference on Sustainable Technologies for Industry 4.0 (STI), 2019, pp. 1-6, doi:
10.1109/STI47673.2019.9068044

[5] Changjin Li, Jian Cao, and Xing Zhang. 2020. Robust Deep Learning Method to Detect Face Masks. In
Proceedings of the 2nd International Conference on Artificial Intelligence and Advanced Manufacture
(AIAM2020). Association for Computing Machinery, New York, NY, USA, 74-77.
DOI:https://doi.org/10.1145/3421766.3421768

You might also like