0% found this document useful (0 votes)
11 views

Face Mask Detection and Alarming System Using Machine Learning

The document presents a face mask detection and alarming system using machine learning to help mitigate COVID-19 transmission. It describes the integration of deep learning and classical machine learning algorithms to identify individuals without masks through surveillance cameras and send alerts when a threshold is crossed. The proposed system aims to enhance real-time detection accuracy and reliability compared to traditional methods.

Uploaded by

Stark Jones
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Face Mask Detection and Alarming System Using Machine Learning

The document presents a face mask detection and alarming system using machine learning to help mitigate COVID-19 transmission. It describes the integration of deep learning and classical machine learning algorithms to identify individuals without masks through surveillance cameras and send alerts when a threshold is crossed. The proposed system aims to enhance real-time detection accuracy and reliability compared to traditional methods.

Uploaded by

Stark Jones
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Journal of Advances in Engineering and Management (IJAEM)

Volume 5, Issue 1 Jan. 2023, pp: 914-919 www.ijaem.net ISSN: 2395-5252

Face Mask Detection and Alarming System


Using Machine Learning
Suhail Rashid Wani1 Roshni Afshan2, Dr. Jabir Ali3
School of Engineering and Technology, Department of Computer and Engineering,Sharda University, Greater
Noida, UP, India.
School of Engineering and Technology, Department Computer Science and Engineering, Sharda University,
Greater Noida, UP, India.

--------------------------------------------------------------------------------------------------------------------------------------
Date of Submission: 17-01-2023 Date of Acceptance: 27-01-2023
---------------------------------------------------------------------------------------------------------------------------------------
ABSTRACT -According to the World Health learning enables researchers and physicians to
Organization, the coronavirus COVID-19 analyze massive amounts of data to estimate the
pandemic is producing a worldwide health dissemination of COVID-19, act as an early
catastrophe, and the most effective protective warning system for possible pandemics, and
strategy is wearing a face mask in public places categorize susceptible groups. We can tackle and
(WHO). According to reports, wearing a facemask predict new diseases with the help of new
in general settings minimizes the chance of technologies such as artificial intelligence, IoT, Big
transmission. This paper describes and construct an data, and Machine learning.
ensemble of Deep Learning and Machine Learning Here we introduce a facemask detection
algorithms to recognize persons without face masks model based on computer vision and deep learning.
and send an email alert when the count threshold The proposed model integrates with Surveillance
crosses. The facemask dataset consists of images of Cameras to impede the COVID19 transmission by
people with and without masks. Our objective is to detecting people wearing masks, no face masks.
take advantage of existing cameras and detect The model is an integration between deep learning
persons wearing masks and avoid virus and classical machine learning. We have
transmission. implemented multiple Machine Learning and Deep
Learning algorithms to achieve the highest
I. INTRODUCTION accuracy and consume the least time in training and
The COVID-19 coronavirus outbreak all detection.
over the world has mandated the use of face masks.
Scientists demonstrated that wearing facemasks II. LITERATURE REVIEW
reduces COVID-19 transmission. COVID-19's fast 2.1 "A Face-Mask Detection Approach based on
spread has compelled the World Health YOLO."
Organization to designate it as a worldwide An object detection model is used in the first
pandemic in 2020. The rapid development of the technique to discover and categorize masked and
COVID-19 pandemic has resulted in the world's unmasked faces. In the second technique, a YOLO
most serious public health disaster. There is no face detector detects faces (whether masked or not),
indication of a clinically approved antiviral and then a CNN architecture classifies the faces
treatment or immunization against the virus until into masked and unmasked categories. We used the
early 2021. People were forced by laws to wear Caffe model, a lightweight and computationally
face masks in public in many countries [18]. efficient model that makes working in real-time
However, the process of monitoring large groups of more manageable. For optimum performance at
people is becoming more complex in public places. high speeds, we examined five different models.
So, we create an automation process for detecting Our proposed approach solves the problem of
the faces. camera specification.
The coronavirus outbreak has led to substantial 2.2 "Rapid object detection using a boosted cascade
levels of international scientific cooperation. of simple features
Artificial Intelligence (A.I.) based on Machine Viola-Jones is an early face detection algorithm. It
Learning and Deep Learning can aid in the fight was designed to identify frontal faces, which it
against Covid-19 in various ways. Machine does better than faces looking laterally, above, or

DOI: 10.35629/5252-0501914919 |Impact Factorvalue 6.18| ISO 9001: 2008 Certified Journal Page 914
International Journal of Advances in Engineering and Management (IJAEM)
Volume 5, Issue 1 Jan. 2023, pp: 914-919 www.ijaem.net ISSN: 2395-5252

downwards. This algorithm recognizes and locates and then classify if the face has a mask[17] or not
human faces regardless of their size, location, or using a machine learning model. Caffe model is
surroundings. Viola-Jones fails when the face is capable of localizing face even with slight
covered, which makes it not a suitable approach. distortion in face angle. We compare multiple Deep
Our proposed system uses a Caffe model capable of Learning and Machine learning models for picking
detecting faces in distorted angles, low brightness, the best performing Face mask detection model.
and masks. The Neural Network architectures implemented
using Keras and Scikit-learn modules in Python.
Face Mask Detection using MTCNN and The real-time implementation made possible using
MobileNetV2 OpenCV.
This solution consists of MobileNet and
MTCNN as the backbone. The system was used for Approach
high and low computation scenarios. MobileNet is A two-phased approach is used which are
a lightweight CNN model built with the aim of discussed as follows;
modularity and efficiency. Though MTCNN is A.Training Phase: Training Dataset on multiple
robust and efficient, it is slow in the detection Machine learning and Deep Learning models, do
process and complex in methodology. The comparative analysis on various performance
proposed solution can overcome this problem and metrics.
is easy to implement using the OpenCV DNN B.Deployment Phase: Apply Face detection, face
module. mask classification on the real-time video feed
from the webcam. Send an email alert to the admin
Face Mask Detection. when the "without a mask" count crosses a
The proposed system is based on a deep threshold.
learning algorithm for image A.Training Phase
segmentationThetechnique of isolating the item of The dataset is adopted from an open-sourced
interest from the rest of the actual material using repository by Prajnasb. The dataset is categorized
input video processing is called segmentation. Face into two folders, namely "with_mask" and
landmarks are used to identify segmentation. "without_mask." Each folder consists of people's
Detecting, mapping, and analyzing landmarks faces with or without masks respective to their
necessitates a high level of computer capacity. The category. The images in the dataset underwent
current proposed solution would bypass the need preprocessing steps of noise reduction and image
for face-landmark detection and additional steps. resizing to maintain consistency and robustness.
Data augmentation was done to make the model
III. METHODOLOGY robust and avoid overfitting.
The proposed system aims to find human
faces using a pretrainedCaffe Face detection model

Fig 1: Training of the dataset with Conventional ML and CNN Algorithms.

To implement a best-performing model, Machine learning models: SVM, Random Forest,


we utilize transfer learning to adapt weights from a Decision Tree, KNN (K Nearest Neighbors), and
similar task face detection trained on an extensive two popular DNN models (InceptionV3,
dataset. Comparison among four conventional InceptionResNetV2).

DOI: 10.35629/5252-0501914919 |Impact Factorvalue 6.18| ISO 9001: 2008 Certified Journal Page 915
International Journal of Advances in Engineering and Management (IJAEM)
Volume 5, Issue 1 Jan. 2023, pp: 914-919 www.ijaem.net ISSN: 2395-5252

Fig 2: Comparison table of Machine Learning & Deep Learning Algorithms for Facemask classification.

In comparison, Random Forest has mis- with the highest votes of predictions. Random
proven the conventional thought of Neural Network Forest has proven to be the best performing model
performance over traditional machine learning compared to other ML and Neural Network
models. Out of all the algorithms, SVM has shown algorithms with an accuracy of 92%.
mere accuracy. Support Vector Machine, or SVM, Transfer Learning in layman terns is a
is a well-known Supervised Learning technique methodology that uses previously acquired
used for both classification and regression issues. knowledge in new problems. It is a widely popular
However, it is primarily utilized in Machine technique in Deep Learning. Transfer Learning
Learning for Classification difficulties. involves taking the pre-trained weights in the first
The SVM algorithm's purpose is to find layers, which are generally universal to many
the optimum line or decision boundary for datasets, and randomly initializing and training the
categorizing n-dimensional space to place new data remaining layers for classification purposes is a
points in the proper category in the future. A standard transfer learning method. On the
hyperplane is the optimal choice boundary. Out of ImageNet dataset, Inception v3 is a commonly used
the other three ML algorithms, SVM has poor image recognition model demonstrated to achieve
accuracy of 67%. Random Forest is a classifier that higher than 78.1 percent accuracy. The
combines several decision trees on different subsets InceptionResNet-v2 model is a variant of the
of a dataset and averages the results to increase the Inception V3 model, and it is far more accurate
dataset's predicted accuracy. Instead, depending on than the preceding Inception V3. The Inception-
a single decision tree, the random forest collects the ResNet-v2 architecture outperforms earlier stateof-
forecasts from each tree and indicates the output the-art models in terms of accuracy.

Fig 3: Bar plot of Model Vs. Accuracy.


DOI: 10.35629/5252-0501914919 |Impact Factorvalue 6.18| ISO 9001: 2008 Certified Journal Page 916
International Journal of Advances in Engineering and Management (IJAEM)
Volume 5, Issue 1 Jan. 2023, pp: 914-919 www.ijaem.net ISSN: 2395-5252

B.Deployment Phase Tensorflow version is available, we utilize the


The procedure for determining whether or not the Caffe Model.
individual on the camera is wearing a mask is a You'll need two sets of files to use OpenCV's deep
two-step process. neural network module with Caffe models:
1. Recognize the faces in the webcams frame. • The model architecture is defined by the
2. Categorize the faces into any of the two classes .prototxt file(s) (i.e., the layers themselves)
(With and Without masks). • The weights for the actual layers are stored in
The Caffe model is used to detect faces from the the .caffemodel file.
input frame. Caffe model employs the ResNet- According to internal Facebook benchmarks, Caffe
10 architecture and is based on the Single outperforms TensorFlow by 1.2 to 5 times.
Shot-Multibox Detector (SSD). It was included TensorFlow is the most popular deep learning
in OpenCV's deep neural network module after library for pictures and sequences, whereas Caffe is
version OpenCV 3.3. Although a quantized suitable for images but not for sequences or
recurrent neural networks.

Fig 4: Facemask detection and classification on live feed during the deployment phase.

Classification of facemask from detected "Without mask" face count crosses a specific count,
individual faces is done using the best performing the system alerts the admin with images of
Machine learning model. When the number of individuals without masks.

Fig 4.1: Webcam input frame of People With andWithout the mask
DOI: 10.35629/5252-0501914919 |Impact Factorvalue 6.18| ISO 9001: 2008 Certified Journal Page 917
International Journal of Advances in Engineering and Management (IJAEM)
Volume 5, Issue 1 Jan. 2023, pp: 914-919 www.ijaem.net ISSN: 2395-5252

Fig 4.2: Output of System after Face detection and Facemask classification

Input frames having individuals without certain count threshold. The alert email has a
the mask would be saved, and an email is sent to subject and images saved without mask frames as
the admin email after some saved frames cross a specified in Fig 5.

Fig 6: Email alert of individuals in the frame without masks at the admin's end.

IV. CONCLUSION this technique may reduce miss and error rates.
Our proposed system can identify and When several models are compared, the best model
recognize human faces in a real-time context. Face with the highest accuracy and prediction emerges.
detection and identification using the Caffe and The findings indicate that current face detection
Machine learning models provide faster detection and identification technology are slower and
and more reliable recognition. Compared to inaccurate, and the suggested method might replace
traditional face detection and recognition systems, it.

DOI: 10.35629/5252-0501914919 |Impact Factorvalue 6.18| ISO 9001: 2008 Certified Journal Page 918
International Journal of Advances in Engineering and Management (IJAEM)
Volume 5, Issue 1 Jan. 2023, pp: 914-919 www.ijaem.net ISSN: 2395-5252

REFERENCES Computer Conference, Computer Society


[1]. S. Joshi, S. S. Joshi, G. Kanahasabai, R. of Iran (CSICC), 2021, pp. 1-6, doi:
Kapil and S. Gupta, "Deep Learning 10.1109/CSICC52343.2021.9420599.
Framework to Detect Face Masks from [13]. "Face Mask Detection using MTCNN and
Video Footage," 2020 12th International MobileNetV2", Vansh Gupta1, Rajeev
Conference on Computational Intelligence Rajput2 iteSeerX "Rapid Object Detection
and Communication Networks (CICN), Using a Boosted Cascade"
Bhimtal, India, 2020, pp. 435-440, doi: http://citeseerx.ist.psu.edu/viewdoc/summ
10.1109/CICN49253.2020.9242625. ary?doi=10. 1.1.415.8118
[2]. Amit Chavda, Jason Souza, [14]. "Rethinking the Inception Architecture for
SumeetBadgujar "Multi-Stage CNN Computer Vision" by Szegedy et. al.
Architecture for Face Mask Detection," "Inception-v4, Inception-ResNet and the
September 2020 Impact of Residual Connections on
[3]. Guangchengwang, yumiao "Masked face Learning", Christian Szegedy, Sergey
recognition data sets and application" Ioffe, Vincent Vanhoucke, Alex
National natural science foundation of Alemi翻訳結果: Real-time Face Mask
china 2020 Detection in Video Data.
[4]. S. Ge, J. Li, Q. Ye, and Z. Luo, "Detection [15]. R. Suganthalakshmi, A. Hafeeza, P.
of Masked Faces in the Wild with LLE- Abinaya, A.Ganga Devi, 2021, Covid-19
CNN's" June 2016. Facemask Detection with Deep Learning
[5]. P. Viola and M. Jones, "Rapid object and Computer Vision,
detection using a boosted cascade of INTERNATIONAL JOURNAL OF
simple features," Proceedings of the 2001 ENGINEERING RESEARCH &
IEEE Computer Society Conference on TECHNOLOGY (IJERT) ICRADL –
Computer Vision and Pattern Recognition. 2021 (Volume 09 – Issue05)
CVPR 2001, 2001, pp. I-I, doi:
10.1109/CVPR.2001.990517
[6]. Roshan M Thomas, Motty Sabu, Tintu
Samson, ShihanaMol B, Tinu Thomas,
"Real Time Face Mask Detection and
Recognition using Python" June 2021
[7]. Sammy v. militante,
Nanettev.dionisioReal time face mask
recognition with alarm system using deep
learning 2020 11th IEEE control and
system graduate research colloquium
[8]. "Real Time Face Mask Detection and
Recognition using Python," Roshan M
Thomas, Motty Sabu, Tintu Samson,
ShihanaMol B, Tinu Thomas
[9]. "Effectiveness of Mask Wearing to
Control Community Spread of SARS-
CoV-2", John T. Brooks, MD1; Jay C.
Butler, MD1
[10]. Wenyunsun, Yusong, Changsheng, Face
spoofing detection based on local ternary
label supervision in fully convolutional
networks IEE transactions on information
forensis and security 2020.
[11]. "FACE MASK DETECTION," A.P.
NithyaPriya, V.Mavitha Sri, S. Monisha,
P.Prathibha, K.Rekha, April 2021.
[12]. S. Abbasi, H. Abdi, and A. Ahmadi, "A
Face-Mask Detection Approach based on
YOLO Applied for a New Collected
Dataset," 2021 26th International

DOI: 10.35629/5252-0501914919 |Impact Factorvalue 6.18| ISO 9001: 2008 Certified Journal Page 919

You might also like