Real-Time Facemask Detection and Alerting System Using Deep Learning
Real-Time Facemask Detection and Alerting System Using Deep Learning
21
TEAM MEMBERS:
BRIHAT KALERU
20261A3214 Real-Time Face Mask
Detection and Alert System
M SOHAN
20261A3239 using Deep Learning
NAVAKESH GUIDE:
Dr. B HARIKA
21265A3205 ASSOCIATE PROFESSOR, IT
CONTENTS
Abstract Modules
Introduction UML Diagrams
Existing System Algorithms
Proposed System Implementation & Packages
Requirements Sample Code
Literature survey Output
System Architecture Conclusion
ABSTRACT
◼ A real-time face mask detection and alert system is developed using deep learning
techniques.
◼ The system utilizes Convolutional Neural Networks (CNNs) and Haar-Cascade
Classifier to accurately identify masked individuals in live video streams.
◼ The system triggers alerts when individuals without masks are detected, aiming to
enforce mask-wearing protocols and promote public health.
◼ The system facilitates immediate intervention and proactive rectification of non-
compliance, contributing to disease prevention and control efforts.
INTRODUCTION
◼ The "Real-Time Face Mask Detection and Alert System using Deep Learning" project
aims to create a system that can detect whether a person is wearing a face mask in
real time.
◼ The system uses advanced computer techniques called deep learning to analyze live
video or images and make quick decisions.
◼ If the system detects that a person is not wearing a mask where it is needed, it will
trigger an alert to notify the relevant people or authorities, helping to ensure
compliance with mask wearing guidelines and potentially preventing the spread of
diseases.
EXISTING SYSTEM
● In the existing system, face mask detection might rely on manual inspection or
human monitoring.
● This could involve having individuals stationed to visually check whether people
entering a specific area are wearing masks.
● However, this approach has limitations:
Subjectivity: Manual inspection can be subjective.
Resource Intensive: It requires dedicated personnel to continuously monitor and
enforce mask-wearing rules.
Delay: Even if detected, there might be a delay in addressing non-compliance,
which could impact the effectiveness of mask-wearing measures.
Scalability: Manual monitoring is not scalable for large crowds or areas.
PROPOSED SYSTEM
● The proposed system aims to use deep learning techniques to automate the
process of real-time face mask detection and alerting.
Face Mask Detection: The system employs a deep learning model, trained on a
dataset of images of people with and without masks, analyzes the detected
faces and classifies whether a person is wearing a mask.
Alerting: If a person is detected without a mask where it's required, the system
generates an alert in real-time and can send notifications to relevant parties.
● The proposed system has the following advantages over existing systems -
Automation, Real-Time, Scalability, and Efficiency.
REQUIREMENTS
SOFTWARE REQUIREMENTS:
LANGUAGES: Python
DATABASES & SECURITY: SQL
SCRIPTING LANGUAGES: HTML,CSS &JS
HARDWARE REQUIREMENTS:
A. Ghosh, T. Shetty and J. Silviya Nancy, "Face Mask Detection And Alert System Using Convolution Neural
Networks," IEEE International Conference on Computation System and Information Technology for Sustainable
Solutions (CSITSS), Bangalore, India, 2021, pp. 1-6.
The authors addresses the issue of real-time face mask detection in video streams using deep learning
techniques.
The authors propose an end-to-end deep neural network architecture that can detect whether a person is
wearing a face mask or not.
The model is trained on a large dataset of annotated images containing people with and without masks.
The proposed architecture involves convolutional neural networks (CNNs) for feature extraction and
classification.
The system is designed to work in real-time video streams and demonstrates accurate and efficient face mask
detection, contributing to safety measures during the COVID-19 pandemic.
MODULES
◼ Data Acquisition Module:- OpenCV or FFmpeg: For capturing and processing video streams or image frames
from cameras or video sources.
◼ Face Detection Module:- Pre-trained CNN models (ResNet50, DenseNet, MobileNet-V2): For efficient face
detection in real-time.- Face detection libraries (dlib, OpenCV): To detect and localize faces in the captured
frames.
◼ Mask Classification Module:- Pre-trained CNN models (VGG16, InceptionV3, Xception): For classifying
whether a detected face is wearing a mask or not.- Face mask classification libraries (OpenCV, Keras,
TensorFlow): To implement and train the mask classification model.
◼ Alert Generation Module:- OpenCV or Pygame: For generating visual alerts or audio signals.- Notification
APIs or libraries: To send notifications to a monitoring system.
SYSTEM ARCHITECTURE
CLASS DIAGRAM
USE CASE DIAGRAM
SEQUENCE DIAGRAM
ACTIVITY DIAGRAM
DATA FLOW DIAGRAM
ALGORITHM
CNN:
● A Convolutional Neural Network (CNN) is a deep learning model specifically designed for
image processing tasks.
● It consists of multiple layers, including convolutional layers, pooling layers, and fully
connected layers, that work together to extract features from images.
● A convolutional neural network (CNN or ConvNet) is a network architecture for deep
learning that learns directly from data.
Keras:
● Keras is an open-source high-level neural networks API written in Python.
● It serves as an interface to other deep learning frameworks, including TensorFlow.
● Keras allows for quick prototyping of deep learning models and supports various types of neural
networks, such as convolutional neural networks (CNNs), etc.
PACKAGES
OpenCV (Open Source Computer Vision Library):
● OpenCV is an open-source computer vision and machine learning software library.
● It offers a wide range of tools and functions for image and video processing, including image
recognition, object detection, and facial recognition.
NumPy:
● NumPy is a fundamental library for scientific computing in Python.
● It provides support for arrays and matrices, along with mathematical functions to operate on these
arrays efficiently.
Smtplib:
● Smtplib is a built-in Python module that provides a simple way to send emails using the Simple Mail
Transfer Protocol (SMTP)
TEST CASES
Test Test Case Purpose Input Expected Actual result Result
Case Name result
ID
Test Test Case Purpose Input Expected Result Actual Result Result
Case Name
ID
Fig - Output email to the user when they are detected without a mask
CONCLUSION
● In conclusion, the real-time face mask detection and alert system uses deep learning
and face recognition technology to improve safety and compliance with mask-
wearing guidelines.
● Using a pre-trained deep learning model, the system can accurately identify whether
a person is wearing a mask or not, providing immediate visual feedback.
● Additionally, it includes face recognition to identify individuals.
● When an individual without a mask is detected, the system not only alerts them but
also sends an email notification to the respective person.
● This proactive approach ensures that safety measures are upheld and potentially
risky situations are addressed promptly.
THANK YOU