Face Mask Detection Report 2
Face Mask Detection Report 2
BACHELOR OF ENGINEERING
(INFORMATION TECHNOLOGY)
BY
CERTIFICATE
Submitted by
is a bonafide work carried out by them under the supervision of Prof. R.G. Kulka-
rni and it is approved for the partial fulfillment for Bachelor’s Degree in Information
Technology of Savitribai Phule Pune University for the award of the Degree of Bach-
elor of Engineering (Information Technology)
ACKNOWLEDGMENT
I would like to take this opportunity to thank my internal guide Prof. R. G. Kulkarni
for giving me all the help and guidance I needed. I am really grateful to them for
their kind support. Their valuable suggestions were very helpful.
In the end our special thanks to All Other Staff for providing various resources such
as laboratory with all needed software platforms, continuous Internet connection,
for Our Project.
ABSTRACT
The world witnessed the outbreak of COVID-19 disease during end of 2019,
which has continued to affect the life of billions of people even in 2021. While
the world recovers from the pandemic and plans to return to its normal state,
people are still continuing to remain anxious, especially the ones who wish to
return to physical state of work. Studies have proved that wearing a face mask
can significantly reduce the chances of infection as well as further
transmission. Since it is not possible to manually track down miscreants who
ignore the rules, technology can pave the path for us. Different Deep learning
algorithms, mainly have CNN models, can not only effectively track the status
of mask on static images, but can also be used for real time monitoring by
launching them on real time streaming cameras for continuous and live
observation.
INDEX
LIST OF SYMBOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI
1 Introduction 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Literature Survey 5
2.1 Study Of Research Paper . . . . . . . . . . . . . . . . . . . . . . . 6
3 Problem Statement 11
3.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4 Project Requirement 13
4.1 EXTERNAL INTERFACE REQUIREMENT . . . . . . . . . . . . 14
4.1.1 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.1.2 Hardware Interfaces: . . . . . . . . . . . . . . . . . . . . . 14
4.1.3 Software Interfaces . . . . . . . . . . . . . . . . . . . . . . 14
4.2 NON FUNCTIONAL REQUIREMENT . . . . . . . . . . . . . . . 15
4.2.1 Performance Requirements . . . . . . . . . . . . . . . . . . 15
4.2.2 Safety Requirement . . . . . . . . . . . . . . . . . . . . . . 15
4.2.3 Software Quality Attributes . . . . . . . . . . . . . . . . . 15
5 System Analysis 17
5.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.1.1 Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.1.2 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . 19
5.2 UML DIAGRAMS . . . . . . . . . . . . . . . . . . . .. . 21
6 Software Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7 Project Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.1 Stakeholder List . . . . . . . . . . . . . . . . . . . . . . .. 41
7.2 System Implementation Plan . . . . . . . . . . . . . . . . 41
8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . .43
9 References. . . .. . . .. . . .. . . . . .. . . . .. . . . . . . .. . . . . .. . . . . . . . 44
LIST OF SYMBOLS
h - Height
w - Width
f - Filter
d - Dimension
List of Figures
LIST OF ABBREVATIONS
INTRODUCTION
Face Mask Detection Using Deep Learning
1.1 OVERVIEW
The trend of wearing face masks in public is rising due to the COVID-19
corona virus epidemic all over the world. Before Covid-19, People used to
wear masks to protect their health from air pollution. While other people are
self-conscious about their looks, they hide their emotions in public to hide
their faces.
More than five million cases were infected by COVID-19 in less than 6
months across 188 countries. The virus spreads through close contact and
in crowded and overcrowded areas.
We can tackle and predict new diseases by the help of new technology
such as artificial intelligence, lot, big data, and Machine Learning. In order
to better understand infection rates might be decrease through our
technique.
People are forced by laws to wear face masks in public in many countries.
These rules and laws were developed as an action to the exponential
growth in cases and deaths in many areas. However, the process of
monitoring large groups of people is becoming more difficult in public areas.
So we will create a automation process for detecting the faces.
1.1.1 Motivation
The world has not yet fully Recover from this pandemic and the vaccine
that can effectively treat Covid-19 is yet to be discovered. However, to
reduce the impact of the pandemic on the country's economy, several
governments have allowed a limited number of economic activities to be
resumed once the number of new cases of Covid- 19 has dropped below a
certain level. As these countries cautiously restarting their economic
activities, concerns have emerged regarding workplace safety in the new
post-Covid-19 environment.
1.1.2 Objective
LITERATURE SURVEY
Face Mask Detection Using Deep Learning
Abstract: The topic that we have selected is called Face Mask Detection
using Python, OpenCV, TensorFlow and Deep Learning. This means that we
have developed software that would detect masks on a person or people in
a video or image, it would tell them whether that they are wearing a mask or
not. This particular project is achieved in two phases, where phase 1 would
be to train the face mask detector and phase 2 would be to apply or deploy
the face mask detection Software. In phase 1 of the project, our main focus
would be to create a training model using datasets, where datasets consist
of a huge number of images of people with face masks and people without
a face mask. In phase 2 we would load the trained model and then detect
the face and then categorize the faces as to whether there is any mask or
no mask on that. We see Our Model build in Python Programming Language
can detect the mask on faces once tested using video output.
for video capture and these cameras have their significant value for security
object having high degree of variability in its appearance, that makes face
2019 (COVID-19), which has continued to be the cause of plight for millions
of lives and businesses even in 2020. As the world recovers from the
inperson activity. Studies have proved that wearing a face mask significantly
of this policy. Technology holds the key here. We introduce a Deep Learning
based system that can detect instances where face masks are not used
can be integrated with pre-installed CCTV cameras. This will help track
safety violations, promote the use of face masks, and ensure a safe working
environment.
Abstract: COVID-19 pandemic has rapidly affected our day-to- day life
disrupting the world trade and movements. Wearing a protective face mask
has become a new normal. In the near future, many public service providers
will ask the the customers to wear mask correctly to avail of their services.
Therefore, face mask detection has become a crucial task to help global
OpenCV and Scikit-Learn. The proposed method detects the face from the
surveillance task performer, it can also detect a face along with a mask in
PROBLEM STATEMENT
Face Mask Detection Using Deep Learning
The System is to predict people are wearing masks or without mask, given
an image or a video from real time monitoring system. It is an object detection
and classification problem with 2 different classes (with Mask and Without
Mask).
PROJECT REQUIREMENT
Face Mask Detection Using Deep Learning
The performance of the functions and every module must be well. The overall
performance of the software will enable the users to work efficiently.
Performance of encryption of data should be fast. Performance of the
providing virtual environment should be fast Safety Requirement.
The application is designed in modules where errors can be detected and solved
easily. This makes it easier to install and update new functionality if required.
The application is designed in modules where errors can be detected and fixed easily.
Our software has many quality attribute that are given below.
Maintainability: After the deployment of the project if any error occurs then
it can be easily maintained by the software developer.
Reliability: The performance of the software is better which will increase the
reliability of the Software.
Test ability: The software will be tested considering all the aspects.
SYSTEM ANALYSIS
Face Mask Detection Using Deep Learning
5.1.1 Module
1. Creating image datasets a data-loaders for train and test using the
experiments folder split
• Training Datasets: A datasets that we feed into our algorithm
to train in our model.
• Testing Datasets: A datasets that we use to validate the
accuracy of our model but is not used to train the model. It
may be called the validation dataset.
2. Training the model
3. Visualizing images
In Data Flow Diagram, we Show that flow of data in our system in DFD0 we
show that base DFD in which rectangle present input as well as output and
circle show our system, In DFD1 we show actual input and actual output of
system input of our system is text or image and output is rumor detected like
wise in DFD 2 we present operation of user as well as admin.
The UML may be used to visualize, specify, construct and document the artifacts of
a software intensive system. UML is process independent, although optimally it
should be used in process that is use case driven, architecture-centric, iterative, and
incremental. The number of UML Diagram is available.
Class Diagram.
Activity Diagram.
Sequence Diagram.
SOFTWARE INFORMATION
Face Mask Detection Using Deep Learning
Python
What exactly is Python? You may be wondering about that. You may be
referring to this book because you wish to learn editing but are not familiar
with editing languages. Alternatively, you may be familiar with programming
languages such as C, C ++, C #, or Java and wish to learn more about Python
language and how it compares to these "big word" languages.
Python Concepts
You can skip to the next chapter if you are not interested in how and why
Python. In this chapter, I will try to explain why I think Python is one of the
best programming languages available and why it is such a great place to
start.
Python Features
Python features include –
Advantages/Benefits of Python:
The diverse application of the Python language is a result of the combination
of features which
give this language an edge over others. Some of the benefits of
programming in Python include:
4. Learning Ease and Support Available: Python offers excellent readability and
uncluttered simple-to-learn syntax which helps beginners to utilize this
programming language. The code style guidelines, PEP 8, provide a set of
rules to facilitate the formatting of code. Additionally, the wide base of users
and active developers has resulted in a rich internet resource bank to encourage
development and the continued adoption of the language.
5. User-friendly Data Structures: Python has built-in list and dictionary data
structures which can be used to construct fast runtime data structures. Further,
Python also provides the option of dynamic high- level data typing which
reduces the length of support code that is needed.
Python Numbers
Numeric values are stored in number data types. When you give a number a
value, it becomes a number object.
Python Strings
In this python uses a string is defined as a collection set of characters
enclosed in quotation marks. Python allows you to use any number of
quotes in pairs. The slice operator ([] and [:]) can be used to extract subsets
of strings, with indexes starting at 0 at the start of the string and working their
way to -1 at the end.
Python Lists
The most diverse types of Python data are lists. Items are separated by
commas and placed in square brackets in the list ([]). Lists are similar to C-
order in some ways. Listings can be for many types of data, which is one
difference between them.
The slide operator ([] and [:]) can be used to retrieve values stored in the
list, the indicators start with 0 at the beginning of the list and work their way
to the end of the list. The concatenation operator of the list is a plus sign (+),
while the repeater is an asterisk (*).
Python Tuples
A cone is a type of data type similar to a sequence of items. Cone is a
set of values separated by commas. The pods, unlike the list, are
surrounded by parentheses.
Lists are placed in parentheses ([]), and the elements and sizes can be
changed, but the lumps are wrapped in brackets (()) and cannot be sorted.
Powders are the same as reading lists only.
Python Dictionary
Python dictionaries in Python are a way of a hash table. They are similar to
Perl's combination schemes or hashes, and are made up of two key
numbers.The dictionary key can be any type of Python, but numbers and
strings are very common. Prices, on the other hand, can be anything you
choose Python. Curly braces () surround dictionaries, and square braces ([)
are used to assign and access values.
The scripted and completed.py files are executed in the Python interpreter
in the regular manner.
Interactive mode is a command line shell that provides instant response for
each statement while simultaneously running previously provided
statements in active memory.
The feed programmer is assessed in part and whole as fresh lines are fed
into the interpreter.
Pandas
Pandas is an open-source library that is built on top of NumPy library. It is
a Python package that offers various data structures and operations for
manipulating numerical data and time series. It is mainly popular for
importing and analyzing data much easier. Pandas is fast and it has high-
performance & productivity for users.
Keras
Keras is an API designed for human beings, not machines. Keras follows
best practices for reducing cognitive load: it offers consistent & simple APIs,
it minimizes the number of user actions required for common use cases,
and it provides clear & actionable error messages.
The code is hosted on GitHub, and community support forums include the
GitHub issues page, and a Slack channel. Keras is a minimalist Python
library for deep learning that can run on top of Theano or Tensor Flow.
Four Principles:
• Modularity: A model can be understood as a sequence or a graph alone.
All the concerns of a deep learning model are discrete components that can
be combined in arbitrary ways.
TensorFlow
Tensor flow is an open-source software library.
Tensor flow was originally developed by researchers and engineers.
It is working on the Google Brain Team within Google’s Machine Intelligence
research organization the purposes of conducting machine learning and
deep neural networks research.
It is an open-source framework to run deep learning and other statistical
and predictive analytics workloads.
The name Tensor Flow derives from the operations that such neural
networks perform on multi-dimensional data arrays, which are referred to
as tensors.
OpenCV:
1. It is a cross-platform library using which we can develop real-time
computer vision applications.
4. Also, interfaces based on CUDA and OpenCL are also under active
development for high-speed GPU operations. Open CV-python is the
Python API of OpenCV.
5. It combines the best qualities of Open CV C++ API and Python language
entire scene, find similar images from an image database, remove red eyes
from images taken using flash, follow eye movements, recognize scenery
and establish markers to overlay it with augmented reality, etc.
Numpy:
NumPy is a library for the Python programming language, adding support
for large, multi-dimensional arrays and matrices, along with a large
collection of high- level mathematical functions to operate on these arrays.
The ancestor of NumPy, Numeric, was originally created by Jim Hugunin
with contributions from several other developers. In 2005, Travis Oliphant
created NumPy by incorporating features of the competing Num array into
Numeric, with extensive modifications. NumPy is open- source software and
has many contributors.
The Python programming language was not initially designed for numerical
computing, but attracted the attention of the scientific and engineering
community early on, so that a special interest group called matrix-sig was
founded in 1995 with the aim of defining an array computing package.
Among its members was Python designer and maintainer Guido van
Rossum, who implemented extensions to Python's syntax (in particular the
indexing syntax) to make array computing easier.
MATPLOT:
Mat plot is a plotting library for the Python programming language and its
numerical mathematics extension NumPy. It provides an object-oriented
API for embedding plots into applications using general-
purpose GUI toolkits like Tkinter, WX Python, Qt, or GTK+. There is also a
procedural "Pylab" interface based on a state machine (like OpenGL),
designed to closely resemble that of MATLAB, though its use is
discouraged SciPy makes use of Matplotlib.
Matplotlib was originally written by John D. Hunter, has an active
development community and is distributed under a BSD-style license.
Michael Droettboom was nominated as matplotlib's lead developer shortly
before John Hunter's death in August 2012 and further joined by Thomas
Caswell.
DEEP LEARNING
CNNs, like neural networks, are made up of neurons with learnable weights
and biases. Each neuron receives several inputs, takes a weighted sum over
them, pass it through an activation function and responds with an output. The
whole network has a loss function and all the tips and tricks that we
developed for neural networks still apply on CNNs. In more detail the image
CNN MODEL
1. This CNN model is built using the Tensorflow framework and the OpenCv
library which is highly used for real-time applications.
Conv2D
MaxPoolin
g2D
Flatten ()
Dropout
Dense
Conv2D Layer:
It has 100 filters and the activation function used is the ‘ReLu’. The ReLu
function stands for Rectified Linear Unit which will output the input directly if
it is positive, otherwise it will output zero.
MaxPooling2D:
It is used with pool size or filter size of 2*2.
Flatten () Layer:
It is used to flatten all the layers into a single 1D layer.
Dropout Layer:
It is used to prevent the model from overfitting.
Dense Layer:
The activation function here is soft max which will output a vector with
two probability distribution values.
PROJECT PLAN
Face Mask Detection Using Deep Learning
In this chapter we are going to have an overview about how much time does it took
etcetera. This chapter also gives focus on stakeholder list which gives information
about project type, customer of the proposed system, user and project member
The System Implementation plan table, shows the overall schedule of tasks
compilation and time duration required for each task.
CONCLUSION
Face Mask Detection Using Deep Learning
8.1 CONCLUSION
• The model is accurate, and since the MobileNetV2 architecture is used, it’s
also computationally efficient and thus making it easier to deploy the model
to embedded systems (Raspberry Pi, Google Coral, etc.).
• Our project will help in identifying miscreants who disregard the current covid
19 guidelines, and help in creating a more woke society which understands
the necessity of rules.
• Furthermore, the project can also be useful in the times of any future
pandemics.
REFERENCES
Face Mask Detection Using Deep Learning
[2] Faizan Ahmad, Aaima Najam & Zeeshan Ahmed (2013), “Image-based Face
Science Issues
[3] Amit Chavda and Jason Dsouza (2020), Multi-Stage CNN Architecture for Face
(I2CT)
[4] Arjya Das, Mohammad Wasif Ansari, Rohini Basak (2020) Covid-19 Face Mask
Detection Using TensorFlow, Keras and OpenCV, IEEE 17th India Council
[5] Md. Shahriar Islam, Eimdadul Haque Moon (2020), A Novel Approach to Detect
[6] https://www.javatpoint.com/keras
[7] https://www.tensorflow.org/learn
[8] https://www.geeksforgeeks.org/python-programming-language/
[9] https://youtube.com/playlist?list=PLeo1K3hjS3uu7CxAacxVndI4bE_o3BDtO