Face Mask Detection System Using AI and ML
Face Mask Detection System Using AI and ML
System
Yuvraj PassiUsing AI and ML
Shobhit Jain
Shubhang Singh
Agenda
1 2 3 4 5
Introduction Methodology Model Model Results
Architecture Training
3
Related Work
• Several studies and projects have explored the use of computer vision for face
detection and classification. Most notably, advancements in deep learning,
particularly using CNNs, have made it possible to achieve high accuracy in image
classification tasks.
• This project focuses on a custom-trained CNN model optimized for face mask detection.
Unlike previous solutions, this project integrates real-time video stream analysis, making it more
suitable for practical, real-world applications like surveillance in public places.
Dataset:
The dataset used for training the model consists of images categorized into two classes:
"With Mask" and "Without Mask".
Data Augmentation:
To enhance model performance and prevent overfitting, data augmentation techniques such as
rotation, flipping, and scaling were applied.
Image Preprocessing:
Images are resized to 128x128 pixels, converted to RGB, and normalized for optimal model
training.
• Output Layer: Sigmoid activation function for binary classification ("With Mask" or "Without Mask").
The model was trained using the Adam optimizer with a learning rate of 0.001, and binary cross-entropy
as the loss function.
• Evaluation Metrics:
Accuracy, precision, recall, and F1-score were used to evaluate the model's performance on the test set.
• Real-Time Detection:
OpenCV was utilized for capturing live video feed and detecting faces using the Haar Cascade Classifier.
The trained model was then applied to classify detected faces.
• Webcam Integration: The system uses OpenCV to access the webcam for real-time
mask detection.
• User Interface: The detected faces are highlighted with bounding boxes, and the
classification result ("With Mask" or "Without Mask") is displayed on the video feed.
Real-Time Detection Accuracy: Successfully classified mask usage with over 95% accuracy in real-time video feeds. The
system was tested under various lighting conditions and angles, demonstrating robust performance in detecting masks.
• Sample Output
• The system draws a bounding box around the detected face and displays a label indicating "With Mask" or "Without
Mask".
13
Any
Questions?