Gadi1 3
Gadi1 3
CHAPTER I
INTRODUCTION
healthcare settings where patients may have weakened immune systems or be more
susceptible to infections. Masks help protect healthcare workers from inhaling or being
exposed to infectious droplets or airborne particles while caring for patients with
contagious illnesses. This is essential for their safety and to prevent the spread of
including respiratory viruses like influenza and COVID-19, are primarily spread through
respiratory droplets when an infected person talks, coughs, or sneezes. Wearing a mask
helps contain these droplets, reducing the risk of transmission to others. In surgical
settings, masks are worn to maintain a sterile environment during procedures. They help
prevent the introduction of bacteria or other contaminants from the respiratory tract of
healthcare workers into the surgical site, reducing the risk of surgical site infections.
aimed at protecting both healthcare workers and patients and preventing the spread of
The wearing of the face masks appears as a solution for limiting the spread of
COVID-19. In this context, the proposed project aim to create a mask detecting system
which will enable us with the information using image processing that if a person is
A face mask detection dataset consists of with mask and without mask images.
The researcher will use OpenCV to do real-time face detection. The researcher will use
the dataset to build a COVID-19 face mask detector with computer vision using Python,
OpenCV, and Tensor Flow and Keras. The goal is to identify whether the person on
image/video stream is wearing a face mask or not with the help of computer vision and
deep learning.
Amid current pandemic, Covid-19 has made us realize the importance of Face
Masks and we need to understand the crucial effects of not wearing one, now more than
ever. Right now, there are no face mask detectors installed at the crowded places
Accordingly, hospitals or healthcare facilities that do not strictly enforce the wearing of
face masks may encounter several problems like there is a higher risk of transmitting
infectious diseases, including respiratory viruses like influenza and COVID-19, within
the hospital environment. Healthcare workers, patients, and visitors may be more
This can jeopardize their health and increase absenteeism due to illness, further straining
healthcare resources. Patients who are already ill or have weakened immune systems are
particularly vulnerable to infections. Failure to wear masks can increase the risk of cross-
3
these regulations can result in penalties, fines, or loss of accreditation thus the
Generally, the aim of the study is to develop a Face Mask Detection Application.
Specific objectives:
1. To develop a system that will make use of OpenCV for image processing;
safety measures.
Face mask detection system refers to detect whether a person is wearing a mask or
not. If a person keeps on wearing a mask, then the project reads it and if a person has not
applied a mask, then reads it and tells it. And through Face Mask Detection System, the
hospital can find out which person has not applied the mask and this is my face mask
detection system security based. The Face Mask Detection System will be implemented
4
at Cruzado Hospital. While face mask detection systems can be valuable tools for
promoting mask compliance and enhancing public health and safety, they also have
several limitations. Face mask detection systems may not always accurately identify
partially obscured or the lighting conditions are poor. False positives or false negatives
can occur, leading to incorrect enforcement actions or overlooking individuals who are
not compliant. The effectiveness of face mask detection systems relies heavily on the
quality of the camera and image processing algorithms. Low-resolution cameras or poor
image quality can reduce the accuracy of mask detection, particularly in crowded or fast-
moving environments. Face mask detection systems may struggle to accurately detect all
types of masks, especially non-standard or homemade masks that may not conform to
typical shapes or designs. Additionally, the system may have difficulty distinguishing
The study of face mask detection systems holds significant importance in several
Public Health Impact: Understanding the effectiveness and limitations of face mask
detection systems contributes to efforts to control the spread of infectious diseases, such
development of more accurate, reliable, and efficient systems for detecting face masks in
real-world environments.
Cruzado Hospital: Evaluating the effectiveness of face mask detection systems helps
policies, these systems can enhance efficiency and reduce the burden on staff.
To the Future Researchers. The ideas presented may be used as reference data in
conducting new research. The outcome of the study will serve beneficial to neither
present researchers nor the future researchers for their cross-reference that will give them
systems, we can better leverage their potential to enhance safety and well-being in
various contexts.
6
Conceptual Framework
Figure 1 shows the Conceptual Framework of the Study. Images from various
sources will be used to build a dataset. The size of datasets can be expanded by the
application of data enhancement techniques. The photographs are stored in two files,
“training dataset” and “test dataset,” each of which comprises 80 and 20% of the images,
“NO mask” will be done using the Labelling tool in the proposed system. To distinguish
between those wearing “masks” and those who aren't, the model is trained in an online
GPU environment called Google Colab. A folder referred to as “the trained folder” will
7
be used for training purposes. Using the test folder, the model is tested for its ability to
identify and classify masks and no-masks that were found in the original photos.
Data annotation is the process of labeling or tagging data to make it understandable and
Google that allows users to write, execute, and share Python code collaboratively.
Face Mask- is a protective covering that is worn over the nose and mouth to help reduce
Image processing is a field of computer science and engineering that focuses on the
manipulation and analysis of digital images using various algorithms and techniques.
Keras is a Python library that is designed specifically for developing neural networks for
ML models. It can run on top of Theano and TensorFlow to train neural networks.
ML Software Library is short for machine learning library like Keras and TensorFlow.
objects, find comparative pictures from an image database, perceive landscape and set up
increased reality and so forth. The proposed method makes use of these features of
Python is a widely-used, high-level programming language known for its simplicity and
readability.
model. It consists of input data (features) and corresponding output labels or target
values.
Test dataset is a separate collection of data used to evaluate the performance of a trained
machine learning model. Unlike the training dataset, the test dataset is not used during the
training phase and is kept aside until the model has been trained on the training data.
high-level language.
CHAPTER II
This paper proposes a deep learning-based approach for detecting face masks in
images and videos. The authors train a convolutional neural network (CNN) using a large
9
dataset of annotated images to classify faces as either wearing a mask or not. The system
achieves high accuracy and real-time performance, making it suitable for applications in
Survey on Deep Learning Techniques for Face Mask Detection by Patel et al. (2021)
architectures used for face mask detection. The authors review recent research papers and
highlight the strengths and limitations of different approaches, including CNNs, transfer
learning, and object detection methods. They also discuss challenges such as dataset bias,
Real-Time Face Mask Detection System Using YOLOv3 and Deep Learning
by Nguyen et al. (2020)
This paper presents a real-time face mask detection system based on the
YOLOv3 object detection framework. The authors train the model using a custom dataset
of masked and unmasked faces and evaluate its performance on a test dataset. The system
achieves high accuracy and real-time processing speed, making it suitable for deployment
A Survey on Face Mask Detection and Recognition Methods During the COVID-19
Pandemic" by Wang et al. (2021)
The authors review approaches based on traditional computer vision techniques as well as
10
deep learning methods. They discuss the challenges of dataset collection, model training,
Face Mask Detection and Recognition Using Deep Learning: A Review by Zhang et
al. (2021)
This review article summarizes recent advancements in face mask detection and
recognition using deep learning techniques. The authors provide insights into the
evolution of face mask detection systems, from early research efforts to state-of-the-art
Sneha Sakshi (2019) stated that recognition from faces is a popular and significant
technology in recent years. Face alterations and the presence of different masks make it
too much challenging. In the real-world, when a person is uncooperative with the systems
such as in video surveillance then masking is further common scenarios. For these masks,
has been performed for recognizing faces under different conditions like changing pose
or illumination, degraded images, etc. Still, difficulties created by masks are usually
disregarded. The primary concern to this work is about facial masks, and especially to
enhance the recognition accuracy of different masked faces. A feasible approach has been
proposed that consists of first detecting the facial regions. The occluded face detection
problem has been approached using Multi-Task Cascaded Convolutional Neural Network
(MTCNN). Then facial features extraction is performed using the Google Face Net
11
embedding model. And finally, the classification task has been performed by Support
Vector Machine (SVM). Experiments signify that this mentioned approach gives a
remarkable performance on masked face recognition. Besides, its performance has been
also evaluated within excessive facial masks and found attractive outcomes. Finally, a
a balance between model accuracy and computational efficiency. The authors propose a
scalable architecture that systematically scales up the depth, width, and resolution of the
model while optimizing for efficiency using a compound scaling method. EfficientDet
RetinaNet: Focal Loss for Dense Object Detection by Lin et al. (2019)
introducing a novel loss function called focal loss. This loss function assigns higher
accuracy and robustness, particularly for detecting objects at different scales and aspect
ratios.
These studies demonstrate the growing interest and importance of face mask
detection systems, particularly in the context of public health, safety, and surveillance.
12
develop accurate, robust, and real-time systems for detecting face masks in images and
videos.
In response to the COVID-19 pandemic, the widespread use of face masks has
become a crucial measure to reduce virus transmission. Automated system by Guo, W.,
Li, W., & Zhao, J. (2020). for detecting whether individuals are wearing masks can aid in
enforcing safety protocols in public spaces. In this paper, they propose a modified version
of the YOLOv4 object detection framework tailored specifically for face mask detection.
Our modified model achieves high accuracy and real-time performance, making it
Additionally, they discussed the integration of the proposed system into existing
CHAPTER 3
METHODOLOGY
13
The Prototype Model is a suitable approach for developing a face mask detection
system, especially when there is a need to gather feedback from stakeholders and validate
requirements before full-scale development. Here's how the Prototype Model could be
Requirements
Gathering
Quick
Refinement Design
Prototype Prototype
Testing Development
User Training
Figure 2 presents the Work Breakdown Structure for the development of the
have a systematic investigation and study of the materials and sources of facts in order to
established and search new conclusions for the purpose of the study. Descriptive research
Identify Requirements
15
developers. Identify the key features and functionality expected from the face mask
detection system, such as face detection, mask classification, real-time processing, and
Design Prototype
detection system. The prototype should focus on demonstrating core functionality and
user interactions rather than implementing all features in full detail. Define the scope of
the prototype, including the types of images or videos it will process, the algorithms and
techniques it will use for face detection and mask classification, and the user interface
design.
Develop Prototype
Implement the prototype of the face mask detection system using appropriate
tools and technologies. Focus on developing the minimum requirements that showcases
the basic functionality required for detecting faces and classifying masks. Use sample
datasets or synthetic data to test the prototype and validate its performance. Iterate on the
Test Prototype
16
Conduct testing and evaluation of the prototype to assess its accuracy, reliability,
and usability. Test the prototype using various scenarios and input data to identify
potential issues and areas for improvement. Gather feedback from stakeholders, including
end-users, domain experts, and technical reviewers. Use feedback to refine the prototype
Validate Requirements
testing results. Ensure that the prototype meets the needs and expectations of end-users
and aligns with the project goals and objectives. Adjust requirements and refine the
Refine Prototype
Refine the user interface, improve algorithm performance, and enhance system
functionality based on the validated requirements and user preferences. Iterate on the
design and implementation of the prototype to create a more polished and robust version
Once the prototype has been validated and refined, plan for full-scale
development of the face mask detection system. Use insights gained from the prototype
17
project timeline. Define milestones, deliverables, and success criteria for the full-scale
development phase, and establish a roadmap for transitioning from the prototype to the
final product.
By following the Prototype Model, the researcher can create an initial version of
the face mask detection system that demonstrates core functionality, gathers feedback
development. This iterative approach helps mitigate risks, reduces development time, and
ensures that the final product meets the needs and expectations of end-users.
Start
Input image
End
18
The flowchart for the Python programming language-based face mask detection
system is displayed in Figure 4. Image acquisition is taking a picture with a camera, then
processing the input image to improve its quality and get it ready for detection. Identify
faces using a face identification method in the pre-processed image the system will then
extract that contains each face that has been discovered. To conclude the face mask
detection procedure, the system will then save the annotated image and detection results
Acquire Image
Image Processing
Image Classification/
Notification
Person Officer
As shown in the use case diagram above, acquiring image data from the video
camera is the first process in this system. All image data captured by the video camera
will be gathered here (which is represented with the “Acquire new image from stream
camera” process) for further data recognizing process. The next process is to detect and
recognize image data of people wearing masks or not. A dataset as a result of the learning
process is needed in the process. This dataset is obtained from the process of training the
machine to be able to recognize images of people wearing masks using training data and
testing data. The process of mask detection is represented in the actions of “Detect mask”
and checking whether the mask is detected or not. The officer will then receive a
notification sound or a beeping sound if the person detected is not wearing a mask.
Block Diagram
IDENTIFYING IF
THE PERSON IS MACHINE
BEEP ALERT WEARING MASK LEARNING
OR NOT ARCHITECTURE
The classifier (OpenCV) detects the input before proceeding to the pre-processing step.
The learning architecture generates result on the input image, classifying the image into
20
mask or no mask classes. If a person is detected not wearing a mask, then a beep alert
will be generated.
Activity Diagram
NO
No enter to the gate Detect?
YES
Figure 7 displayed the suggested system's activity diagram. The system will then
obtain a new picture from the camera of the individual who enters the gate. After the
system has recognized the image data, training and testing will be completed, and if the
individual who entered the gate was not wearing a face mask, the officer will be warned
by beeping.
21
The respondent of the study will be the security guard and the patients of Cruzado
Hospital.
North Cotabato.
System Requirements
Hardware
o Camera
Software
Google Colab
REFERENCES
Guo, W., Li, W., & Zhao, J. (2020). "Face Mask Detection Using Modified YOLOv4."
2020 IEEE 7th International Conference on Cloud Computing and Intelligence
Systems (CCIS).
Khan, M. A., Khan, S., Alam, M., Alrubaian, M., & Alrubaian, M. (2020). Deep
Learning-Based Face Mask Detection System. arXiv preprint arXiv:2010.06013.
Lin, T. Y., Goyal, P., Girshick, R., He, K., & Dollár, P. (2019). Focal Loss for Dense
Object Detection. In Proceedings of the IEEE International Conference on
Computer Vision (ICCV) (pp. 2980-2988).
Mohan, A., Thiruvarangan, P., & Dhinakaran, P. (2021). "Real-time Face Mask
Detection Using Convolutional Neural Networks." 2021 International
Conference on Communication and Signal Processing (ICCSP).
23
Nguyen, T. T., Nguyen, T. N., & Nguyen, D. C. (2020). Real-Time Face Mask Detection
System Using YOLOv3 and Deep Learning. In 2020 9th International
Conference on Computer and Communication Systems (ICCCS) (pp. 399-404).
IEEE.
Patel, A., Bhatt, N. S., & Patel, K. (2021). Survey on Deep Learning Techniques for Face
Mask Detection. In 2021 International Conference on Advances in Computing,
Communication Control and Networking (ICACCCN) (pp. 1-5). IEEE.
Tan, M., Pang, R., & Le, Q. V. (2020). EfficientDet: Scalable and Efficient Object
Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and
Pattern Recognition (pp. 10781-10790).
Wang, C., Xu, S., Li, J., Yang, J., & Zhang, X. (2021). A Survey on Face Mask Detection
and Recognition Methods During the COVID-19 Pandemic. IEEE Access, 9,
103706-103726.
Zhang, J., Jiang, Z., Liu, J., & Xiong, L. (2021). Face Mask Detection and Recognition
Using Deep Learning: A Review. IEEE Access, 9, 73959-73974.
Zhang, Z., Yan, M., & Zhao, L. (2020). "A Novel Face Mask Detection Method Based on
YOLOv4." IEEE Access, 8, 191499-191508.