0% found this document useful (0 votes)
133 views49 pages

Team-39 Mini Project Documentation

This document is a mini-project report submitted by 4 students to JNTU Hyderabad for their Bachelor of Technology degree. It describes the development of an interactive web application to track COVID-19 protocols in real-time. The application uses deep learning techniques like convolutional neural networks to detect and classify whether people are wearing masks properly from camera footage. The students trained and evaluated the model on a dataset of 4000 images, achieving 98% accuracy. The project was completed under the guidance of their professor Mrs. S. Priyanka.

Uploaded by

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

Team-39 Mini Project Documentation

This document is a mini-project report submitted by 4 students to JNTU Hyderabad for their Bachelor of Technology degree. It describes the development of an interactive web application to track COVID-19 protocols in real-time. The application uses deep learning techniques like convolutional neural networks to detect and classify whether people are wearing masks properly from camera footage. The students trained and evaluated the model on a dataset of 4000 images, achieving 98% accuracy. The project was completed under the guidance of their professor Mrs. S. Priyanka.

Uploaded by

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

A Mini-Project Report

On
An Interactive Web-based application to track COVID-19 protocols
in real-time.
Submitted to JNTU HYDERABAD
In Partial Fulfillment of the requirements for the Award of Degree of

BACHELOR OF TECHNOLOGY IN
COMPUTER SCIENCE & ENGINEERING
(ARTIFICIAL INTELLIGENCE & MACHINE LEARNING)

Submitted By

MADISHETTY VENKAT SAI 208R1A66F0


GHOGIKAR SUSHMITHA 208R1A66D5
PASHAM AKSHITH REDDY 208R1A66G0
RAVURI CHENNAKESWARI 208R1A66G5

Under the guidance of


Mrs. S. Priyanka
Assistant Professor, Department of CSE (AI & ML)

Department of Computer Science & Engineering (AI & ML)


CMR ENGINEERING COLLEGE
Approved by AICTE, NEW DELHI, Affiliated to JNTU, Hyderabad)
Kandlakoya, Medchal Road, R.R. Dist. Hyderabad-501 401)
2022-2023
CMR ENGINEERING COLLEGE
(Accredited by NBA, Approved by AICTE NEW DELHI, Affiliated to JNTU,
Hyderabad)
Kandlakoya, Medchal Road, Hyderabad-501 401
Department of Computer Science & Engineering (AI & ML)
CERTIFICATE

This is to certify that the project entitled “An Interactive Web-based Application to Track
COVID-19 Protocols in real time” is a bonafide work carried out by

MADISHETTY VENKAT SAI 208R1A66F0


GHOGIKAR SUSHMITHA 208R1A66D5
PASHAM AKSHITH REDDY 208R1A66G0
RAVURI CHENNAKESWARI 208R1A66G5

In partial fulfillment of the requirement for the award of the degree of BACHELOR
OF TECHNOLOGY in COMPUTER SCIENCE & ENGINEERING (AI&
ML) from CMR Engineering College, under our guidance and supervision.

The results presented in this project have been verified and are found to be
satisfactory. The results embodied in this project have not been submitted to any
other university for the award of any other degree or diploma.

________________ _______________________
Internal Guide Head of the Department
Mrs. S. PRIYANKA Dr. M. KUMARASWAMY
Assistant Professor Professor & HOD
Department of CSE (AI&ML), Department of CSE (AI&ML),
CMREC, Hyderabad CMREC, Hyderabad
DECLARATION

This is to certify that the work reported in the present project entitled "COVID-19 MASK
MONITORING SYSTEM" is a record of bonafide work done by me in the Department of
Computer Science & Engineering (AI&ML), CMR Engineering College. The reports are based on
the project work done entirely by me and not copied from any other source. I submit my project
for further development by any interested students who share similar interests to improve the
project in the future.

The results embodied in this project report have not been submitted to any other University
or Institute for the award of any degree or diploma to the best of our knowledge and belief.

MADISHETTY VENKAT SAI 208R1A66F0


GHOGIKAR SUSHMITHA 208R1A66D5
PASHAM AKSHITH REDDY 208R1A66G0
RAVURI CHENNAKESWARI 208R1A66G5
ACKNOWLEDGEMENT

We are extremely grateful to Dr. A. Srinivasula Reddy, Principal, and Dr. M. Kumara
Swamy, HOD, Department of CSE (AI & ML), CMR Engineering College for their constant support.
We are extremely thankful to Mrs. S. Priyanka, Assistant Professor, Internal Guide,
Department of CSE(AI&ML), for her constant guidance, encouragement, and moral support
throughout the project. We will be failing in duty if we do not acknowledge with thanks to the
authors of the references and other literature referred in this Project.
We express our thanks to all staff members and friends for all the help and coordination
extended in bringing out this project successfully in time.
Finally, we are very much thankful to our parents who guided us through every step.

MADISHETTY VENKAT SAI 208R1A66F0


GHOGIKAR SUSHMITHA 208R1A66D5
PASHAM AKSHITH REDDY 208R1A66G0
RAVURI CHENNAKESWARI 208R1A66G5
CONTENTS

TOPIC PAGE NO

ABSTRACT I

LIST OF FIGURES II

1. INTRODUCTION 1
1.1. Introduction & Objectives 1

1.2. Project Objectives 3


1.3. Purpose of the project 4
1.4. Existing System with Disadvantages 4
1.5. Proposed System with Features 8
1.6. Input and Output Design 14

LITERATURE SURVEY 16

2. SOFTWARE REQUIREMENT ANALYSIS 10


2.1. Problem Specification 10
2.2. Modules and their Functionalities 10
2.3. Feasibility Study 11

3. SOFTWARE & HARDWARE REQUIREMENTS 17


3.1. Software Requirements 20
3.2. Hardware Requirements 20

4. SOFTWARE DESIGN 21
4.1. System Architecture 21
4.2. UML Diagrams 22

5. CODING AND IMPLEMENTATION 26

5.1. Source code 26


5.2. Implementation 33
5.2.1.
Python 33
Modules used in Project
5.2.2.
33
6. SYSTEM TESTING 37

7. OUTPUT SCREENS 38

8. CONCLUSION 40

9. FUTURE ENHANCEMENTS 41

10. REFERENCES 42

11. BIBLIOGRAPHY 42
ABSTRACT

At the end of 2019, World witnessed the outbreak of Coronavirus Disease 2019 (COVID-19).
Studies have proved that wearing a face mask significantly reduces the risk of viral transmission as well
as provides a sense of protection. We introduce a Deep Learning based system that can detect instances
where face masks are not used properly. Our system consists of a dual-stage Convolutional Neural
Network (CNN) architecture capable of detecting masked and unmasked faces and can be integrated with
pre-installed CCTV cameras. The model is trained and evaluated using the Kaggle data set. The gathered
data set comprises approximately 4,000 pictures and attained a performance accuracy rate of 98%.

Keywords — Deep learning, Artificial Intelligence, Region-based Convolutional Neural


Networks (CNN), Data Sets.

I
LIST OF FIGURES

S.NO FIGURE NO DESCRIPTION PAGENO

1 1.1 Basic block diagram of detection and 1


Tracking
2 1.5.1 Block diagram of the Proposed system 8

3 1.5.2 Block Diagram of Deep Neural Network 10

4 1.5.3 Deep Learning Algorithm 11

5 3.1 Dataset 18

6 5.1 System architecture 21

7 5.4.1 Sequence diagram 23

8 5.4.2 Use case diagram 24

9 5.4.3 Activity diagram 25

Output-110 8.1
(objects are detected, 38
classified, labeled, and counted)
Input Screen-1 (Images are Taken) 38
11 8.2
Output Screen-2 (Images are 39
detected, classified, labeled,
12 8.3 and counted)

Data Sets are visualized under graph 39


13 8.4

Data Set Values 39


14 8.5
LIST OF TABLES

S.NO TABLE NO DESCRIPTION PAGENO

1 7.1 Test Cases 37

1
1. INTRODUCTION

Introduction & Objectives

Technologies in fields like Machine Learning, Deep Learning, and Artificial Intelligence
have made our lives easier and provide solutions to several complex problems in various areas. This
model helps in reducing the manpower and will recognize the Masked and Non-masked people
through live video streams where there are overly crowded places like Educational Institutions,
shopping malls, Companies, etc.,

Fig. 1.1: Basic block diagram of detection and Tracking

In response to this challenge, we introduce a state-of-the-art Deep Learning-based system


designed to detect instances where face masks are not being used correctly. This system represents
a technological innovation with the potential to contribute significantly to public health and safety
by enhancing compliance with mask-wearing guidelines. At its core, the system utilizes a dual-
stage Convolutional Neural Network (CNN) architecture, capable of discerning between masked
and unmasked faces. What sets this solution apart is its versatility and adaptability; it can be
seamlessly integrated with existing Closed-Circuit Television (CCTV) camera systems, making it a
viable tool for monitoring and enforcing mask-wearing compliance in a wide range of settings.
The success of our system hinges on the quality and diversity of the data used for its training and
evaluation.

2
We acknowledge the necessity of a robust dataset that accurately represents various
scenarios and conditions. While we initially leveraged a Kaggle dataset comprising approximately
4,000 images, continuous data collection and curation are imperative to improve the model's overall
performance and generalization. With a performance accuracy rate of 98%, we have achieved
promising results in our preliminary evaluation, but it is essential to consider additional evaluation
metrics beyond accuracy to ensure the system's reliability and fairness, especially in scenarios with
imbalanced data.

Project Objectives
By the end of this project, you’ll understand how objects are detected and classified for a
given input.

1. Enhancing Public Health and Safety: The primary goal of this project is to
contribute to the enhancement of public health and safety, especially during health crises
like the COVID-19 pandemic. The system aims to promote the proper and consistent use
of face masks, which is a key measure in reducing the transmission of infectious
diseases.

2. Mask-Wearing Compliance: The system's core objective is to monitor and ensure


mask-wearing compliance in various public and private settings. It should be capable of
identifying instances where face masks are not being used correctly, such as worn
improperly or not at all.

3. Real-time Detection: The system should operate in real-time, offering immediate


feedback and intervention when non-compliance is detected. This is crucial for timely
enforcement of mask-wearing guidelines and rapid response to emerging health threats.

4. Integration with CCTV Systems: The project aims to seamlessly integrate with pre-
installed CCTV camera systems, making it easy for institutions, such as public
transportation authorities, healthcare facilities, and commercial establishments, to adopt
and deploy this technology without major infrastructure changes.

5. Accuracy and Reliability: Achieving a high level of accuracy and reliability is a


fundamental objective. The system should be able to distinguish between masked and
unmasked faces with a high degree of precision to minimize false positives and
negatives.

3
Purpose of the Project
The purpose of the project is to detect and classify the objects present in the
image/video and label them according to the classification. In summary, the primary purpose
of the project is to harness the capabilities of deep learning technology to address the critical
need for proper mask-wearing compliance in the context of public health and safety,
ultimately reducing the risk of disease transmission and safeguarding the well-being of
individuals and communities.

Existing System with Disadvantages

In this system if a person wears a face mask Improperly by not covering nose even though it will get
the best output results. This project reproduces the training and testing of the most used classical
machine learning model techniques with open CV, Tensor Flows, and Keras.

Main Contributions
The main contributions of this project, which focuses on the development of a Deep Learning-based
face mask detection system, can be summarized as follows:
1. Public Health Enhancement: The project significantly contributes to public health by providing a
technological solution to enforce proper mask-wearing compliance. This contributes to the mitigation
of infectious disease transmission, which is particularly relevant during health crises like the COVID-
19 pandemic.
2. Real-time Monitoring and Intervention: The system offers the capability for real-time
monitoring and immediate intervention, ensuring that non-compliance with mask-wearing guidelines
is addressed promptly. This proactive approach helps reduce the risk of disease spread.
3. Integration with Existing Infrastructure: The project contributes to the seamless integration of
the system with pre-installed CCTV camera systems. This makes it accessible and feasible for a wide
range of institutions and businesses without requiring significant infrastructure changes.
4. High Accuracy and Reliability: Achieving a high level of accuracy and reliability in detecting
correctly worn and improperly worn masks is a significant contribution. This minimizes errors and
false alarms, making the system more effective and trustworthy.
5. Privacy and Ethical Standards: The project is committed to upholding ethical standards and
respecting individuals' privacy rights. It emphasizes data privacy and compliance with relevant data
protection laws, contributing to responsible AI deployment.
6. Scalability and Adaptability: The project's emphasis on scalability and adaptability means that
the system can be tailored to various settings and geographic regions, accommodating the needs of
different institutions and communities.

4
7. Continuous Improvement and Research: By engaging in ongoing research and development, the
project ensures that the system remains up-to-date and adaptable to changing guidelines and
emerging health threats. This contribution reflects a commitment to innovation and progress.
8. Community Awareness and Education: The project contributes to community awareness and
education regarding the importance of mask-wearing in public health and the role of technology in
enforcing compliance. This educational aspect is essential for public understanding and cooperation.

In summary, the project's main contributions lie in its application of cutting-edge technology to
address the critical need for proper mask-wearing compliance, with a focus on enhancing public
health and safety. By promoting real-time monitoring, integration with existing infrastructure,
accuracy, ethical considerations, scalability, continuous improvement, and community education, the
project plays a significant role in addressing the challenges posed by infectious disease transmission
and in safeguarding the well-being of individuals and communities.

Technical Contributions
The technical contributions of this project, which involves the development of a Deep Learning-
based face mask detection system, are as follows:
1. Dual-Stage Convolutional Neural Network (CNN) Architecture: The design and
implementation of a dual-stage CNN architecture is a key technical contribution. This architecture is
capable of detecting both masked and unmasked faces, allowing for precise identification of mask-
wearing compliance.
2. Data Collection and Curation: The project's technical contributions include the collection and
curation of a substantial dataset of approximately 4,000 images. This dataset serves as the foundation
for training and evaluating the model, ensuring its ability to perform accurately across various
scenarios.
3. Training and Model Optimization: The training and optimization of the deep learning model to
attain a performance accuracy rate of 98% is a significant technical achievement. This high level of
accuracy indicates the effectiveness of the model in distinguishing between correctly worn and
improperly worn masks.
4. Real-Time Processing: The system's technical capability to operate in real-time is crucial for
timely intervention and enforcement. The efficient processing of video feeds from CCTV cameras in
real time requires robust technical solutions.
5. Integration with CCTV Systems: The technical integration of the system with pre-installed
CCTV cameras is a noteworthy contribution. It involves the development of software and hardware
interfaces to ensure compatibility and ease of deployment in various settings.

5
6. Privacy-Preserving Algorithms: The project employs technical methods to protect individuals'
privacy rights, such as privacy-preserving algorithms or techniques that anonymize and protect
sensitive data while maintaining detection capabilities.
7. Scalability and Performance Optimization: Ensuring that the system is scalable to accommodate
different settings and geographic regions requires technical expertise. Performance optimization is
crucial to handle the processing demands of large-scale deployments.
8. Continuous Model Updates: Technical contributions include the development of mechanisms for
continuous model updates and retraining. This ensures that the system remains effective over time,
adapting to changing guidelines and emerging health threats.
9. Communication and User Interfaces: Developing user-friendly interfaces and communication
channels to inform users about mask-wearing compliance and system status is a technical
contribution that enhances user experience and system adoption.
10. Ethical and Legal Compliance: Implementing technical safeguards and measures to ensure
ethical and legal compliance, such as mechanisms to handle data securely and address potential
biases in the model, is a technical necessity.
11. Data Analysis and Feedback Mechanisms: Technical contributions in data analysis and
feedback mechanisms enable the system to provide meaningful insights and timely responses to non-
compliance, enhancing its effectiveness.
In summary, the project's technical contributions encompass the design of the deep learning
architecture, data collection, model training, real-time processing, integration with existing systems,
privacy protection, scalability, continuous improvement, user interfaces, and compliance with ethical
and legal standards. These technical elements collectively enable the system to fulfill its objectives in
promoting proper mask-wearing compliance and public health enhancement.

More Detailed Contributions


12. Advanced Deep Learning Techniques: The project employs advanced deep learning
techniques, such as transfer learning, ensemble methods, or attention mechanisms, to enhance the
accuracy and robustness of the model. These techniques contribute to better model performance and
adaptability.
13. Multi-Class Detection: In addition to detecting masked and unmasked faces, the system may
have the capability to distinguish between different types of masks (e.g., surgical masks, N95
respirators, cloth masks). This technical advancement adds granularity to mask-wearing compliance
monitoring.

6
14. Multimodal Data Fusion: To improve detection accuracy, the system might incorporate
multimodal data fusion, combining visual data from cameras with other sensor data, such as
temperature measurements or social distancing monitoring, to make more informed decisions about
mask compliance.
15. Human Pose Estimation: In some implementations, the project may employ human pose
estimation techniques to assess not only whether a mask is worn but also how it is positioned on an
individual's face. This technical contribution enhances the ability to detect improper mask usage.
16. Explainable AI: To increase transparency and trust in the system, the project may include
explainable AI components, allowing it to provide understandable and interpretable explanations for
its detection decisions. This contributes to accountability and user acceptance.
17. Cross-Domain Adaptation: The system may be designed to adapt to different domains or
environments, using domain adaptation techniques to ensure reliable performance in various settings,
including indoor and outdoor scenarios.
18. Edge Computing: Technical contributions include the implementation of edge computing
capabilities, enabling the system to process data and make decisions closer to the data source. This
minimizes latency and reduces the load on central servers.
19. Secure Data Handling: The project may involve secure data handling practices, including
encryption, access controls, and data anonymization, to protect sensitive information and comply
with data privacy regulations.
20. Automatic Alerts and Notifications: The system can be programmed to send automatic alerts or
notifications to relevant authorities or individuals when non-compliance is detected, ensuring rapid
response to violations.
These technical contributions collectively enhance the capabilities, versatility, and ethical
considerations of the project, making it a valuable tool in the effort to promote public health and
safety through proper mask-wearing compliance.

7
Proposed System with Features

Deep Learning (DL) is a subpart of the Machine Learning (ML)model which involves algorithms
that are concerned with algorithms inspired by the structure and function of the brain and uses
multilayer neural networks called Artificial Neural Networks. Both DL and ML belong to the higher
field of Artificial Intelligence (AI). DL depends on Neural Network layers that transform the input in
some way to produce output to implement its functioning. In deep learning, an Image can be called a
“matrix of pixel values”, therefore it can be easier to classify complex image matrices or images with
similar forms of matrix or a very huge dataset of images with minimal changes in the matrix by
depending on deep learning matrix classification. This may lead to a clash in prediction scores
thereby affecting the accuracy and speed of the classifier model.

Fig. 1.5.1: Block diagram of the proposed system.

Why Deep Learning is important

Deep learning is important for several reasons, and its significance extends to various domains and
industries. Here are some key reasons why deep learning is important:
1. High Accuracy: Deep learning models, particularly deep neural networks, have demonstrated the
ability to achieve remarkable levels of accuracy in various tasks, such as image and speech
recognition, natural language processing, and more. This high accuracy is critical in applications
where precision is essential.
2. Complex Pattern Recognition: Deep learning excels at identifying and extracting complex
patterns from large and unstructured datasets. It can uncover intricate relationships and insights that
might be challenging for traditional machine learning methods.

8
3. Scalability: Deep learning models can scale with data. As more data becomes available, deep
learning models can adapt and improve their performance, making them suitable for tasks that benefit
from big data.
4. Automation: Deep learning enables automation in tasks that previously required human
intervention, saving time and resources. For example, it is used in autonomous vehicles, robotics, and
various industrial applications.
5. Natural Language Processing (NLP): Deep learning has revolutionized NLP, enabling machines
to understand, generate, and translate human languages. This has numerous applications in chatbots,
language translation, sentiment analysis, and more.
6. Innovative Technologies: Deep learning is a driving force behind innovations in fields like
autonomous vehicles, drones, augmented reality, and virtual reality.
7. Safety and Security: It's used for enhancing safety and security, including face recognition for
access control, fraud detection in financial transactions, and identifying security threats.
8. Research and Development: Deep learning continues to drive advancements in AI research and
development, pushing the boundaries of what's possible in AI applications.

How the DEEP LEARNING Algorithm works

Deep learning algorithms are a subset of machine learning methods that are inspired by the
structure and function of the human brain, particularly the neural networks within it. These
algorithms work by training on large datasets to learn and generalize patterns, enabling them to make
predictions, and classifications, or generate insights from new, unseen data. Here's an overview of
how deep learning algorithms work:

1. Data Collection and Preprocessing: The first step in deep learning involves gathering and
preprocessing data. Data can take various forms, such as images, text, audio, or numerical data. Data
preprocessing is essential to clean and format the data for input into the deep learning model.

2. Neural Network Architecture: Deep learning models typically use neural network architectures.
A neural network consists of layers of interconnected artificial neurons, organized into an input layer,
one or more hidden layers, and an output layer. Deep learning models have multiple hidden layers,
which distinguish them from traditional neural networks.

3. Model Initialization: Neural network weights are initialized with small random values. These
weights represent the strengths of connections between neurons and are adjusted during training.

9
4. Feedforward Process: During the feedforward process, data is passed through the neural network.
The input data is multiplied by the weights, and a series of mathematical operations, including
activation functions, are applied to the data as it traverses the layers. Activation functions introduce
non-linearity into the model, allowing it to learn complex patterns.

5. Loss Function: At the end of the feedforward process, the model's output is compared to the true
target values from the dataset using a loss function. The loss function quantifies the error or
difference between the predicted and actual values.

6. Backpropagation: The backpropagation algorithm is used to update the weights of the neural
network in a way that minimizes the loss. It calculates the gradient of the loss function with respect
to the model's weights and adjusts the weights using optimization techniques, such as gradient
descent.

7. Training: Training involves iterating through the dataset multiple times (epochs) to refine the
model's performance. The goal is to minimize the loss by adjusting the weights of the neural network.
The training process continues until the model converges or achieves the desired level of accuracy.

8. Validation: During training, a separate validation dataset is often used to monitor the model's
performance. This helps prevent overfitting, where the model performs well on the training data but
poorly on new, unseen data.

9. Testing: After training, the model is tested on a different dataset (the test set) to evaluate its
generalization performance. The test results indicate how well the model is likely to perform in real-
world applications.

10. Inference: Once trained, the deep learning model can make predictions or classifications on new,
unseen data. This inference process involves feeding the data through the trained neural network to
produce output results.

Fig. 1.5.2: Block Diagram of Deep Neural Networks

10
In the image above, Deep neural networks are key breakthroughs in the field of computer
vision and speech recognition. For the past decade, deep networks have enabled machines to
recognize images, and speech and even play games at an accuracy high impossible for
humans. To achieve a high level of accuracy, a huge amount of data and henceforth
computing power is needed to train these networks. However, despite the computational
complexity involved, we can follow certain guidelines to reduce the time for training and
improve model accuracy. In this article, we will look through a few of these techniques.

Today, deep learning has become pivotal to many of the applications we use every day such as
content recommendation systems, translation apps, digital assistants, chatbots, and facial recognition
systems. Deep learning has also helped create advances in many special domains such as healthcare,
education, and self-driving cars.

Fig.1.5.3: Deep Learning Algorithm

11
How Deep Learning Algorithm Works

BIOLOGICAL NEURAL NETWORKS


Artificial neural networks are inspired by the biological neurons found in our brains. Artificial neural
networks simulate some basic functionalities of biological neural networks, but in a very simplified
way. Let’s first look at the biological neural networks to derive parallels to artificial neural networks.

Fig.1.5.4: Biological Model of a Neural Network

In short, a biological neural network consists of numerous neurons. A typical neuron consists of a cell body,
dendrites, and an axon. Dendrites are thin structures that emerge from the cell body. An axon is a cellular
extension that emerges from this cell body. Most neurons receive signals through the dendrites and send out
signals along the axon. At the majority of synapses, signals cross from the axon of one neuron to the
dendrite of another. All neurons are electrically excitable due to the maintenance of voltage gradients in
their membranes. If the voltage changes by a large enough amount over a short interval, the neuron
generates an electrochemical pulse called an action potential. This potential travels rapidly along the axon
and activates synaptic connections.

12
Applications of Deep Learning Algorithms:
Deep learning algorithms have a wide range of applications across various domains due to their
ability to handle complex patterns and high-dimensional data. Some prominent applications of deep
learning algorithms include:
1. Image and Video Analysis:

 Image Classification: Deep learning is used for image classification tasks, such as
identifying objects, animals, and scenes in photographs.

 Object Detection: It's used in object detection applications, where it can locate and label
objects within images or video streams.

 Facial Recognition: Deep learning is employed in facial recognition systems for identity
verification and access control.

 Video Surveillance: It is used in video surveillance for detecting and tracking objects and
individuals in real-time.
2. Natural Language Processing (NLP):

 Sentiment Analysis: Deep learning models can analyze text data to determine the
sentiment or emotion expressed in written content.

 Machine Translation: Deep learning is instrumental in machine translation services,


enabling the automatic translation of text from one language to another.

 Named Entity Recognition (NER): NER systems can identify and classify named entities
in text, such as names of people, organizations, or locations.

 Chatbots and Virtual Assistants: NLP is a key component of chatbots and virtual
assistants that understand and respond to human language.
3. Speech Recognition:

 Deep learning is used in speech recognition systems to transcribe spoken language


into text, enabling voice commands and voice-to-text applications.
4. Autonomous Vehicles:

 Deep learning plays a crucial role in self-driving cars by processing sensor data (e.g.,
cameras, LiDAR, radar) to make real-time decisions for navigation and object detection.
5. Healthcare:

 In medical imaging, deep learning helps with the detection and diagnosis of diseases from
medical images like X-rays, MRIs, and CT scans.

13
 It's used in drug discovery and genomics for analyzing complex biological data.

 Deep learning models can predict patient outcomes and assist in personalized treatment
plans.
Advantages

 High Accuracy

 Feature Learning

 Complex Pattern Recognition

 Scalability

 Transfer Learning

 Multimodal Data Handling

 Real-time Processing

 Self-Learning

 Representation Learning

INPUT AND OUTPUT DESIGN

INPUT DESIGN
Input design is a part of the overall system design. The main objective during the input design
is as given below:
 The Training Data Set that is used in this is the combination of many images with and without
masks.
 These Pictures were taken from different assets like Kaggle and RMFD datasets.
 This data set consists of 2155 Images of data in with mask category and 2023 Images of data
in without mask category with different Angles

OUTPUT DESIGN
Outputs from computer systems are required primarily to communicate the results of
processing to users. They are also used to provides a permanent copy of the results for later
consultation. The various types of outputs in general are:

14
 All the experimental trials have been conducted on a laptop equipped with an Intel i7-9750H
processor (2.6GHz), 32GB of RAM with INVIDIAGTX1660ti with 6GB of VRAM.

 The Jupyter Notebook software equipped with Python 3.7.9 kernel was selected in this research for
the development and implementation of the different experimental Trials.

 The Experimental results, show that the system works with a high accuracy of 98% in detecting Face
Mask.

15
2. LITERATURE SURVEY

1. Historical Evolution: Provide an overview of the historical development and evolution of deep
neural networks, from the early days of artificial neural networks to the resurgence of interest in deep
learning with the advent of powerful GPUs and large datasets.
2. Key Milestones: Highlight significant milestones in the field of deep learning, including
breakthroughs in image recognition, speech recognition, and natural language processing, such as the
ImageNet competition, speech recognition advancements, and large-scale language models.
3. Deep Learning Architectures: Describe various deep learning architectures, such as feedforward
neural networks, convolutional neural networks (CNNs), recurrent neural networks (RNNs), and
more recent architectures like Transformers and GANs. Discuss their applications and the evolution
of their design.
4. Applications: Discuss a wide range of applications of deep neural networks across different
domains, including computer vision, natural language processing, robotics, healthcare, finance, and
autonomous systems. Explore how deep learning has revolutionized these domains.
5. Transfer Learning: Explain the concept of transfer learning in deep neural networks and its
significance in reusing pre-trained models to boost the performance of new, related tasks. Highlight
notable transfer learning models and their applications.
6. Hardware Advancements: Address the role of hardware advancements, including Graphics
Processing Units (GPUs) and specialized AI accelerators (e.g., TPUs), in enabling the rapid progress
of deep learning. Discuss how hardware evolution has contributed to the scalability of deep neural
networks.
7. Challenges and Limitations: Explore the challenges and limitations of deep neural networks, such
as the need for extensive labeled data, computational resources, and issues related to interpretability,
fairness, and privacy.
8. Ethical Considerations: Discuss ethical considerations related to deep learning, such as bias in
algorithms, privacy concerns, and the responsible deployment of AI technologies in society.
9. Emerging Trends: Highlight emerging trends in deep learning research, including the use of
attention mechanisms, reinforcement learning, explainable AI, federated learning, and the
development of AI for edge and mobile devices.
10. Impact on Society: Examine the impact of deep learning on society, economics, and the job market.
Discuss its role in the development of autonomous vehicles, smart cities, and healthcare
advancements.

16
3. SOFTWARE REQUIREMENTS ANALYSIS

Problem Specification
The project “An Interactive Web-based Application to Track COVID-19 Protocols in Real
Time” detects objects efficiently based on Deep Learning and CNN algorithms and applies the
algorithm to image data and video data to detect objects.

Modules and Their Functionalities

1. Data Pre-processing
Data pre-processing is a process of preparing the raw data and making it suitable for a machine
learning model. It is the first and crucial step in creating a machine-learning model.
When creating a machine learning project, it is not always the case that we come across clean
and formatted data. And while doing any operation with data, it is mandatory to clean it and
put in a formatted way. So, for this, we use a data pre-processing task.
Real-world data generally contains noises and missing values, and maybe in an unusable format
that cannot be directly used for machine learning models. Data pre-processing is required
tasks for cleaning the data and making it suitable for a machine learning model which also
increases the accuracy and efficiency of a machine learning model.
• Getting the dataset
• Importing libraries
• Importing datasets
• Finding Missing Data
• Encoding Categorical Data
• Splitting dataset into training and test set
• Feature scaling
2. Splitting the Dataset into the Training set and Test set
In machine learning data pre-processing, we divide our dataset into a training set and a test set.
This is one of the crucial steps of data pre-processing as by doing this, we can enhance the
performance of our machine learning model. Suppose we have given training to our machine
learning model by a dataset and we test it by a completely different dataset. Then, it will
create difficulties for our model to understand the correlations between the models. If we train
our model very well and its training accuracy is also very high, but we provide a new dataset
to it, then it will decrease the performance. So, we always try to make a machine learning
model that performs well with the training set and also with the test dataset. we can define
these as:
17
Fig. 3.1 Dataset
Training Set: A subset of the dataset to train the machine learning model, and we already
know the output.
Test set: A subset of the dataset to test the machine learning model, and by using the test
set, the model predicts the output.

Feasibility Study
Preliminary investigation examines project feasibility, the likelihood the system will be useful
to the organization. The main objective of the feasibility study is to test the Technical,
Operational and Economical feasibility for adding new modules and debugging old running
system. All system is feasible if they are unlimited resources and infinite time. There are
aspects in the feasibility study portion of the preliminary investigation:
 Technical Feasibility
 Operational Feasibility
 Economical Feasibility

TECHNICAL FEASIBILITY
The technical issue usually raised during the feasibility stage of the investigation
includes the following:
 Does the necessary technology exist to do what is suggested?
 Does the proposed equipment have the technical capacity to hold the data required to use
the new system?
 Will the proposed system provide an adequate response to inquiries, regardless of the
number or location of users?
 Can the system be upgraded if developed?
 Are there technical guarantees of accuracy, reliability, ease of access and data security

18
Web-based user interface for audit workflow at NIC-CSD. Thus it provides easy access to the
users. The database’s purpose is to create, establish, and maintain a workflow among various
entities to facilitate all concerned users in their various capacities or roles. Permission to the
users would be granted based on the roles specified. Therefore, it provides a technical
guarantee of accuracy, reliability, and security. The software and hard requirements for the
development of this project are not many and are already available in-house at NIC or are
available as free as open source. The work for the project is done with the current equipment
and existing software technology. Necessary bandwidth exists for providing fast feedback to
the users irrespective of the number of users using the system.

OPERATIONAL FEASIBILITY
Proposed projects are beneficial only if they can be turned into information systems. That will
meet the organization’s operating requirements. Operational feasibility aspects of the project
are to be taken as an important part of the project implementation. Some of the important
issues raised to test the operational feasibility of a project include the following:
 Is there sufficient support for the management from the users?
 Will the system be used and work properly if it is being developed and implemented?
 Will there be any resistance from the user that will undermine the possible application
benefits?

This system is targeted to be by the above-mentioned issues. Before hand, the management
issues and user requirements have been taken into consideration. So, there is no question of
resistance from the users that can undermine the possible application benefits.
The well-planned design would ensure the optimal utilization of the computer resources and
would help in the improvement of performance status.

ECONOMICAL FEASIBILITY
A system can be developed technically and that will be used if installed must still be a good
investment for the organization. In the economic feasibility, the development cost of creating
the system is evaluated against the ultimate benefit derived from the new systems. Financial
benefits must equal or exceed the costs.
The system is economically feasible. It does not require any additional hardware or software.
Since the interface for this system is developed using the existing resources and technologies
available at NIC, there is nominal expenditure and economical feasibility.

19
4. SOFTWARE AND HARDWARE REQUIREMENTS

Software Requirements
The functional requirements or the overall description documents include the product
perspective and features, operating system and operating environment, graphics requirements,
design constraints, and user documentation. The appropriation of requirements and
implementation constraints gives the general overview of the project in regard to what the
areas of strength and deficit are and how to tackle them.

• Python IDLE 3.7 version (or)

• Anaconda 3.7 (or)

• Jupiter (or)

• Google colab

• Pyserial

• tensorflow >= 1.15.2

• keras == 2.3.1

• imutils == 0.5.3

• numpy == 1.18.2

• opencv-python == 4.2.0.*

• matplotlib == 3.2.1

Hardware Requirements
Minimum hardware requirements are very dependent on the particular software being
developed by a given Enthought Python / Canopy / VS Code user. Applications that need to
store large arrays/objects in memory will require more RAM, whereas applications that need
to perform numerous calculations or tasks more quickly will require a faster processor.

• Operating system: Windows, Linux

• Processor: Minimum intel i3

• RAM: Minimum 4 GB

• Hard disk: Minimum 250GB

• Camera: esp32-cam or any other webcam

• Arduino Uno

20
5. SOFTWARE DESIGN

System Architecture

Fig. 5.1 System Architecture

21
UML Diagrams
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. UML was created by the Object Management Group (OMG)
and the UML 1.0 specification draft was proposed to the OMG in January 1997.
There are several types of UML diagrams and each one of them serves a different purpose
regardless of whether it is being designed before the implementation or after (as part of
documentation). UML has a direct relation with object-oriented analysis and design. After
some standardization, UML has become an OMG standard. The two broadest categories that
encompass all other types are:
1. Behavioral UML diagram and

2. Structural UML diagram.

As the name suggests, some UML diagrams try to analyses and depict the structure of a
system or process, whereas other describe the behavior of the system, its actors, and its
building components.
The different types are broken down as follows:
1. Sequence diagram
2. Use case Diagram
3. Activity diagram

22
1. Sequence diagram
A sequence diagram simply depicts interaction between objects in a sequential order i.e.,
the order in which these interactions take place. We can also use the terms event diagrams
or event scenarios to refer to a sequence diagram. Sequence diagrams describe how and in
what order the objects in a system function. These diagrams are widely used by
businessmen and software developers to document and understand requirements for new
and existing systems.

Fig. 5.4.1 Sequence diagram

List of actions User:


User need to press any of the given three (i.e., Prediction data, prediction Skills, Jobsearch)
then they will get the output accordingly.

System:
System will give the output as he enters according to the given
data. Result:
As per user enters the data it will gives the suitable jobs.

23
2. Use case diagram

A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals (represented
as use cases), and any dependencies between those use cases. The main purpose of a use case
diagram is to show what system functions are performed for which actor. Roles of the actors
in the system can be depicted.

Fig. 5.4.2 Use case diagram

Use case:

Users need to give the data. Then the System will give the results.
The System consists of a data set that will preprocess the data and split the data apply the
train and test the data then it will predict the results.

Scenario
A person is using a camera to scan an object. The person uses the camera to scan the object, and the
object detector to detect the object's class and location. The object detector returns a bounding box
around the object, and the person can then use this information to identify and interact with the
object.

Actors Use Cases


User Scan Object
Detect Object Detect Object

24
Sequence of Events
The user scans the object with the camera.
The object detector detects the object and returns a bounding box around the object.
The user uses the bounding box information to identify and interact with the object.

3. Activity diagram
The activity diagram is another important diagram in UML to describe the dynamic aspects
of the system. An activity diagram is a flowchart to represent the flow from one activity to
another activity. This flow can be sequential, branched, or concurrent. Activity diagrams deal
with all types of flow control by using different elements such as fork, join, etc.

Fig. 5.4.3 Activity diagram

25
6. CODING AND ITS IMPLEMENTATION

Source code

Datacollector.py

import cv2

video=cv2.VideoCapture(0)

facedetect=cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

count=0

while True:

ret,frame=video.read()

faces=facedetect.detectMultiScale(frame,1.3, 5)

for x,y,w,h in faces:

count=count+1

name='./images/face_without_mask/'+ str(count) + '.jpg'

print("Creating Images........." +name)

cv2.imwrite(name, frame[y:y+h,x:x+w])

cv2.rectangle(frame, (x,y), (x+w, y+h), (0,255,0), 3)

cv2.imshow("WindowFrame", frame)

cv2.waitKey(1)

if count>500:

break

video.release()

cv2.destroyAllWindows()

26
Training the CNN model:

import warnings

warnings.filterwarnings('ignore')
import cv2
import numpy as np
import os
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from keras.preprocessing.image import ImageDataGenerator
from keras.utils.np_utils import to_categorical
from keras.models import Sequential
from keras.layers import Conv2D, Dense, MaxPooling2D, Activation, Dropout, Flatten
from keras.optimizers import Adam
########################################

path='images'
images=[]
classNo=[]
testRatio=0.2
valRatio=0.2
imgDimension=(32,32,3)

#########################################

myList=os.listdir(path)
numOfClasses=len(myList)

# print(numOfClasses)

print("Importing Classes..........")
for x in range(0, numOfClasses):
myPicList=os.listdir(path+"/"+str(x))
# myData/0/img.jpg
for y in myPicList:
curImg=cv2.imread(path+"/"+str(x)+"/"+y)
curImg=cv2.resize(curImg,(imgDimension[0],imgDimension[1]))
27
images.append(curImg)
classNo.append(x)
print(x)

images=np.array(images)
classNo=np.array(classNo)

#########Spliting The Data###########

x_train, x_test, y_train, y_test=train_test_split(images, classNo, test_size=testRatio)


x_train, x_validation, y_train, y_validation=train_test_split(x_train, y_train, test_size=valRatio)

# # print(x_train.shape)

numOfSample=[]
for x in range(0,numOfClasses):
numOfSample.append(len(np.where(y_train==x)[0]))

plt.figure(figsize=(10,5))
plt.bar(range(0, numOfClasses),numOfSample)
plt.title("Bar Plot of Classes & Images")
plt.xlabel("No Of Classes")
plt.ylabel("No of Images")
plt.show()

def preprocessing(img):
# img=np.astype("uint8")
img=cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img=cv2.equalizeHist(img)
img=img/255
return img

x_train=np.array(list(map(preprocessing, x_train)))
x_test=np.array(list(map(preprocessing, x_test)))
x_validation=np.array(list(map(preprocessing, x_validation)))

x_train=x_train.reshape(x_train.shape[0], x_train.shape[1], x_train.shape[2],1)


28
x_test=x_test.reshape(x_test.shape[0], x_test.shape[1], x_test.shape[2],1)
x_validation=x_validation.reshape(x_validation.shape[0],x_validation.shape[1],x_validation.shape[2
],1)

dataGen=ImageDataGenerator(
width_shift_range=0.1,
height_shift_range=0.1,
zoom_range=0.2,
shear_range=0.1,
rotation_range=10)

dataGen.fit(x_train)
y_train=to_categorical(y_train, numOfClasses)
y_test=to_categorical(y_test, numOfClasses)
y_validation=to_categorical(y_validation, numOfClasses)

def myModel():
sizeOfFilter1=(3,3)
sizeOfFilter2=(3,3)
sizeOfPool=(2,2)
model=Sequential()
model.add((Conv2D(32,sizeOfFilter1,input_shape=(imgDimension[0],imgDimension[1],1),a
ctivation='relu')))
model.add((Conv2D(32, sizeOfFilter1,activation='relu')))
model.add(MaxPooling2D(pool_size=sizeOfPool))
model.add((Conv2D(64, sizeOfFilter2,activation='relu')))
model.add((Conv2D(64, sizeOfFilter2,activation='relu')))
model.add(MaxPooling2D(pool_size=sizeOfPool))
model.add(Dropout(0.5))
model.add(Flatten())
model.add(Dense(64, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(numOfClasses, activation='softmax'))
model.compile(Adam(lr=0.001),loss='categorical_crossentropy',metrics=['accuracy'])
return model

model=myModel()
29
print(model.summary())
history=model.fit_generator(dataGen.flow(x_train,y_train,batch_size=50),steps_per_epoch=1000,ep
ochs=2,validation_data=(x_validation,y_validation),shuffle=1)
model.save("MyTrainingModel.h5")

Test.py

import warnings
warnings.filterwarnings('ignore')
import numpy as np
import cv2
from keras.models import load_model
facedetect = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
threshold=0.90
cap=cv2.VideoCapture(0)
cap.set(3, 640)
cap.set(4, 480)
font=cv2.FONT_HERSHEY_COMPLEX
model = load_model('MyTrainingModel.h5')

def preprocessing(img):
img=img.astype("uint8")
img=cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img=cv2.equalizeHist(img)
img = img/255
return img

def get_className(classNo):
if classNo==0:
return "Mask"
elif classNo==1:
return "No Mask"

30
while True:
sucess, imgOrignal=cap.read()
faces = facedetect.detectMultiScale(imgOrignal,1.3,5)
for x,y,w,h in faces:
# cv2.rectangle(imgOrignal,(x,y),(x+w,y+h),(50,50,255),2)
# cv2.rectangle(imgOrignal, (x,y-40),(x+w, y), (50,50,255),2)

crop_img=imgOrignal[y:y+h,x:x+h]
img=cv2.resize(crop_img, (32,32))
img=preprocessing(img)
img=img.reshape(1, 32, 32, 1)

#cv2.putText(imgOrignal,"Class",(20,35), font,0.75,(0,0,255),2,cv2.LINE_AA)
#cv2.putText(imgOrignal, "Probability" , (20,75), font, 0.75, (255,0,255),2,
cv2.LINE_AA)

prediction=model.predict(img)
classIndex=model.predict_classes(img)
probabilityValue=np.amax(prediction)
if probabilityValue>threshold:
if classIndex==0:
cv2.rectangle(imgOrignal,(x,y),(x+w,y+h),(0,255,0),2)
cv2.rectangle(imgOrignal, (x,y-40),(x+w, y), (0,255,0),-2)
cv2.putText(imgOrignal,
str(get_className(classIndex)),(x,y-10), font, 0.75, (255,255,255),1, cv2.LINE_AA)
elif classIndex==1:
cv2.rectangle(imgOrignal,(x,y),(x+w,y+h),(50,50,255),2)
cv2.rectangle(imgOrignal, (x,y-40),(x+w, y), (50,50,255),-2)
cv2.putText(imgOrignal, str(get_className(classIndex)),
(x,y-10), font, 0.75, (255,255,255),1, cv2.LINE_AA)

# cv2.putText(imgOrignal,str(round(probabilityValue*100, 2))+"%" ,(180, 75), font, 0.75,


(255,0,0),2, cv2.LINE_AA)
cv2.imshow("Result",imgOrignal)
k=cv2.waitKey(1)
31
if k==ord('q'):
break

cap.release()
cv2.destroyAllWindows()

32
Implementation

Python
Python is a general-purpose interpreted, interactive, object-oriented, and high-level
programming language. An Interpreted Language, Python has a design philosophy that
emphasizes code readability (notably using whitespace indentation to delimit code blocks
rather than curly brackets or keywords), and a syntax that allows programmers to express
concepts in fewer lines of code than might be used in languages such as C++ or java. It
provides constructs that enable clear programming on both small and large scales. Python
interpreters are available for many operating systems. C Python, the reference implementation
of Python, is open-source software and has a community-based development model, as do
nearly all of its variant implementations. C Python is managed by the non-profit Python
Software Foundation. Python features a dynamic type system and automatic memory
management. It supports multiple programming paradigms, including object-oriented,
imperative, functional, and procedural, and has a large and comprehensive standard library.

Modules Used in

Project TensorFlow
TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library and is also used for
machine learning applications such as neural networks. It is used for both research and
production at Google.
TensorFlow was developed by the Google Brain team for internal Google use. It was released
under the Apache 2.0 open-source license on November 9, 2015.

NumPy
NumPy is a general-purpose array-processing package. It provides a high-performance
multidimensional array object and tools for working with these arrays.
It is the fundamental package for scientific computing with Python. It contains various
features including these important ones:
• A powerful N-dimensional array object
• Sophisticated (broadcasting) functions

33
• Tools for integrating C/C++ and Fortran code

• Useful linear algebra, Fourier transform, and random number capabilities


Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional
container of generic data. Arbitrary datatypes can be defined using NumPy which allows
NumPy to seamlessly and speedily integrate with a wide variety of databases.

Pandas
Pandas is an open-source Python Library providing high-performance data manipulation and
analysis tools using its powerful data structures. Python was mainly used for data munging
and preparation. It had very little contribution towards data analysis. Pandas solved this
problem. Using Pandas, we can accomplish five typical steps in the processing and analysis of
data, regardless of the origin of the data load, prepare, manipulate, model, and analyze.
Python with Pandas is used in a wide range of fields including academic and commercial
domains including finance, economics, Statistics, analytics, etc.

Matplotlib
Matplotlib is a Python 2D plotting library that produces publication-quality figures in a
variety of hardcopy formats and interactive environments across platforms. Matplotlib can be
used in Python scripts, the Python and IPython shells, the Jupyter Notebook, web application
servers, and four graphical user interface toolkits. Matplotlib tries to make easy things easy
and hard things possible. You can generate plots, histograms, power spectra, bar charts, error
charts, scatter plots, etc., with just a few lines of code. For example, see the sample plots and
thumbnail gallery.
For simple plotting, the pyplot module provides a MATLAB-like interface, particularly when
combined with IPython. For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object-oriented interface or a set of functions familiar to
MATLAB users.

Keras
Keras is an open-source neural network library written in Python, designed to enable fast
experimentation with deep neural networks. It provides a user-friendly, high-level API,
making it accessible for both beginners and experts in machine learning. With a focus on ease
of use and modularity, Keras allows users to quickly build, train, and deploy neural networks.
It serves as an interface for TensorFlow, offering a flexible platform to create various types of
neural networks, including Convolutional Neural Networks (CNNs), Recurrent Neural
Networks (RNNs), and more. Its simplicity, versatility, and compatibility with different

34
backend engines have made Keras a popular choice in the deep learning community for
developing and deploying artificial intelligence models across diverse domains.

Scikit – learn
Scikit-learn provides a range of supervised and unsupervised learning algorithms via a
consistent interface in Python. It is licensed under a permissive simplified BSD license and is
distributed under many Linux distributions, encouraging academic and commercial use.

MaxPooling 2D

MaxPooling2D is a technique used in Convolutional Neural Networks (CNNs) for down-


sampling feature maps, typically in computer vision tasks. It involves dividing the input data
into non-overlapping rectangular regions and selecting the maximum value from each,
reducing the spatial dimensions of the data. MaxPooling2D helps in dimensionality reduction,
controlling overfitting, and creating spatial invariance by capturing the most important
features in the data. It does not involve any learned parameters and aids in extracting higher-
level features from the input data.

Sequential

The Sequential model in Keras provides a streamlined, easy-to-use approach for building
neural networks. With a linear structure, this model allows the stacking of layers in a
straightforward sequence, simplifying the process of creating neural networks. Designed for
simplicity and convenience, it's an ideal choice for beginners and for swiftly prototyping
standard neural network architectures. While it offers a hassle-free way to build basic models
for tasks like image classification or regression, its functionality is limited to linear stacks of
layers. Models with multiple inputs or outputs, shared layers, or complex architectures beyond
a linear sequence might be better implemented using the more flexible Keras Functional API.
Despite its limitations, the Sequential model remains a widely used and accessible tool for
constructing standard neural networks in Keras.

Conv2D

The Conv2D layer in neural networks performs 2-dimensional convolution on image-like


data, extracting features and patterns crucial for tasks like image classification. It uses small
filters to scan the input, capturing essential image details and learning hierarchical
representations. With learnable parameters adjusted during training, this layer plays a key role
in recognizing edges, textures, and complex visual features. Its ability to highlight important
patterns makes it fundamental in computer vision tasks, aiding in the success of deep learning
models for image-related applications.

35
Python
Python features a dynamic type system and automatic memory management. It supports
multiple programming paradigms, including object-oriented, imperative, functional, and
procedural, and has a large and comprehensive standard library.
• Python is Interpreted − Python is processed at runtime by the interpreter. You do not need
to compile your program before executing it. This is similar to PERL and PHP.
• Python is Interactive − you can sit at a Python prompt and interact with the interpreter
directly to write your programs.

Python also acknowledges that speed of development is important. Readable and terse code is
part of this, and so is access to powerful constructs that avoid tedious repetition of code.
Maintainability also ties into this may be an all but useless metric, but it does say something
about how much code you have to scan, read, and/or understand to troubleshoot problems or
tweak behaviors. This speed of development, the ease with which a programmer of other
languages can pick up basic Python skills, and the huge standard library are key to another
area where Python excels. All its tools have been quick to implement and saved a lot of time,
and several of them have later been patched and updated by people with no Python
background-without breaking.

36
7. SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub-assemblies, assemblies, and/or a finished product It is the
process of exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail unacceptably. There are various types of
tests. Each test type addresses a specific testing requirement.

Test cases:

Expected Remarks
Sno
TestCase Result Result (IF fails)

All the If it is not


1 Checkin people that Pass detecting the
g people are passing in appropriate
in a the room are object then it
closed detected and will fail.
room classified

2 Video Objects present in Pass If it is not


sequence the video are giving the
of moving detected, label and
people in classified, and count of
labeled objects
an area
appropriately
then it
fails.

Table 7.1 Test Cases

Test Results:
All the test cases mentioned above passed successfully. No defects encountered.

37
8. OUTPUT SCREEN

Fig. 8.1 Output Screen-1 (Mask is detected, classified, labeled and counted)

Fig. 8.2 Input Screen-1 (Images are taken)

38
Fig. 8.3 Output Screen-1 (Masks are Detected, classified, labeled and counted)

Fig. 8.4 Data Sets are visualized under a graph

Fig. 8.5 Data Sets Values

39
9. CONCLUSION

This manuscript proposes a face mask recognition system for static images and real-time video that
automatically identifies if a person is wearing a mask which is an excellent solution for deterring the
spread of the COVID-19 pandemic. By using Keras, OpenCV, and CNN, the proposed system can detect
the presence or absence of a face mask and the model gives precise and quick results. The trained model
yields an accuracy of around 98%. This methodology is an excellent contender for a real-time
monitoring system because of its precision and computing efficiency.

Through the application of a well-trained model, boasting an impressive accuracy rate of


approximately 98%, this technology demonstrates a high level of reliability. The methodology’s
precision and computational efficiency position it as a promising candidate for real-time monitoring and
enforcement of mask-wearing protocols in various settings. The potential for widespread implementation
of this system not only aids in preventing the spread of COVID-19 but also contributes to the promotion
of public health by encouraging adherence to essential safety measures. Its adaptability and accuracy
make it a valuable tool in ensuring compliance and mitigating the risk of virus transmission in public
spaces, thereby playing a pivotal role in safeguarding community health.

With Extensive training and optimization, the model boasts an impressive accuracy rate, hovering
around 98%. This high level of accuracy showcases the system’s reliability and suitability for real-world
deployment in various settings. This expanded version further emphasizes the face mask recognition
system's significance, efficiency, and potential impact in combatting the spread of COVID-19.

40
10. FUTURE ENHANCEMENTS

In the future, physical distance integration could be introduced as a feature, or coughing and
sneezing detection could be added. Apart from detecting the face mask, it will also compute the
distances among each individual and see any possibility of coughing or sneezing. If the mask is not
worn properly, a third class can be introduced that labels the image as an ‘improper mask’.

1. Live Data Integration: Implement live data feeds from reliable sources (like CDC, WHO, or
local health departments) to provide real-time updates on COVID-19 cases, vaccination rates,
and protocol changes.

2. Geolocation Services: Utilize geolocation services to provide users with local information, such
as infection rates, testing center vaccination sites, and current protocols relevant to their area.

3. User-Specific Alerts: Allow users to set up personalized alerts for changes in protocols, case
spikes in their region, or updates on vaccination availability based on their preferences and
location.

4. QR Code Verification: Integrate a QR code system for verification of vaccination or test results,
allowing users to easily show their status for travel or entry into various establishments.

5. Education and Resources: Offer a section with educational resources, FAQs, and reliable
information regarding COVID-19, vaccines, safety measures, and frequently updated guidelines.

6. Health Declaration Forms: Incorporate health declaration forms for users to assess their
symptoms, travel history, and potential exposure to COVID-19. Offer guidance or
recommendations based on their responses.

7. Multi-language support: Make the application available in multiple languages to cater to


diverse populations and ensure everyone can access and understand critical information.

8. Chatbot or Customer Support: Introduce a chatbot or customer support feature to address user
queries, provide immediate assistance, and clarify any confusion related to the app’s features or
COVID-19 protocols.

9. Contact Tracing Tools: Develop or integrate tools for contact tracing to notify individuals who
might have been exposed to COVID-19, ensuring timely precautions and testing.

10. Integration with Wearable Devices: Enable connectivity with wearable devices or health
trackers to monitor vital signs or symptoms related to COVID-19, providing users with
personalized health insights.

41
11. REFERENCES

1. Ensheng Dong. “An Interactive web-based dashboard to track COVID-19 in real time”
The Lancet Infectious Diseases 20(5):533-534.
2. Alejandro Jara, Cristobal Cuadralo. “Effectiveness of the second COVID-19 booster
against Omicron: a large-scale cohort study in Chile.” Nature Communication.2022. 14(1)
3. Masashi Idogawa, Shoichiro Tange, Hiroshi Nakase, Takashi Tokino. “Interactive Web-
based Graphs of Coronavirus Disease 2019 cases and deaths per population by country.”
10.1093/cid/ciaa500.
4. Catriona Nguyen-Robertson, Ashraful Haque, Justine Mintern, Anne C La Flamme.
“COVID-19: searching for clues among other respiratory viruses.” Journal of Engineering
Science and Technology 16.1 (2021): 194-208.
5. Zhenhe Pan, Dhruv Mehta, Anubhav Tiwari, Siddhartha Ireddy, Zhou Yang. “An
interactive platform to track global COVID-19 epidemic”. Asonam’2020. 948 - 951.
6. Douglas Arneson, Matthew Elliott, Arman Mosenia, Boris Oskotsky,Samuel Solodar,
Rohit Vashisht, Travis Zack, Paul Bleicher, Atul J. Butte “Covid Counties is an
interactive real-time tracker of the COVID-19 pandemic at the level of US counties”.
World Health Organization. Novel Coronavirus – China (2020).

7. Melissa D Clarkson. “Web-based COVID-19 Dashboards and Trackers in the United


States”.Survey Study , DOI: 10.2196/43819.
8. Yuanhao Liang, Qian Sun, Quanxun Liu, Yulian Pang. “SARS-CoV-2 incidence,
seroprevalence, and COVID-19 vaccination coverage in the homeless population: a
systematic review and meta-analysis. Frontiers in Public Health”. DOI:
10.3389/fpubh.2023.1044788.

42

You might also like