You are on page 1of 57

Study on

Title “Real Time Face Mask Detection”

Excelvisor Technologies LLP


No-4, BTM6th Stage, 2ndphase, 2nd Block, BDA 80 Feet Rd, Bengaluru,
Karnataka 560076

Submitted by
Soumyakshya
Registration No:
20030146DS013

Under the Guidance of Dr/ Prof. P. Mano Paul

In partial fulfillment of the Course- Industry Internship Programme-IIP

in Semester II of the Master of Technology


2021

Bangalore
Master of Technology

Industry Internship Programme (IIP)

Declaration

This is to declare that the Report titled “Real Time Face Mask Detection” has been
made for the partial fulfillment of the Course: Industry Internship Programme (IIP) in
Semester II by me at Excelvisor Technologies LLP (organization) under the guidance of
Dr./Prof. P.Mano Paul

I confirm that this Report truly represents my work undertaken as a part of my Industry

Internship Programme (IIP). This work is not a replication of work done previously by any

other person. I also confirm that the contents of the report and the views contained

therein have been discussed and deliberated with the academic supervisor.

Signature of the Student :

Name of the Student (in Capital Letters) : SOUMYAKSHYA

Registration No : 20030146DS013
Master of Technology

Certificate

This is to certify that Mr. / Ms. Soumyakshya Regn. No. 20030146DS013 has completed

the report titled “Real Time Face Mask Detection” under my guidance for the partial
fulfillment of the Course: Industry Internship Programme (IIP) in Semester II of the Master

of Technology in Data Science.

Signature of Supervisor: Signature of Professor:

Name of the Supervisor: Name of the Professor:

Mohammad Raju Alam Dr . P . Mano Paul


TABLE OF CONTENTS Pages

ABSTRACT

1. INTRODUCTION 1

1.1. INDUSTRY OVERVIEW 4

1.2. COMPANY OVERVIEW 10

2. PROJECT PROFILE 14

2.1. OBJECTIVES OF THE STUDY 15

2.2. METHODOLOGY 15

3. OBSERVATIONS & ANALYSIS 26

4. RESULTS 31

5. RECOMMENDATIONS /FUTURE DIRECTIONS 35

6. CONCLUSION 37

LEARNING OUTCOME 38

ANNEXURE 39

REFERENCES 49
ABSTRACT

Since the Covid sickness (COVID-19) become a general medical condition all throughout
the planet. This pandemic is affecting social orders and economies all throughout the
planet. The expansion in the quantity of COVID-19 tests gives more data about the
pandemic spread, which might prompt the chance of encompassing it to forestall further
contaminations. In any case, wearing a facial covering that forestalls the transmission of
beads noticeable all around and keeping a proper actual separation among individuals, and
lessening close contact with one another can in any case be helpful in battling this
pandemic.

Consequently, we are executing a Realtime Face Mask Detection model utilizing VGG16
as a PC vision framework. Individuals not wearing covers were identified. In the wake of
executing and sending the models, the chose one accomplished a certainty score of 85-
100%.
1. INTRODUCTION

Covids are a huge group of infections that are known to cause sickness going from the

normal virus to more extreme illnesses like Middle East Respiratory Syndrome (MERS)

and Severe Acute Respiratory Syndrome (SARS). Since the finish of 2019, irresistible

Covid infection (COVID-19) has been accounted for without precedent for Wuhan, and it

has turned into a public harm wellness issue in China and surprisingly around the world.

The World Health Organization (WHO) has pronounced the Covid sickness 2019 (COVID-

19) a pandemic[1]. A worldwide facilitated exertion is expected to stop the further spread

of the infection. A pandemic is characterized as happening over a wide geographic region

and influencing an outstandingly high extent of the population.[2] The last pandemic

revealed on the planet was the H1N1 influenza pandemic in 2009.

This pandemic effectsly affects social orders and economies all throughout the planet

causing a worldwide wellbeing emergency [1]. It is an arising respiratory irresistible illness

brought about by Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) [2].

From one side of the planet to the other, particularly in the third wave, COVID-19 has

been a critical medical services challenge [3]. Numerous closures in various businesses

have been brought about by this pandemic. What's more, numerous areas, for example,

upkeep undertakings and framework development have not been suspended attributable

to their huge impact on people groups routine life [4, 5]. At this point, the infection has

quickly spread to most of the nations overall [2]. Around the world, as of 4:50pm CET, 19

November 2021, there have been 255,324,963 affirmed instances of COVID-19, including

5,127,696 passings, answered to WHO. Starting at 17 November 2021, a sum of

7,370,902,499 antibody portions have been managed.

As indicated by the habitats for Disease Control and Prevention (CDC), Covid

contamination is sent overwhelmingly by respiratory beads created when individuals

inhale, talk, hack, or wheeze [3] with normal drop size 510m however spray emanation

increments when people talk and yell noisily [6].

1
In this way, to forestall quick COVID-19 contamination, numerous arrangements, like

repression and lockdowns, are proposed by most of the universes state run

administrations. In any case, this COVID-19 administration inefficacy can be moreover

investigated with game-hypothetical situations past the public products game.

Specifically, a few analysts have zeroed in on the aversion of legislatures in authorizing

troublesome yet essential infection regulation measures (e.g., stay-at-home requests and

lockdowns), just as noncooperation for reasons other than free riding. For example,

creators in [7] contended that in light of the fact that severe stay-at-home measures can

extraordinarily affect people groups livelihoods, the expense of remaining at home

(combined with lockdown weakness) can wind up offsetting the danger of contamination

from going out. As individual-level choices straightforwardly affect the general public level

adequacy of stay-at-home requests, states might refrain fromimplementing them in view

of expected low paces of consistence, particularly from financially hindered people who

don't have the advantage of remaining at home [8]. A few state run administrations might

have likewise been confident that group insusceptibility from recuperations and

immunizations would permit them to try not to force such disliked measures by and

large.

With rising quantities of cases and extended wellbeing offices, just as the absence of an

immunization all through 2020 and hardships related with accomplishing group

insusceptibility for COVID-19 [10], government inaction turned out to be progressively

unviable. Consequently, to expand people groups adherence to severe guidelines, creators

in [7] proposed utilizing social projects, for example, crisis help assets and joblessness

protection to bring down the expenses of consistence, especially for lowerpaid laborers

[11]. As immunizations opened up toward the finish of 2020, creators in [12] contended

that projects driving inoculation take-up will outperform different angles like antibody

viability and seclusion techniques in significance. Utilizing EGT, informal community

investigation, and specialist based displaying, the creators suggested that people

immunization decisionmaking will be impacted by socioeconomics, actual area, the degree

2
of communication, the strength of the antibody, pandemic boundaries, and discernments

about the immunization being presented, and comparatively, the decision-production of

the public authority will be affected by pestilence boundaries, the idea of the antibody

being presented, coordinations, the

the board of HR required for the inoculation exertion, and the quantity of antibody

dosages accessible [12]. In outline, all encompassing COVID-19 administration would

include an enthusiasm for the many variables that adjust settlements so both individual

and legislative choices shift toward security. It is actually the case that COVID-19 is a

worldwide pandemic and influences a few areas. All things considered, it made a way for

specialists in software engineering. We have seen numerous examination points, for

example, making new programmed location techniques for COVID-19 and distinguishing

individuals with or without veils. Taking into account that there are a few blunders in the

aftereffects of the early lab tests and their postponements, scientists zeroed in on various

choices [13]. Thusly, the use of cutting edge man-made reasoning (AI) strategies [14-17]

combined with VGG-16 can prompt a more precise identification of the COVID-19 and

can assist with controlling the issue of loss of particular doctors in separated towns [18].

VGG16 is a convolutional neural organization model proposed by K. Zisserman from the

University of Oxford in the paper Very Deep Convolutional Networks for Large-Scale

Image Recognition. The model accomplishes 92.7% top-5 test precision in ImageNet,

which is a dataset of more than 14 million pictures having a place with 1000 classes.

We are utilizing this model to achive our objective of recognizing fase cover of individuals

at various area for instance in place of business or at air terminal terminals/entryways.

3
1.1. INDUSTRY OVERVIEW

*Excelvisor Technology* ,a technology company pioneer in Industrial IoT, Storage, AI and

other niche technology, and also in Tech Education. Excelvisor has initiated it’s Industry-

Ready-Programs to help trained professionals in the ever demanding corporate market.

Services Excelvisor provides :

1) IT solutions : Explore the right applications that offer a reliable, high-performance

for connectivity, network and security that establishes the growth of your

organization. We are expertise in providing the most efficient solutions, easy to use

applications connected to servers that simplify some of the tasks to work in high-

speed networks. Our sequence of IT solutions includes a range of Storage Area

Networks, Network Attached Storage, Data Backup and Disaster Recovery,

Virtualization, Local Area Network & Wide Area Network, Embedded area as well

as atomization that can give full potential of advanced level performance.

Excelvisor offers flexibility, scalability and availability that improves storage

utilization across the global networks. With fast growing technologies and evolving

demand for application storage and data, we derive strategies that lower upfront

cost, bring up affordability and easy-to-use and saves management time. We are

4
experts in transforming complexity to simplicity IT Solutions to maximize business

gains by following standard protocols.

2) Staff Augmentation : With expertise in IT solutions, we put forward effective

strategy that enables our clients for Staff Augmentation. Our comprehensive team

of consultants enables the process that evaluates skilled and expert candidates

that are able to fulfill the criteria required by assessing the skills. We serve our

clients in managing the complex process to easy transition through our expert

knowledge in the IT industry in recruiting right candidates. Our team is highly

capable of bringing an innovative process that filters the requirements of the

industry and immediate call for talent-hunt by an organization. Excelvisor helps in

minimizing strenuous task of employing staff and seamlessly strategies to acquire

flexibility to all workforce in screening right professionals specialized in different

areas of Information Technology having extensive knowledge across various

domains. Our key advantage in staffing strategies includes hiring a vast pool of

candidates that have a high score of technical skillset, transparency, leveraging

productivity that helps in finding niche talent and to solve staffing challenges.

3) Placement Consulting: Excelvisor Technologies is driven with a core objective to

help companies in ensuring the right recruitment process by finding perfectly

match candidates that fulfill the given job requirements. Our dedication and

enthusiasm is a key advantage in helping skilled candidates to get them right

placement. We evaluate the performance of the candidates and gauge their skills

by providing a conventional strategy for productive workers

5
Products that Excelvisor sells to its esteemed clients

1. DATA CONCENTRATOR UNIT(DCU)

DESCRIPTION

ET-DCU-xC is a data logger from various external devices such as Energy meters, Sensor

Hub etc. It will support industrial protocols like Modbus, DLMS-COSEM (APDRP/AMR),

PACT and Proprietary Protocols. It will store the data time wise in various file format like

csv, JSON, XML etc.

ET-DCU-xC has serial communication interfaces RS232/485/SPI/I2C to communicate

the external devices. It will support single or multiple channels. This device has optional

feature like to push the data to Cloud Server via wired or wireless network connectivity.

FEATURES:

One/Two Ethernet Ports for Server access.

1/2/4/8 Channel for data collection.

6
Web UI – Strong Password Protected, HTTP web access and Remote HTTPS web access

(Optional).

IIOT/IOT Protocol Support – REST and MQTT.

2. COMMUNICATION PRODUCT

REMOTE TERMINAL UNIT(RTU) :

DESCRIPTION

ET-RTU-1600s is designed for remote monitoring of various devices using SCADA. This

device is capable to acquire the data from Multifunction Meters (MFM) using Modbus

protocol and convey to SCADA using IEC 60870-5-104 Slave.

ET-RTU-1600s has RS232/485 for MFM communication and Ethernet (RJ45) for SCADA

communication. Also it has 16 Digital Input which will help monitor the various filed

7
devices like Relay, Circuit Breakers etc. It will perform as a Modbus RTU/TCP Master to

poll the data from MFM energy meter.

ET-RTU-1600s has many add-on (optional) features such as Wireless connectivity

through GPRS/Wi-Fi and Digital Outputs to control external devices. It has capable to

push customized data to Cloud Server.

FEATURES

Two Ethernet Ports for SCADA communication and local network access.

One RS232 / 485 Port for Modbus commination.

Isolated 16 Digital Input.

Firewall Configuration and Traffic Rules.

Web UI – Strong Password Protected, HTTP web access and Remote HTTPS web access

(Optional).

IIOT/IOT Protocol Support – REST and MQTT

3. WIRELESS PRODUCTS :

4G INDUSTRIAL GATEWAY

Name of Product: LAN to Wireless – 4G

Model: ET-LAN2WL-4G

8
DESCRIPTION

ET-LAN2WL-4G is typically used with RTUs/Relays/IEDs to communicate with Server

over the air. It is a compact, rugged unit, it mainly designed to establish communication

between Controlled (RTU, IED, and Relay) and Controlling Station (SCADA) over the air.

ET-LAN2WL-4G is a gateway that provides wireless connectivity over public

GSM/GPRS/3G/4G network to remote devices capable of communicating over LAN.The

device is typically used for remote data acquisition / remote device monitoring and

control. It is totally transparent to the protocols used for communication between the

end-points and principally functions as a gateway providing TCP/IP connectivity for the

end-points. This is equipped with an inbuilt GSM/GPRS/3G/4G modem for providing

wireless connectivity.

BLOG: Excelvisor Career Training & Skills Development Program Blog Official Excelvisor

blogs, be the first to know the evolution of training development program, futuristic

Machine Learning & Artificial Technologies news, articles and blogs, recent job posts, and

companies outlook. Subscribe to our Blog page and keep updated with newbies of tools

and software, batch timings, batch dates on different course modules. Get to know course

curriculum, training classes and best ever tutors from an industrial background.

Excelvisor - a series of providing end-to-end product development program, excellence in

the quality training system, helping people to transform their careers to gain realistic

technology exposure. Join today to unlock the hidden learning potentials and acquire the

knowledge that lasts forever.

Global Scenario : Excelvisor is engaged in global players such as

9
Deckspire : Deckspire is a product development firm focused on building and launching

innovative software products. Our products help businesses across a variety of industries

realize their most important goals.

Makers of Aiva, A virtual chatbot which helps clients organize their customers and focus

on new leads which has following features :

a) Over 200 real estate lead sources supported out of the box

b) Automatically copy your custom Aiva email address on your incoming lead notifications

to send leads in

c) Easily turn on and off lead sources at any time, setup takes just minutes

d) Supports real estate buyers, sellers, renters, and IDX leads

e) Customize scripts based on lead source and lead type.

Deckspire is situated in 36 W 25th St, New York, NY 10010, United States , a 4 min walk

from Madison Square Park.

Indian Scenario :

Excelvisor is enganged with

1)The Seksaria Group : With over eight decades of responsible business practices, our

businesses have grown into global powerhouses in a wide range of sectors .Vision is to

continue to build strong diversified companies for the benefit of all our stakeholders.

2)Kamalakanta Engineering and Construction Company Pvt. Ltd : Kamalakanta

Engineering & Construction Company Private Limited is a Private incorporated on 21 July

2008. It is classified as Non-govt company and is registered at Registrar of Companies,

Cuttack. Its authorized share capital is Rs. 18,000,000 and its paid up capital is Rs.

18,000,000. It is inolved in Building of complete constructions or parts thereof; civil

engineering .

10
Directors of Kamalakanta Engineering & Construction Company Private Limited are

Punya Prava Mohapatra, Subrat Das and Birendra Pratap Swain.

1.2. COMPANY OVERVIEW –

Excelvisor was established in 2015 as a Technology company with an objective of "Driving

Excellence". The vision of the company is to provide cost effective, high quality, innovative

and new technology Products, Services and Training.

Excelvisor has designed and built a wide range of devices in sector of Energy Monitoring

and communication. It is also committed to provide it's customer a cost effective solution

in sector of Industrial automation and Storage area Networking.

The R & D division of Excelvisor is still in make of various IoT devices in sector of Energy

Monitoring, Clean Energy and Domestic usage.

Excelvisor provides the service and training in niche areas. As a service Excelvisor

provides staff augmentation and Placement consultancy to it's clients.

11
The training division of Excelvisor conducts Corporate Training and Skill levelling in

many of the niche area.

Excelvisor Mission

Excelvisor is on a mission to work on industry 4.0 technologies and provide the industry

with high quality, cost effective product, service and Training . As part of the service as

training, Excelvisor provides the careers of both individuals and organizations by

providing well-researched training courses that will enable them to excel immensely. The

products and services are custom-made to deliver high-yielding results to the clients and

their organizations. Our primary mission is to improve and empower the candidates’ skills

that will be fit for the I.T. industry.

Our Vision

With an aim to add value to all our business line as Product, Service and Niche skill

training, our primary aim is to deliver excellence. With our strong and dedicated vision,

we endeavor to build transparent and long-term relationships with our clients. Our high-

quality services and products are administered seamlessly to the organizations enabling

them of nothing but perfection. The R&D department takes pride in its effective and

committed team members who make sure that the product quality surpasses client

expectations. Focusing on innovative strategies to develop unique products and services,

the team members of Excelvisor ensure that newfound methods are used to come up with

solutions that will help both the organizations and trainees. The Training courses are

designed in a meticulous manner to enhance the career opportunities of newcomers,

which helps the them attaining high level in industry. Offering premium quality and

innovative products and services in energy monitoring, clean energy and domestic usage

sector, Excelvisor makes use of the latest technology to yield enhanced results. The team

members are updated with the newest tech and are able to carry out their work

effortlessly. Excelvisor Technologies are highly dedicated to providing cost-effective and

high-quality products and services that will provide optimized solutions to clients.

12
Product and Services

ExcelvisorTechnologies is a distinguished Embedded Product Development Company

based in Bangalore with an objective “driving the excellence” providing communication

and automation solutions to the power sector.

Our skilled and experienced team, which is always curious and looking forward for new

innovation in this sector, we have been very successful in providing cost effective and

robust solutions.

Excelvisor Provides Staff Augmentation and Software consulting Services in various

Skills.Excelvisor Technologies is driven with a core objective to help companies in

ensuring the right recruitment process by finding perfectly match candidates that fulfill

the given job requirements.With expertise in IT solutions, we put forward effective strategy

that enables our clients for Staff Augmentation. Explore the right applications that offer a

reliable, high-performance for connectivity, network and security that establishes the

growth of your organization.

SWOT of the Company

Strength:

 Excelvisor key advantage in staffing strategies includes hiring a vast pool of

candidates that have a high score of technical skillset, transparency, leveraging

productivity that helps in finding nice talent and to solve staffing challenges.

 They are experts in transforming complexity to simplicity IT Solutions to maximize

business gains by following standard protocols.

 They evaluate the performance of the candidates and gauge their skills by

providing a conventional strategy for productive workers.

Weakness:

 Not well equiped in terms of infrastructure.

 Internal communication media is not safe.

13
 Training resource could have been improved.

 Not enough material and accessiability

Opportunity:

 Company explore the right applications that offer a reliable high-performance for

connectivity, network and security that establishes the growth of IT services.

 They put forward effective strategy that enables our clients for Staff Augmentation.

 Excelvisor Technologies is driven with a core objective to help companies in

ensuring the right recruitment process by finding perfectly match candidates that

fulfill the given job requirements.

Threats

 Competitor with a new program and technology.

 New rules and techniques that has to be adabpted.

 Proper resource person for the solution.

2. PROJECT PROFILE

Deep learning is an important breakthrough in the AI field. It has recently shown

enormous potential for extracting tiny features in image analysis. Due to the COVID-19

epidemic, some deep learning approaches have been proposed to detect patients infected

with coronavirus. In this context, and unlike bacterial pneumonia, many other types of

lung infections caused by viruses are called viral pneumonia. These viruses, such as the

COVID-19, infect the lungs by blocking the oxygen flow, which can be life-threatening.

This motivated researchers to develop many frameworks and schemes based on AI tools

in the fight against this dangerous virus. Hence, we divide this section into two sections

to provide an in-depth overview of the proposed techniques.

2.1. OBJECTIVES OF THE STUDY

14
We will build a real-time system to detect whether the person on the webcam is wearing a

mask or not. The dataset consists of 1376 images with 690 images containing images of

people wearing masks and 686 images with people without masks.

A model is created using datasets with mask and without mask. To identify people on

camera without mask and send an alert to the respective authorities, with the picture of

the person without mask.

 A model is created using datasets with mask and without mask.

 To identify people on camera without mask and send an alert to the respective

authorities, with the picture of the person without mask.

As the coronavirus is spreading rapidly, the World Health Organization has suggested to

maintain social distance and to wear facemasks.

In support of the ongoing fight against this infectious disease, we are motivated to

generate new insights, by providing information about the people who don’t wear

facemasks, using deep learning techniques.

Corona virus has affected every single individual over the globe. Every individual is taking

fundamental measures to decrease its effect.

Our project is to prepare a data set which would detect whether a person on the camera

is wearing a Face Mask or not and sends an alert to the security or the people who are

monitoring it.

2.2. METHODOLOGY

VGG-16

15
VGG16 is a convolutional neural organization model proposed by K. Simonyan and A.

Zisserman from the University of Oxford in the paper Very Deep Convolutional Networks

for Large-Scale Image Recognition. The model accomplishes 92.7% top-5 test precision in

ImageNet, which is a dataset of more than 14 million pictures having a place with 1000

classes. It was one of the renowned model submitted to ILSVRC-2014. It makes the

improvement over AlexNet by supplanting enormous piece measured channels (11 and 5

in the first and second convolutional layer, individually) with numerous 33 portion

estimated channels in a steady progression. VGG16 was prepared for a really long time

and was utilizing NVIDIA Titan Black GPUs.

Figure : VGG-16

Datasets

Datasets were given to us by Excelvisor Technologies LPP. Two set of datasets composed

of faces of various people from different parts of the world and of all age groups. One set

of dataset consists of faces of people with mask. Other set of dataset consists of faces of

people without mask.

ImageNet is a dataset of more than 15 million marked high-goal pictures having a place

with around 22,000 classifications. The pictures were gathered from the web and marked

by human labelers utilizing Amazons Mechanical Turk publicly supporting instruments.

Beginning in 2010, as a component of the Pascal Visual Object Challenge, a yearly rivalry

called the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) has been held.

ILSVRC utilizes a subset of ImageNet with approximately 1000 pictures in every one of

1000 classifications. By any means, there are generally 1.2 million preparing pictures,

50,000 approval pictures, and 150,000 testing pictures. ImageNet comprises of variable-

16
goal pictures. Consequently, the pictures have been down-inspected to a proper goal of

256256. Given a rectangular picture, the picture is rescaled and trimmed out the focal

256256 fix from the subsequent picture.

Workflow Diagram:

Dataset with facemask :

17
Dataset without facemask:

The Architecture

18
The architecture depicted below is VGG16.

Figure 2: VGG16 Architecture

The contribution to cov1 layer is of fixed size 224 x 224 RGB picture. The picture is gone

through a heap of convolutional (conv.) layers, where the channels were utilized with a

tiny responsive field: 33 (which is the littlest size to catch the idea of left/right, up/down,

focus). In one of the setups, it additionally uses 11 convolution channels, which can be

viewed as a straight change of the info channels (trailed by non-linearity). The convolution

step is fixed to 1 pixel; the spatial cushioning of conv. layer input is with the end goal that

the spatial goal is protected after convolution, for example the cushioning is 1-pixel for 33

conv. layers.

Spatial pooling is finished by five max-pooling layers, which follow a part of the conv.

layers (not all the conv. layers are trailed by max-pooling). Max-pooling is performed over a

22 pixel window, with step 2.

Three Fully-Connected (FC) layers follow a heap of convolutional layers (which has an

alternate profundity in various models): the initial two have 4096 channels each, the third

performs 1000-way ILSVRC arrangement and hence contains 1000 channels (one for each

19
class). The last layer is the fragile max layer. The design of the completely associated

layers is something very similar in all organizations.

All secret layers are outfitted with the correction (ReLU) non-linearity. It is likewise noticed

that none of the organizations (with the exception of one) contain Local Response

Normalization (LRN), such standardization doesn't work on the presentation on the

ILSVRC dataset, yet prompts expanded memory utilization and calculation time.

Configurations

The ConvNet designs are illustrated in figure 2. The nets are alluded to their names (A-E).

All arrangements follow the nonexclusive plan present in engineering and vary just in the

profundity: from 11 weight layers in organization A (8 conv. what's more, 3 FC layers) to

19 weight layers in the organization E (16 conv. what's more, 3 FC layers). The width of

conv. layers (the quantity of channels) is fairly little, beginning from 64 in the primary

layer and afterward expanding by a component of 2 after each maximum pooling layer,

until it comes to 512.

20
Figure: ConvNet Configuration

Use-Cases and Implementation

Sadly, there are two significant disadvantages with VGGNet:

 It is agonizing to prepare.

 The organization design loads themselves are very enormous (concerning

plate/data transmission).

Because of its profundity and number of completely associated hubs, VGG16 is over

533MB. This makes sending VGG a tedious task.VGG16 is utilized in many profound

learning picture characterization issues; be that as it may, more modest organization

21
structures are regularly more alluring (like SqueezeNet, GoogLeNet, and so forth) In any

case, it is an incredible structure block for learning reason as it is not difficult to execute.

Neural Network

Neural networks are a set of calculations enlivened by the working of human brian. By

and large when you open your eyes, what you see is called information and is handled by

the Neurons(data handling cells) in your mind, and perceive what is around you. That is

the way comparative the Neural Networks works. They take an enormous arrangement of

information, process the data(draws out the examples from information), and yields what

it is.

Why use Neural networks?

Neural networks, with their astounding capacity to get significance from muddled or

uncertain information, can be utilized to remove designs and recognize patterns that are

too mind-boggling to be in any way seen by one or the other people or other PC strategies.

A prepared neural network can be considered as a specialist in the class of data it has

been given to investigate. This master would then be able to be utilized to give projections

offered new circumstances of interest and response imagine a scenario where questions.

Different benefits include:

Adaptive learning: A capacity to figure out how to finish undertakings dependent on the

information given for preparing or introductory experience.

Self-Organization: An ANN can make its own association or portrayal of the data it gets

during learning time.

Network layers

The commonest kind of fake neural organization comprises of three gatherings, or layers,

of units: a layer of info units is associated with a layer of stowed away units, which is

associated with a layer of yield units.

22
Input units:- The action of the info units addresses the crude data that is taken care of

into the organization. this is likewise called the input layer.

Hidden units:- The movement of each secret unit is dictated by the exercises of the info

units and the loads on the associations between the information and the secret units. this

is additionally called stowed away layer.

Output units:- The conduct of the yield units relies upon the movement of the secret

units and the loads between the covered up and yield units. this is additionally called the

yield layer.

Figure: Nueral Network with Input layer, Hiddenlayer, Output layer

you can actually look at a few other Neural networks and their layers here. with the goal

that you will come to know what they look like.

This basic kind of organization is fascinating in light of the fact that the secret units are

allowed to develop their own portrayals of the information. The loads between the

information and secret units decide when each secret unit is dynamic, thus by changing

these loads, a secret unit can pick what it addresses.

23
Before we investigate whole/Deep Neural Network gives look access to a solitary neuron.

A Single Neuron

The essential unit of calculation in a neural organization is the neuron, frequently called

as a hub or unit. It gets input from some different hubs, or from an outer source and

processes a yield. Each information has a related weight (w), which is alloted based on its

overall significance to different data sources. The hub applies a capacity f (characterized

beneath) to the weighted amount of its contributions as in figure underneath.

The above network takes numerical inputs X1 and X2 and has weights w1 and w2

associated with those inputs. Additionally, there is another input 1 with weight b (called

the Bias) associated with it.

We are using few python bundles to take our work further. What's more, the principle

bundles that are significant for implementing deep learning project is Tensorflow and

Keras.

24
TensorFlow is a end-to-end open-source stage for AI. Its a complete and adaptable

biological system of apparatuses, libraries and different assets that furnish work

processes with significant level APIs. The system offers different degrees of ideas for you to

pick the one you really want to construct and send AI models.

For example, assuming you want to do some huge AI undertakings, you can utilize the

Distribution Strategy API to perform circulated equipment arrangements and in case you

really want a full creation AI pipeline, you can basically utilize TensorFlow Extended

(TFX). A portion of the striking highlights are depicted underneath:

Simple Model Building: TensorFlow offers numerous degrees of deliberation to construct

and prepare models.

Hearty ML Production Anywhere: TensorFlow allows you to prepare and send your

model effectively, regardless language or stage you use.

Incredible Experimentation For Research: TensorFlow gives you adaptability and

control with highlights like the Keras Functional API and Model Subclassing API for the

production of intricate geographies.

Keras, then again, is a significant level neural organizations library that is running on the

highest point of TensorFlow, CNTK, and Theano. Utilizing Keras in profound learning

considers simple and quick prototyping just as running consistently on CPU and GPU.

This structure is written in Python code which is not difficult to troubleshoot and permits

ease for extensibility. The main advantages of Keras are described below:

 User-Friendly: Keras has a simple, consistent interface optimized for common use

cases which provides clear and actionable feedback for user errors.

 Modular and Composable: Keras models are made by connecting configurable

building blocks together, with few restrictions.

 Easy To Extend: With the help of Keras, you can easily write custom building

blocks for new ideas and researches.

25
 Easy To Use: Keras offers consistent & simple APIs which helps in minimizing the

number of user actions required for common use cases, also it provides clear and

actionable feedback upon user error.

26
3. OBSERVATIONS & ANALYSIS

Beofre VGG16

Lets start with a simple CNN

27
Lets evaluate the model.

28
As you can see the exactness of the validation set is around 75-80% so let's attempt to

further develop this model utilizing VGG16.

I have made another consecutive model with every one of the layers of VGG16 aside from

the last thick layer as it gives 1000 results however we want just two. Additionally, I'm not

preparing loads at each layer as the VGG16 is very useful for picture arrangement of

course. So our last model resembles this.

After VGG16

29
As you can see the accuracy has gone to 85% whereas loss is decreasing by each epoch.

Lets put this to a test.

30
31
Computer Vision

OpenCV is an extremely renowned library for computer vision and picture handling

undertakings. It is quite possibly the most utilized python open-source library for

computer vision and picture information.

It is utilized in different undertakings, for example, picture denoising, picture

thresholding, edge discovery, corner location, forms, picture pyramids, picture division,

face recognition, and some more.

32
4. RESULTS

VGG16 Beofre VGG16

Lets start with a simple CNN

Lets evaluate the model.

33
34
As you can see the exactness of the validation set is around 75-80% so let's attempt to

further develop this model utilizing VGG16.

I have made another consecutive model with every one of the layers of VGG16 aside from

the last thick layer as it gives 1000 results however we want just two. Additionally, I'm not

preparing loads at each layer as the VGG16 is very useful for picture arrangement of

course. So our last model resembles this.

35
After VGG16

As you can see the accuracy has gone to 85% whereas loss is decreasing by each epoch.

Lets put this to a test.

36
37
5. RECOMMENDATIONS /FUTURE DIRECTIONS

Besides the successful implementation of AI models in other domains of image processing

and computer vision, its use in detecting COVID-19 face masks in the real world is still

nascent. Face mask detection has been a difficult task in the domain of image processing

especially during the COVID-19 pandemic because of diversified mask types, various

camera pixels, different degrees of obstructions, various variations(such as mall sizes,

pose variation, shadows, illumination, angle of view, and rotation) , balancing various

model detection accuracy or errors and real-time requirements , deployment of detection

model on computers with limited processing power, low-resolution images, facial

expression, lack of real-world dataset, and the storage space required to manage image

database.

This study also deducted that deeper and wider deep learning architectures with

increased training parameters, such as inception-v4, Mask R-CNN, Faster R-CNN,

YOLOv3, Xception, and DenseNet are not yet implemented to detect face masks.

Therefore, future work will focus on the implementation of these models as a comparative

study to detect COVID-19 face masks.

Also, from the analysis, we deduced that most of these datasets do not represent the real

world because they are artificially created which ultimately affects the precision accuracy

of the model when deployed in the real world . This is because they are few face mask

datasets were given to us by Excelvisor Technologies LLP for training deep learning and

machine learning models to detect COVID-19 face masks. This influences the

performance of deep learning and machine learning models, especially when deployed in

real-world, dynamic environments and various facemask-wearing conditions. DL and

machine learning models rely on datasets for training, accuracy, and extracting

meaningful insights.

38
The study deducted that most of the datasets used to detect face masks are static in

nature, do not represent most of the real-world environments which ultimately affect the

precision accuracy of the model. This influences the performance of deep learning and

machine learning models, especially when deployed in dynamic environments and various

facemask-wearing conditions. The outbreak of infectious pandemics like COVID-19 is

inevitable in the future , therefore, there is a need for sharing real-world COVID-19 face

mask images for modelling deep learning techniques. The future work may focus on

strategies ways to share real-world COVID-19 face mask images for modelling deep

learning techniques which will further assist develop high precision real-time automatic

face masks detection systems. Such systems could be deployed in dynamic environments

and various facemask-wearing conditions. Also, future work may apply deeper and wider

deep learning architectures with increased training parameters, such as inception-v4,

inception5h, Mask R-CNN, Faster R-CNN, YOLOv4, Xception, and DenseNet are not yet

implemented to detect face masks.

39
6. CONCLUSION

Gathered the datasets of individuals with and without facemask from Excelvisor

Technologies. Prepared the facemask classifier utilizing Keras/Tensor stream. Made a

model utilizing the datasets. The assembled model is stacked. Cameras are turned on.

CV2 identifies faces, faces are separated. We have built our model and it is utilized to

distinguish the facemasks. In the event that the cover isn't distinguished, it catches the

picture of the individual on the web-cam.

Our review not just screens an individual who doesnt wear a veil, yet additionally let the

experts in on who are not wearing it, so that move can be made quickly, which is

significant for the anticipation of irresistible infections, i.e Covid in people in general.

This research focuses on the face recognition of a person wearing a mask. The

coronavirus pandemic forces us to continue to carry out health protocols, namely wearing

masks when on the move, especially working. We propose the use of transfer learning

techniques for facial feature extraction and classification according to identity. The

results showed that the VGG16 transfer learning model was better than CNN, with an

accuracy of 85%. These results indicate that using the webcam of our system.

These results indicate that using the VGG16 model is better in classifying 35 different

people's identities. This study also uses only one deep learning model, which is

undoubtedly more efficient than previous studies using two deep learning models. The

40
accuracy value also increased by 0.92% compared to previous studies. Future research

can be developed on real-time video data so that the data processing speed can be known.

LEARNING OUTCOME

It's anything but a stretch to say temporary jobs have become vital. The opposition for

occupations has never been stiffer. In late examinations, businesses have demonstrated a

draw towards those with pertinent experience before graduate versus those without. So

how would you get significant experience? Internship.

Internship give you understanding into your dream industry, organization, develop your

pragmatic information and give you an upper hand over your companions. Sounds

extraordinary, yet there's something key we are absent…

As an intern, don’t expect to spearhead a critical project right off the bat…at least not yet.

In the start of internship, we took time essentially attempting to figure out how the

organization functions. we did shadow a work that get a comprehension of the job.

Following a day or a couple of long stretches of learning the intricate details of the

organization. We start to assist and contribute more to the team.

Here are some day-to-day intern roles and responsibilities:

Performing administrative obligations: Creating PowerPoint introductions, drafting

reports, planning creatives, investigating patterns and so forth.

Occasion dealing with: Interns are frequently approached to regulate the planning of

significant occasions. You may requested to assist with getting everything ready for a

41
significant. From tying down the area to helping the making of a topic to obtaining your

key speakers.

Assesments: Performing training and completing assessments that shows the

improvement and performane graph of individual interns.

Research: Interns straight from a college degree have a lot of exceptional information.

Your association might effectively utilize this information by setting you in an exploration

job. You might be approached to investigate another task and give your suggestions on

how best to execute it.

ANNEXURE

SPECIFICATIONS

HARDWARE

PC-

RAM: Ram range of 8 GB to 16 BG is required.

CPU: Processor above Intel Core i5, i7, 5th, 7th Generation.

HDD: HDD space of 1TB to 2TB. rdWare:

SOFTWARE

 Operating System: Windows 10

 Web Brower: installed any web Brower in your PC like Chrome, Fire Fox or any

one web Brower.

 Python IDLE

 Jupyter Notebook

Technology used:

Python Programming: Jupyter Notebook / Spyder

Python is a deciphered undeniable level broadly useful programming language. Its plan

theory accentuates code clarity with its utilization of critical space. Its language builds

just as its item arranged methodology expect to assist developers with composing clear,

coherent code for little and enormous scope projects.

42
Jupyter Notebook/ Spyder:

The Jupyter Notebook/ Spyder is an open-source web application that permits you to

make and share records that contain live code, conditions, perceptions and story text.

Utilizes include: information cleaning and change, mathematical recreation, factual

demonstrating, information representation, AI, and considerably more.

PROGRAM : Code

import os

import random

import shutil

import tensorflow as tf

from tensorflow.keras.preprocessing.image import ImageDataGenerator

from tensorflow.keras.layers import Conv2D, Input, ZeroPadding2D, BatchNormalization,

Activation, MaxPooling2D, Flatten, Dense

from tensorflow.keras.models import Model, load_model

from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint

from tensorflow.keras import optimizers

from sklearn.metrics import precision_score,recall_score,classification_report

from sklearn.utils import shuffle

import numpy as np

import matplotlib.pyplot as plt

import matplotlib.image as mpimg

#### Reading the image files

43
TRAINING_DIR = r"C:\Users\sipan\OneDrive\Desktop\Excelvisor\Intern_Project\Real

time Face Mask Detection\FaceMaskDetection-Project\FaceMaskDetection-

project\train\train"

VALIDATION_DIR = r"C:\Users\sipan\OneDrive\Desktop\Excelvisor\Intern_Project\Real

time Face Mask Detection\FaceMaskDetection-Project\FaceMaskDetection-

project\test\test"

train_datagen = ImageDataGenerator(rescale=1.0/255,

rotation_range=40,

width_shift_range=0.2,

height_shift_range=0.2,

shear_range=0.2,

zoom_range=0.2,

horizontal_flip=True,

fill_mode='nearest')

train_generator = train_datagen.flow_from_directory(TRAINING_DIR,

batch_size=10,

target_size=(224, 224),

class_mode='categorical')

validation_datagen = ImageDataGenerator(rescale=1.0/255)

validation_generator = validation_datagen.flow_from_directory(VALIDATION_DIR,

batch_size=4,

shuffle=False,

target_size=(224, 224),

44
class_mode='categorical')

checkpoint = ModelCheckpoint('model-

{epoch:03d}.model',monitor='val_loss',verbose=0,save_best_only=True,mode='auto')

#### Buliding Initial Model

model = tf.keras.models.Sequential([

tf.keras.layers.Conv2D(32, (3,3), activation='relu', input_shape=(224, 224, 3)),

tf.keras.layers.MaxPooling2D(2,2),

tf.keras.layers.Flatten(),

tf.keras.layers.Dense(2, activation='softmax')

])

opt = optimizers.Adam(learning_rate=0.001)

model.compile(optimizer=opt, loss='categorical_crossentropy', metrics=['acc'])

model.summary()

history = model.fit(train_generator,

epochs=5,

validation_data=validation_generator

,callbacks=[checkpoint])

#### Plotting the model accuracy and loss

45
loss = history.history['loss']

val_loss = history.history['val_loss']

acc = history.history['acc']

val_acc = history.history['val_acc']

epochs = range(1, len(loss) + 1)

# plotting accuracy

plt.plot(epochs, acc, color='blue', label='Training')

plt.plot(epochs, val_acc, color='green', label='Validation')

plt.title('Training and Validation accuracy')

plt.xlabel('Epochs')

plt.ylabel('Accuracy')

plt.legend()

plt.show()

# plotting loss

plt.plot(epochs, loss, color='orange', label='Training')

plt.plot(epochs, val_loss, color='red', label='Validation')

plt.title('Training and Validation loss')

plt.xlabel('Epochs')

plt.ylabel('Loss')

plt.legend()

plt.show()

#### Creatng Improved model

46
We are going to use VGG16 model here

vgg16_model=tf.keras.applications.vgg16.VGG16()

vgg16_model.summary() #lets look at summary.

# Checking the type of model

type(vgg16_model)

#### Couple of things that need to be changes.

1. We need a sequential model unlike VGG16

2. The last Dense layer in VGG16 has 1000 ouputs but we need only two

# So we will create a blank sequential model and then add layers from VGG16 except last

one

improved_model =tf.keras.models.Sequential()

for layer in vgg16_model.layers[:-1]:

improved_model.add(layer)

improved_model.summary()

# By Default the VGG16 layers are well trained for image classification so no need to

update the weights at each layer.

for layer in improved_model.layers:

layer.trainable=False

# Adding dense layer with 2 outputs

improved_model.add(tf.keras.layers.Dense(2, activation='softmax'))

opt = optimizers.Adam(learning_rate=0.001)

47
improved_model.compile(optimizer=opt, loss='categorical_crossentropy', metrics=['acc'])

#Lets look at the final model summary.

improved_model.summary()

history = improved_model.fit(train_generator,

epochs=10,

validation_data=validation_generator

,callbacks=[checkpoint])

#### Evaluating Improved Model

loss = history.history['loss']

val_loss = history.history['val_loss']

acc = history.history['acc']

val_acc = history.history['val_acc']

epochs = range(1, len(loss) + 1)

# plotting accuracy

plt.plot(epochs, acc, color='blue', label='Training')

plt.plot(epochs, val_acc, color='green', label='Validation')

plt.title('Training and Validation accuracy')

plt.xlabel('Epochs')

plt.ylabel('Accuracy')

plt.legend()

plt.show()

# plotting loss

48
plt.plot(epochs, loss, color='orange', label='Training')

plt.plot(epochs, val_loss, color='red', label='Validation')

plt.title('Training and Validation loss')

plt.xlabel('Epochs')

plt.ylabel('Loss')

plt.legend()

plt.show()

#from keras.models import load_model

import cv2

labels_dict={0:'With Mask',1:'Without Mask'}

color_dict={0:(0,255,0),1:(0,0,255)}

size = 4

webcam = cv2.VideoCapture(0) #Use camera 0

frame_width = int(webcam.get(3))

frame_height = int(webcam.get(4))

size1 = (frame_width, frame_height)

# Below VideoWriter object will create

# a frame of above defined The output

# is stored in 'filename.avi' file.

49
result1 = cv2.VideoWriter('capture.avi',

cv2.VideoWriter_fourcc(*'MJPG'),

10, size1)

# We load the xml file

classifier = cv2.CascadeClassifier(r'C:/Users/sipan/anaconda3/Lib/site-

packages/cv2/data/haarcascade_frontalface_default.xml')

while True:

(rval, im) = webcam.read()

im=cv2.flip(im,1,1) #Flip to act as a mirror

# Resize the image to speed up detection

mini = cv2.resize(im, (im.shape[1] // size, im.shape[0] // size))

# detect MultiScale / faces

faces = classifier.detectMultiScale(mini)

# Draw rectangles around each face

for f in faces:

(x, y, w, h) = [v * size for v in f] #Scale the shapesize backup

#Save just the rectangle faces in SubRecFaces

face_img = im[y:y+h, x:x+w]

50
resized=cv2.resize(face_img,(224,224))

normalized=resized/255.0

reshaped=np.reshape(normalized,(1,224,224,3))

reshaped = np.vstack([reshaped])

result=improved_model.predict(reshaped)

label=np.argmax(result,axis=1)[0]

cv2.rectangle(im,(x,y),(x+w,y+h),color_dict[label],2)

cv2.rectangle(im,(x,y-40),(x+w,y),color_dict[label],-1)

cv2.putText(im, labels_dict[label], (x, y-10),cv2.FONT_HERSHEY_SIMPLEX,0.8,

(255,255,255),2)

result1.write(im)

# Show the image

cv2.imshow('LIVE', im)

key = cv2.waitKey(10)

# if Esc key is press then break out of the loop

if key == 27: #The Esc key

break

# Stop video

webcam.release()

result1.release()

# Close all started windows

cv2.destroyAllWindows()

51
REFERENCES

We have followed few reference which is mentioned below.

1. B. QIN, D. LI, identifying facemask-wearing condition using image super-

resolution with classification network to prevent covid-19 (2020)

2. H. Li, Z. Lin, X. Shen, J. Brandt, G. Hua, in Proceedings of the IEEE conference on

computer vision and pattern recognition (2015), pp. 5325–5334

3. W. Liu, Z. Wang, X. Liu, N. Zeng, Y. Liu, F.E. Alsaadi, A survey of deep neural

network architectures and their applications, Neurocomputing 234, 11 (2017)

4. Yang xin, Lingshuang Kong, Zhi Liu, Yuling Chen, Yanmiao Li, Hongliang Zhu, et

al., "Machine Learning and Deep Learning Methods for Cyber security", IEEE

Access, vol. 6, pp. 35365-35381, May 2018.

5. Yann LeCun, Yoshua Bengio and Geoffrey Hinton, "Deep Learning", NATURE, vol.

521, May 2015.

52

You might also like