0% found this document useful (0 votes)
5 views33 pages

Project 3-2-2

The document outlines the design and development of a real-time face mask detection and hand sanitizer dispenser system using ESP32 camera and ultrasonic sensors. It emphasizes the importance of public health safety during the COVID-19 pandemic by ensuring compliance with mask-wearing and sanitization protocols in various settings. The proposed methodology integrates AI and deep learning techniques for effective monitoring and alerts, while also addressing existing challenges and research gaps in mask detection technology.

Uploaded by

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

Project 3-2-2

The document outlines the design and development of a real-time face mask detection and hand sanitizer dispenser system using ESP32 camera and ultrasonic sensors. It emphasizes the importance of public health safety during the COVID-19 pandemic by ensuring compliance with mask-wearing and sanitization protocols in various settings. The proposed methodology integrates AI and deep learning techniques for effective monitoring and alerts, while also addressing existing challenges and research gaps in mask detection technology.

Uploaded by

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

INDEX

• ABSTRACT • DETAILED PROPOSED


• INTRODUCTION METHODOLOGY
• MOTIVATION • ML AND DL ALGORITHMS
• SAMPLE CODE
• PROBLEM DEFINITION • PACKAGES USED
• LITERATURE SURVEYRESEARCH GAPS • RESULT ANALYSIS
• PROPOSED SYSTEM • CONCLUSION
• ADVANTAGES & APPLICATIONS • FUTURE SCOPE
• REFERENCES
• EXISTING METHODOLOGY
• DRAWBACKS
• PROPOSED METHODOLOGY
• SOFTWARE DETAILS
2
ABSTRACT
Design and Development of Real Time Face Mask Detection Hand Sanitizer using
ESP 32 camera and Ultrasonic sensor with automatic dispenser. Especially for
monitoring of manual entries at doors and gates is difficult and announcement of
instructions also tough. To solve this issue, we propose system that can monitor
face mask detection and auto sanitize dispenser. Arduino and ESP32-CAM are
connected together through Serial interface ESP32-CAM module has built-in WIFI
and camera. It can connect to WIFI hotspot or WIFI router and established
connection to local network. It will stream video on HTML web page through IP
address. Also WIFI module (ESP8266/IOT) also connected to same network to post
data to IOT server. In this project we have to show face in front of camera and
press button then it will detect face mask status. If the mask not detected it will
alert you through buzzer. If the mask is detected and its ready for dispense sanitizer.
If we keep hands down ultrasonic sensor will detect that hand automatically
sanitizer pump will turn on.
3
INTRODUCTION
In recent years, image processing and computer vision topics such as Face Mask
Detection using Thermal Scanning and Hand Sanitization have been popular. To
overcome this issue the most successful safety measure is wearing a face mask and
following respective safety measures in public places. According to records,
wearing facemasks and maintaining good cleanliness while at work significantly
minimizes the risk of viral transmission. An efficient and cost-effective method of
applying AI to establish a safe environment in a manufacturing environment. A
method of applying artificial intelligence to create a healthy working environment
that is both reliable and cost-effective in a sustainable setting. For face mask
detection, a model that combines deep and traditional machine learning will be
proposed. We'll use a Raspberry Pi 3 Model B to detect faces in real time from a live
flux from our webcam, Contactless Temperature Sensors for temperature
measurement and non-destructive tracking, and other sensors with an automatic
hand sanitizer dispenser, and build a model by integrating each of these components.

4
MOTIVATION
• Public Health and Safety
• Real-World Application
• Innovation and Impact
• Collaboration and Interdisciplinary Approach
• Technical Challenge
• Learning and Skill Development

5
PROBLEM DEFINITION

• During the Pandemic period, face masks have proved to be the most effective step
toward preventing the spread of COVID 19. However, it is difficult for an
organization to ensure this behavior on a collective basis.
• People often violate this rule which the organization has to suffer. In the wake of
this, we have designed software that will solve this.
• The proposed software will not only detect non-compliance with face mask-
wearing but also provide real-time monitoring, thereby minimizing the risk of
COVID-19 transmission in the workplace.

6
LITERATURE SURVEY
S.
TITLE AUTHOR YEAR KEY FINDINGS
No
G. Jignesh Chowdary, Applied transfer learning (InceptionV3)
Face Mask Detection using Transfer
01. N. S. Punn, 2020 to detect mask-wearing with 100% test
Learning of InceptionV3
S. Agarwal accuracy on SMFD

Introduced a one-stage detector with a


Retina Face Mask: A Single Stage Face Xinqi Fan &
02. 2020 context-attention module to distinguish
Mask Detector Mingjie Jiang
correctly vs incorrectly worn masks

Combined SSD-TinyYOLO (visual) and


M. Rahman,
COVID-19 Facial Mask Detector using IR readings for fever detection,
03. S. Hossain & 2020
SSD-TinyYOLO and Thermal IR implemented on Jetson TX2—80 FPS,
M. Ahmad
92% detection accuracy

WearMask: Fast In-browser Face Mask Zekun Wang, Pengwei YOLO-based model runs entirely in-
04. Detection with Serverless Edge Computing Wang, Peter C. Louis, 2020 browser using Web Assembly/NCNN;
for COVID-19 et al. privacy-preserving and installation-free

Implemented with VGG16 CNN on


Automatic Face Mask Detection System in
S. Panakaje, Raspberry Pi, achieving 99%+ accuracy
05. Public Transportation in Smart Cities Using 2020
H.U. Rahiman et al on a real-world dataset of 1,386 images
IoT and Deep Learning
in public transit environments
7
S.
TITLE AUTHOR YEAR KEY FINDINGS
No

Describes a wearable helmet system


Conceptual design: A novel COVID-19
06. Al-Humairi et al 2020 featuring thermal IR and mask detection for
smart AI helmet
automated screening in high-risk zones

Raspberry Pi 3-based system combining


Face Mask Detection and Sanitizer OpenCV mask detection, MLX90614 IR
07. Akash Thakre et al 2021
Dispenser with Temperature Detection sensor, automatic door lock, buzzer,
ultrasonic-triggered sanitizer, and LCD alerts

Ahmed Barnawi, IoT-UAV system combining thermal


AI-enabled IoT System for COVID-19
08. Prateek Chikara et 2021 imaging, face-mask detection, and onboard
Screening using Aerial Thermal Imaging
al edge analytics with ~99.5% overall accuracy

Ahmed Barnawi, UAV-based IoT system combining thermal


AI-enabled IoT System for COVID-19 Prateek Chikara, imaging and face-mask detection onboard
09. 2021
Screening using Aerial Thermal Imaging Rajkumar Tekchan drones; achieves ~99.5% accuracy using
dani et al edge analytics

Raspberry Pi and TensorFlow model


IoT-Enabled smart doors for monitoring B. Varshini, H.R.
10. 2021 integrated with contactless temperature
body temperature and face mask detection Yogesh et al
sensor and gateway control for smart entry

8
S. No TITLE AUTHOR YEAR KEY FINDINGS

CNN-based mask detection integrated with


Temperature and Face Mask Detection with Nihaal Manjunath, temperature sensor, ultrasonic/gesture
11. 2022
Contactless Sanitizer Dispenser Mohammed Shafi sensors, and automatic sanitizer dispenser.
Prototype tested on a 50-image dataset

Artificial Intelligence Based Mask Detection Hybrid deep/classical ML + Raspberry Pi,


Ashlesha D. Mahalle
12. With Thermal Scanning and Hand Sanitization 2022 IR thermal sensor, and ultrasonic sanitizer
et al
Based Entry System dispenser for smart entry points

Embedded-focused model combining SSD


Real-Time Mask Detection Based on and MobileNetV2. Mixed enhancement
13. Chen Cheng 2022
SSD-MobileNetV2 and transfer learning for faster inference
and effective performance

Used thermal imaging ML to detect masks


Automated Thermal Screening for COVID-19 Pratik Katte, and screen temperature. Thermal-only
14. 2022
using Machine Learning Siva Teja Kakileti mode performed comparably even in low
light
Enhanced YOLOv5 with attention
An Improved Lightweight YOLOv5 Model
Šheng Xu, Zhanyu Guo backbone achieving 95.2 mAP and 28%
15. Based on Attention Mechanism for Face Mask 2023
et al faster inference using ShuffleCANet,
Detection
BiFPN, and α-CIoU
9
S. No TITLE AUTHOR YEAR KEY FINDINGS

A Raspberry Pi model that detects masks,


T. Jalaja, measures body temperature, and
Face Mask Detection, Temperature Scanning,
16. T. Adilakshmi, 2023 automates sanitization via a contactless
and Sanitization Automation
P. Amulya hand sanitizer—built using OpenCV,
TensorFlow, Keras

Raspberry Pi-based contactless system


combining mask detection, temperature
Face Mask Detection, Temperature Scanning, Tattari Jalaja, T.
17. 2023 measurement, and automatic sanitizer
and Sanitization Automation Adilakshmi
dispensing—using OpenCV, TensorFlow,
and Keras

Compares VGG, Res Net, Dense Net,


Implementation of Deep Learning Models for
V. Vanitha, NAS Net models; achieves 93.8% top
18. Real-Time Face Mask Detection System 2023
R. Natarajan accuracy. Deploys NAS Net-Mobile on Pi
Using Raspberry Pi
for standalone mask screening
Uses YOLOv5-nano for mask localization
Mask Detection and Classification in Thermal (~97% MAP) and CNN for mask-type
19. Natalia Kowalczyk 2023
Face Images classification (~91% accuracy) on thermal
datasets
The latest YOLO version used for
Deep Learning-Based Face Mask Recognition C. Dewi, D. Manongga
20. 2024 improved detection accuracy and
with YOLOv8 et al
inference speed 10
RESEARCH GAPS
Real-Time Performance:
• Integrating masked face recognition into real-world scenarios poses intricate
challenges, given the variability in lighting conditions, diverse camera angles, and
environmental factors.
Mask Type and Quality:
• The type and quality of masks can affect detection accuracy, with some models
struggling to detect certain types of masks or mask-wearing styles.
Multi-Task Learning:
• There is a need for models that can simultaneously perform face detection, mask
detection, and identity verification.

11
PROPOSED SYSTEM
• To design a smart system that ‘automatically detects whether a person is wearing a
face mask or not’ using artificial intelligence, helping promote public health and
safety in places like schools, offices, and public transport.
What We’re Using:
• ‘Python’ for coding
• ‘OpenCV’ for video handling
• ‘TensorFlow / Keras’ for deep learning
• ‘Pre-trained CNN (Convolutional Neural Network)’
to detect masked vs unmasked faces
• ‘Raspberry Pi / Laptop’ as the processing unit
(depending on budget)

12
ADVANTAGES
• Enhanced Public Safety: Helps prevent the spread of infectious diseases by
ensuring compliance with mask-wearing mandates.
• Real-Time Monitoring: Provides immediate alerts and notifications for non-
compliance, enabling prompt corrective action.
• Automated Surveillance: Reduces the need for manual monitoring, saving time
and resources.
• Improved Accuracy: Utilizes AI and computer vision to accurately detect face
masks, minimizing false positives/negatives.
• Scalability: Can be integrated into various settings, such as public transportation,
schools, offices, and healthcare facilities.

13
APPLICATIONS

• Public Health: Assists in enforcing mask-wearing policies to reduce the


transmission of infectious diseases.
• Smart Cities: Enhances urban safety and health monitoring through AI-powered
surveillance.
• Workplaces: Ensures employee safety and compliance with health guidelines in
offices, factories, and construction sites.
• Transportation: Monitors and enforces mask-wearing in public transport systems,
such as buses, trains, etc.

14
EXISTING METHODOLOGY

• Deep Learning-based Approach: Convolutional Neural Networks (CNNs) to detect


face masks in images or videos. These models can learn features from large
datasets.
• Traditional Computer Vision Approach: Edge detection, feature extraction, and
classification to detect face masks. These methods can be effective for specific use
cases but may not generalize well to diverse scenarios.
• Hybrid Approach: Combines deep learning and traditional computer vision
techniques to leverage the strengths of both approaches. This can lead to more
robust and accurate face mask detection systems.

15
DRAWBACKS

• Occlusion Complexity
• Dataset Bias
• Low Reliability
• Security Risks and Data Breaches
• Misuse of Data
• Ethical and Human Rights Concerns
• Cost and Implementation
• Dependence on Quality Hardware and Lighting Conditions

16
PROPOSED METHODOLOGY
• Data Collection – Teach the AI What a Mask Looks Like.
• We use public datasets and can even take a few of our own photos to train the AI.
• Data Preprocessing – Clean Up Time.
• We resize the images, remove noisy data, and label them clearly.
• Model Training – Time to Learn.
• We use a Convolutional Neural Network (CNN) — a type of AI model that’s great
at image recognition.
• Model Testing – Does It Actually Work.
• Once trained, we test the model on new images to check its accuracy.
• Live Integration – Make It Real.
• The camera captures video in real time, and the model checks each face instantly.
17
SOFTWARE DETAILS

• Programming Language: Python


• Deep Learning Framework: TensorFlow or PyTorch
• Computer Vision Library: OpenCV
• Model Architecture: Convolutional Neural Networks (CNNs), such as:
- YOLO (You Only Look Once)
- SSD (Single Shot Detector)
• Real-time Processing: Utilize libraries like OpenCV or PyTorch

18
DETAILED PROPOSED METHODOLOGY

• AI-powered face mask detection system integrated with sanitization module


Key Components:
• Camera Module: captures images/video streams
• AI Model: detects face masks using deep learning
• Sanitization System: triggers sanitization when no mask detected
• Benefits: Contactless sanitization, real-time detection, improved hygiene, reduced
transmission risk
• Applications: Public places, workplaces, transportation hubs

19
ML AND DL ALGORITHMS

• Convolutional Neural Networks (CNNs): Image classification and object detection


for face mask detection
• Transfer Learning: Utilizing pre-trained models (e.g., VGGFace, ResNet) for
improved accuracy
• YOLO (You Only Look Once): Real-time object detection for face mask detection
• OpenCV: Computer vision library for image processing and feature extraction

20
SAMPLE CODE
pip install tensorflow keras opencv-python imutils
sudo apt-get install python3-rpi.gpio
from tensorflow.keras.models import load_model
import cv2
import numpy as np
# Load pretrained face mask detection model
model = load_model("mask_detector.model") # You can train your own or use a
public one
# Load Haar Cascade for face detection
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades +
'haarcascade_frontalface_default.xml')

21
import RPi.GPIO as GPIO
import time

RELAY_PIN = 17
GPIO.setmode(GPIO.BCM)
GPIO.setup(RELAY_PIN, GPIO.OUT)
cap = cv2.VideoCapture(0) # Webcam

while True:
ret, frame = cap.read()
if not ret:
break

gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

22
faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=4)

for (x, y, w, h) in faces:


face_img = frame[y:y+h, x:x+w]
face_resized = cv2.resize(face_img, (224, 224)) / 255.0
face_input = np.expand_dims(face_resized, axis=0)

result = model.predict(face_input)[0]
label = "Mask" if result[0] > 0.5 else "No Mask"
color = (0, 255, 0) if label == "Mask" else (0, 0, 255)
cv2.rectangle(frame, (x, y), (x+w, y+h), color, 2)
cv2.putText(frame, label, (x, y-10),
cv2.FONT_HERSHEY_SIMPLEX, 0.9, color, 2)
23
# Trigger sanitizer if no mask detected
if label == "No Mask":
print("No mask detected - activating sanitizer...")
GPIO.output(RELAY_PIN, GPIO.HIGH)
time.sleep(2)
GPIO.output(RELAY_PIN, GPIO.LOW)

cv2.imshow('Mask Detection', frame)


if cv2.waitKey(10) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
GPIO.cleanup()
24
PACKAGES USED

• TensorFlow/Keras: Deep learning framework for building and training models


• OpenCV: Computer vision library for image processing and feature extraction
• PyTorch: Alternative deep learning framework for building and training models
• NumPy: Library for numerical computations and data manipulation
• Scikit-learn: Library for machine learning tasks and model evaluation

25
RESULT ANALYSIS

• Accuracy: 95%+ accuracy in detecting face masks


• Precision: High precision in identifying masked and unmasked individuals
• Recall: Effective detection of unmasked individuals triggering sanitization
• False Positives/Negatives: Low rate of false positives/negatives ensuring reliable
system performance
• System Response Time: Fast response time enabling real-time sanitization and
alert notifications

26
CONCLUSION

• Effective Solution: AI-powered face mask detection with sanitization system


enhances public health and safety
• Real-time Detection: Accurate and efficient detection of face masks in real-time
• Automated Sanitization: Contactless sanitization triggered by AI system reduces
transmission risk
• Future Potential: Scalable solution for various applications, promoting a healthier
environment

27
FUTURE SCOPE
• Integration with IoT Devices: Integrating the system with IoT devices for wider
deployment
• Multi-Functionality: Expanding the system to detect other health risks, such as
temperature or social distancing
• Edge Computing: Implementing edge computing for faster processing and reduced
latency
• Cloud-Based Solution: Developing a cloud-based solution for scalability and
remote monitoring
• Global Adoption: Potential for global adoption in various industries, including
healthcare, transportation, and education

28
REFERENCES

• Face Mask Detection using Transfer Learning of InceptionV3 by


G. Jignesh Chowdary, N. S. Punn, S. Agarwal in 2020.
• Retina Face Mask: A Single Stage Face Mask Detector by Xinqi Fan &
Mingjie Jiang in 2020.
• COVID-19 Facial Mask Detector using SSD-TinyYOLO and Thermal IR by
M. Rahman, S. Hossain & M. Ahmad in 2020.
• WearMask: Fast In-browser Face Mask Detection with Serverless Edge
Computing for COVID-19 by Zekun Wang, Pengwei Wang, Peter C. Louis, et al
in 2020.
• Automatic Face Mask Detection System in Public Transportation in Smart Cities
Using IoT and Deep Learning byS. Panakaje, H.U. Rahiman et al in 2020

29
• Conceptual design: A novel COVID-19 smart AI helmet by Al-Humairi et al in
2021.
• Face Mask Detection and Sanitizer Dispenser with Temperature Detection​ by
Akash Thakre et al​ in 2021.
• AI-enabled IoT System for COVID-19 Screening using Aerial Thermal Imaging​
by Ahmed Barnawi, Prateek Chikara et al​ in 2021.
• AI-enabled IoT System for COVID-19 Screening using Aerial Thermal Imaging​
by Ahmed Barnawi, Prateek Chikara, Rajkumar Tekchandani et al​ in 2021.
• IoT-Enabled smart doors for monitoring body temperature and face mask detection​
by B. Varshini, H.R. Yogesh et al​ in 2021.

30
• Temperature and Face Mask Detection with Contactless Sanitizer Dispenser by
Nihaal Manjunath, Mohammed Shafi in 2022.
• Artificial Intelligence Based Mask Detection With Thermal Scanning and Hand
Sanitization Based Entry System by Ashlesha D. Mahalle et al in 2022.
• Real-Time Mask Detection Based on SSD-MobileNetV2 by Chen Cheng in 2022.
• Automated Thermal Screening for COVID-19 using Machine Learning by
Pratik Katte, Siva Teja Kakileti in 2022
• An Improved Lightweight YOLOv5 Model Based on Attention Mechanism for
Face Mask Detection by Šheng Xu, Zhanyu Guo et al in 2022

31
• Face Mask Detection, Temperature Scanning, and Sanitization Automation by
T. Jalaja, T. Adilakshmi, P. Amulya in 2023.
• Face Mask Detection, Temperature Scanning, and Sanitization Automation by
Tattari Jalaja, T. Adilakshmi in 2023.
• Implementation of Deep Learning Models for Real-Time Face Mask Detection
System Using Raspberry Pi by V. Vanitha, R. Natarajan in 2023.
• Mask Detection and Classification in Thermal Face Images by Natalia Kowalczyk
in 2023.
• Deep Learning-Based Face Mask Recognition with YOLOv8 by C. Dewi, D.
Manongga et al in 2023.

32
THANKYOU

33

You might also like