[go: up one dir, main page]

100% found this document useful (1 vote)
49 views11 pages

Facemask Detection Using Convolutional Neural Networks

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
100% found this document useful (1 vote)
49 views11 pages

Facemask Detection Using Convolutional Neural Networks

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 11

ABSTRACT

Changes in the lifestyle of everyone around the world. In those


changes wearing a mask has been very vital to every individual.
Detection of people who are not wearing masks is a challenge due
to outbreak of the coronavirus pandemic. This project can be used
in schools, hospitals, banks, airports, and where there is no human
survellience places. The technique of detecting people‟s faces and
segregating them into two classes namely the people with masks
and the people without masks. It is done with the help of image
processing technique and deep learning i.e using convolutional
neural networks algorithm. Using CNN model the weight of the data
while processing will reduce. With the help of this project we can
detect a person who is under the control of remote area wheather
he/she was wearing a mask or not by taking data from the live video
stream .

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

3.6System Architecture diagram 46

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

3.15.2 White box testing

3.16 Test cases 56

CHAPTER 4: RESULTS AND DISCUSSION 57 - 58


4.1 Results 57
4.2Results Comparison 58
4.3Application 58

CHAPRER 5 : CONCLUSION AND FUTURE ENHANCEMENT 59

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

FIG NO FIG NAME PAGENO

Fig 3.1 Interactive mode 44

Fig 3.2 Python GUI (IDLE) 44

Fig 3.3 System architecture 46

Fig 3.4 Architecture of CNN model 47

Fig 3.5 Sequence Diagram 49

Fig 3.6 Activity Diagram 50

Fig 3.7 Data flow diagram 51

Fig B1 Python-3.7.4 setup 76

Fig B2 Installation of keras 77

Fig B3 Installation of opencv 78

Fig B4 Installation of Numpy 78

Fig B5 Output Screenshots 79 - 82

LIST OF TABLES

TABLE NO TABLE NAME PAGE NO

Table 2.1 Comparison of Literature Review 36

Table 3.1 Test case table 55

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.

1.2 Deep Learning

Deep learning is a unique confine of machine learning. A new take on learning


representations from data that puts can emphasis on learning successive layers of
increasingly meaningful representations. The deep in deep learning isn‟t a authority to
any kind of deeper understanding concluded by the approach rather, it stands for this
idea of successive layers of representations. How many layers promote to a pattern of
the data is called the depth of the model. Other appropriate names for the field could
have been layered representations learning and hierarchical representations learnings.
Modern deep learning often require tens or even hundreds of successive layers of
rendition and they‟re all learned significantly from exposure to training data.
Meanwhile other approaches to machine learning tend to thesis on learning only one
or two layers of representations of the data; they are sometimes called shallow
learning. In deep learning these layered description are almost always learned via
models called neural networks is a citation to neurobiology , but although some of the
central concepts in deep learning were expanded in part by drawing innovation from
our understanding of the brain , deep learning models are not models of the brain.
Deep learning techniques aim at learning feature ladder with features from higher
levels of the hierarchy exhibit by the composition of lower level features. Automatically
learning features at multiple levels of extraction allow a system to learn complex
functions mapping the input to the output directly from data, without depending entirely
on human-crafted features. Deep learning algorithms seek to enterprise the unknown

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.

The hierarchy of concepts permit the computer to learn tricky concepts by


building them out of simpler ones. If we draw a graph showing how these concepts are
raise on top of each other, the graph is deep, with many layers. For this reason, we call
these approach to AI deep learning. Deep learning excels on problem domains where
the inputs and even outputs are analog. Meaning they are not a few plentiful in a
tabular format but instead are images of pixel data, documents of text data or files of
audio data. Deep learning permits computational models that are contrive of multiple
processing layers to learn representations of data with multiple levels of abstraction.

1.3 OpenCV :

OpenCV(open source computer vision library) is an open provenance computer


perception and machine learning software library. OpenCV was built to transmit a
common configuration for computer vision applications and to hurry the use of
machine perception in the commercial products. Being a BSD-licensed outcome,
OpenCV makes it easy for businesses to exploit and improve the code.

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).

Deep neural networks construct on a tape-based automatic differentiation system


PyTorch defines a class called Tensor to stock and manage on homogeneous
multidimensional rectangular arrays of numbers. PyTorch Tensors are homogeneous
to NumPy Arrays, but can also be manage on a CUDA-capable Nvidia GPU. PyTorch
supports various sub-types of Tensors.(48%)

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.

1.6 AIM OF THE PROJECT

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.

1.7 SIGNIFICANCE OF THE WORK

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

You might also like