Mask Detector
Table of Contents
🧾 Description
MaskDetector is a deep learning application that uses PCA, eigenfaces, and convolutional neural networks (CNNs) to detect whether people in a camera frame are wearing masks. The system preprocesses the face data using PCA and computes eigenfaces to identify human faces in the frame. It then uses a CNN model to classify each face as either “with mask” or “without mask.” The system can be integrated with a camera feed to detect mask usage in real-time. The goal of the mask detector is to promote public health and safety during the COVID-19 pandemic by making it easier to detect when people are not wearing masks in public areas.
🚶♂️ Steps
- Preprocessing with Principle Component Analysis (PCA): With PCA, we can reduce the dimensionality of the input images and extract the most important features of the face data.
- By computing the eigenvalue and eigenvector of the covariance matrix, we can identify the most important facial features and use these to construct a set of “eigenfaces.”
- To detect faces in an image, we can project the input image onto the set of eigenfaces and calculate the distance between the original image and the projected image. If the distance is below a certain threshold, the image is identified as a human face.
- To detect whether a person is wearing a mask or not, we train a convolutional neural network (CNN) model using ReLU and softmax activation functions. The CNN will learn to recognize patterns in the input images and classify them as either “with mask” or “without mask.”
- Open the camera and detect whether people in the frame are wearing masks or not.