Facemask Detection Using Convolutional Neural Networks
Facemask Detection Using Convolutional Neural Networks
V
CONTENTS
Page No
ABSTRACT v
LIST OF FIGURES x
LIST OF TABLES ix
CHAPTER 1: INTRODUCTION 10-16
1.1 Preamble 10
1.2 Deep Learning 10
1.3 OpenCV 11
1.4 Keras 12
1.5 Problem Statement 13
1.6 Aim of the project 14
1.7 Significance of the project 15
1.8 Conclusion 16
CHAPTER 2:LETURATURE SURVEY 17 - 41
2.1 Preamble 17
2.2 Literature Review 17
2.3 Conclusion 41
CHAPTER 3: METHODOLOGY 42 -56
3.1 Preamble 42
3.2 Tools Used 42
3.3Hardware Requirements 44
3.4Communication Interfaces 45
3.5Software requirements/Hardware Requirements 45
VI
3.7Architecture of CNN model
47
3.8Sequence Diagram 49
3.9 Activity Diagram 50
3.10 DataFlow Diagram 51
3.11 Proposed system 51
3.12 Proposed Methodology 52
3.13 Proposed Methodology Modules 52-53
3.13.1 Data collection
3.13.2 preprocessing
3.13.3 Splitting the data
3.13.4 Building the model
3.13.5 Testing the model
3.13.6 Implementing the model
3.14 Testing 54
3.15 Types of Testing 54 - 55
3.15.1 Black box testing
5.1 Conclusion 59
5.2 Future Enhancement 59
REFERENCES 60 - 61
VII
APPENDIX – A SOURCE CODE 62 - 75
APPENDIX – B SCREENSHOTS 76 - 81
VIII
LIST OF FIGURES
LIST OF TABLES
9
CHAPTER 1
INTRODUCTION
1.1 PREAMBLE
In this chapter we are going to introduce our project domain, it‟s architecture,problem
statement ,aim, methodology we are going to include in our project and what we going
to do in our project.
10
structure in the input dispatch in order to discover good representations, often at
multiple levels, with higher-level learned analysis defined in terms of lower-level
features.
1.3 OpenCV :
The library has more than 2500 transform algorithms, which contains a complete set
of both typical and state-of-the-art computer discernment and machine learning
algorithms. These algorithms can be used to determine and perceive faces identify
objects, classify human actions in videos, track camera movements, track moving
objects, extract 3D models of objects, produce 3D point clouds from stereo cameras,
stich images together to compose a high resolution image of an entire scene, find
similar images from an image database, remove red eyes from images taken using
flash, follow eye movements, recognize scenery and display markers to overlay it with
augmented actuality, etc. OpenCV has more than 47 thousand people of user
organizations and evaluate number of downloads unusual 18 million. The library is
used greatly in organizations, exploration sector and by governmental bodies. Along
11
with standard organization like Google, Yahoo, Microsoft Intel, IBM, Sony, Honda,
Toyota that absorb the library, there are countless startups such as Applied Minds,
Video surf, and Zeitera, that make immense use of OpenCV.It has C++, Python, Java
and MATLAB interfaces and reinforce Windows, Linux, Android, and Mac OS. OpenCV
leans primarily towards real-time vision solicitation and takes advantage of MMX and
SSE command when available. A full featured CUDA and OpenCL interfaces are being
actively transpire right now. There are over 500 algorithms and about 10 times as
many basis that compose or support those algorithms. OpenCV is written natively in
C++ and has a template attachment that works seamlessly with STL containers.
1.4 KERAS
Keras is an API examined for human beings, not machines. Keras obey best practices
for minimize consequent load it offers consistent & simple APIs, it minimizes the
number of user actions required for familiar use cases, and it produce clear &
applicable blunder messages. It also has considerable corroboration and immense
guides. Keras restrain numerous implementation of frequently used neural network
construction blocks such as layers, objectives, operate justification, optimizers, also a
host of tools to make functioning with image and text data trouble-free to clarify the
coding mandatory for writing deep neural networks code. It was developed to make
contrive deep learning models as fast and easy as feasible for research and
expansion. It runs on python 2.7 or 3.5 and can seamlessly achieve on GPUs and
CPUs given the elemental frameworks. It is rescue under the liberal MIT license.
Keras was expand and conserve by Francois Chollet, a Google engineer using four
guiding
principles:
12
Modularity: A imitation can be understood as a course or a graph alone. All the perturb
of a deep learning model are discrete components that can be integrate in inconsistent
ways.
Minimalism: The library contribute just enough to achieve an outcome, no frills and
spiral readability.
Extensibility: New constituent are purposely easy to add and use within the framework,
conscious for researchers to trail and explore new ideas.
Python: No unrelated model files with practice file formats. Everything is indigenous
Python Keras is delineate for minimalism and segmental allowing you to very rapidly
define deep learning imitation and run them on brink of a Theano or TensorFlow
backend.
1.5 PyTorch
PyTorch is an open origin machine learning library form on the Torch library, used for
applications such as computer vision and natural language processing, primarily
developed by Face book‟s AI Research lab[FAIR].
It is free and open-source software rescue under the reform BSD authorize. whilst the
python extension is more shining and the central focus of development, PyTorch also
has a C++ interface. Tensor enumerate like NumPy with strong enumerate via
graphics processing units(GPU).
13
1.5 PROBLEM STATEMENTS
Changes in the lifestyle of public around the world. In those replace wearing a
mask has been very vital to every isolated. Detection of people who are not
wearing masks is a provocation due to outbreak of the coronavirus pandemic has
created various the huge number of populations. This project can be utilize in
schools, hospitals, banks, airports, etc. as a digitized scanning tool. The technique
of detecting people‟s faces and sort out them into two classes namely the people
with masks and people without masks is finished with the assuage of image
processing and deep learning. With the help of this project, a person who is
considered to monitor the people can be seated in a remote area and still can
monitor logical and give instructions accordingly. Various libraries of python such
as OpenCV, Tensor flow and Keras. In deep learning convolution neural networks
is a class deep neural networks which is used to train the pattern used for this
project.
COVID-19 has affected the world badly. Studies have proved that wearing a face
mask is one of the precautions to reduce the risk of vital transmission. And many
public places as well as public service providers require customers and their staff to
use the service and place only if they wear mask correctly. So, it is not possible
manually to track the customer whether they have the mask or not. That‟s why this
technology grasp the key here. In this technique we propose face mask detection
using image processing which is one of the high-accuracy and efficient face mask
detector. Our system is capable of detecting masked and unmasked faces and can
be integrated with webcamera.
The whole world today, is covering the COVID-19 pandemic. People are using various
measures to control the spread of Corona virus. There are so many vital measures
14
which are needed to find against COVID-19 and one of such most important is face
mask. Lots of research and studies on COVID-19 are still going on studies have also
proved that wearing a face mask remarkably reduces the problem of viral
transmission. Also a person wearing mask recognizes a sense of protection. However,
it is not feasible manually to check whether a person is wearing a mask or not.
Technology comes into picture here. Deep learning and artificial intelligence consists
of various technologies which provide effective solutions to complex problems in
different areas. In order to prevent the spread of Corona virus, we have made an
attempt to develop a face mask recognition system using Deep learning. The present
work deals with the study of many face detection approaches and the proposed
method of detecting face mask using video analytics in deep learning. The main
objective of our project is to detect whether the person is wearing or not. And the
person who is not wearing a mask the system will send a remainder message to email
or phone of the person. To execute this idea we are using webcam to take snapshot in
a time and faces in the image are analyzed by image processing techniques. After
processing the system will match the each and every person in the image with the
registered data base in the organization. If the face of the person is matched upto
30%-40% then the system will consider the person as masked. If the face of the
person is matched upto 80%-90% then it will consider as unmasked person. Then it
send a warning or fine, remainder message to the E-mail or Phone number that they
registered.
In recent years, face mask plays important role. This is because corona virus
COVID-19 pandemic is causing a worldwide health crisis therefore the effective
15