After watching the news about air pollution, just thought about making a Mask and No Mask Classification Model so that it can be used in different programs like Real-time detection programs in Hotel, Hospital, Classroom, Work, and so on... This model is trained by Convolutional Neural Network and work pretty well based on the database.
Imported Packages
- TensorFlow
- Numpy
- Matplotlib
- CV2
Model Evaluation
Model Performance
Testing Mask
Process 1
Input image
Process 2
Pre-processing image
Process 3
Model Prediction and Result
Process 4
No mask image input
Process 5
Pre-processing Image
Process 6
Model Prediction and Result
The dataset of this program is from here -> https://github.com/prajnasb/observations/tree/master/experiements/data
Problem Statement
Images that had used as a dataset doesn't include the masks with different colors. Although the model works well, the images that have been trained are with the masks with white color so the model sees the mask with different colors as no mask.
Solution
Train the model with a dataset that includes every kind of desired mask. Use image processing techniques to detect the mask or mask shape before doing classification.