| Literature DB >> 35233179 |
Hiten Goyal1, Karanveer Sidana1, Charanjeet Singh1, Abhilasha Jain1, Swati Jindal1.
Abstract
In current times, after the rapid expansion and spread of the COVID-19 outbreak globally, people have experienced severe disruption to their daily lives. One idea to manage the outbreak is to enforce people wear a face mask in public places. Therefore, automated and efficient face detection methods are essential for such enforcement. In this paper, a face mask detection model for static and real time videos has been presented which classifies the images as "with mask" and "without mask". The model is trained and evaluated using the Kaggle data-set. The gathered data-set comprises approximately about 4,000 pictures and attained a performance accuracy rate of 98%. The proposed model is computationally efficient and precise as compared to DenseNet-121, MobileNet-V2, VGG-19, and Inception-V3. This work can be utilized as a digitized scanning tool in schools, hospitals, banks, and airports, and many other public or commercial locations.Entities:
Keywords: COVID-19; Convolutional neural network (CNN); Deep learning; OpenCV; Real-time face mask detection
Year: 2022 PMID: 35233179 PMCID: PMC8874748 DOI: 10.1007/s11042-022-12166-x
Source DB: PubMed Journal: Multimed Tools Appl ISSN: 1380-7501 Impact factor: 2.577
Fig. 1Preview of Face mask Dataset
Fig. 2The Proposed Architecture
Model Summary
| Layer(type) | Output Shape | Structure |
|---|---|---|
| Conv2D | 96 x 96 | Filters = 16, Filter Size = 3 x 3, Stride = 1 |
| MaxPooling | 48 x 48 | Filters = 16, Filter Size = 2 x 2, Stride = 1 |
| Conv2D | 48 x 48 | Filters = 32, Filter Size = 3 x 3, Stride = 1 |
| MaxPooling | 24 x 24 | Filters = 32, Filter Size = 2 x 2, Stride = 1 |
| Conv2D | 24 x 24 | Filters = 64, Filter Size = 3 x 3, Stride = 1 |
| MaxPooling | 12 x 12 | Filters = 64, Filter Size = 2 x 2, Stride = 1 |
| Conv2D | 12 x 12 | Filters = 128, Filter Size = 3 x 3, Stride = 1 |
| MaxPooling | 6 x 6 | Filters = 128, Filter Size = 2 x 2, Stride = 1 |
| Conv2D | 6 x 6 | Filters = 256, Filter Size = 3 x 3, Stride = 1 |
| MaxPooling | 3 x 3 | Filters = 256, Filter Size = 2 x 2, Stride = 1 |
| Classification Layer | – | Fully-connected, Softmax |
| Total params: 2,818,658 | ||
| Trainable params: 2,818,658 | ||
| Non-trainable params: 0 |
Training Model on SGD Optimizer
| Epochs | loss | accuracy | val_loss | val_accuracy |
|---|---|---|---|---|
| 10 | 0.6913 | 0.5000 | 0.6888 | 0.5100 |
| 20 | 0.6902 | 0.5025 | 0.6872 | 0.5100 |
| 30 | 0.6890 | 0.5075 | 0.6857 | 0.5100 |
| 40 | 0.6882 | 0.5075 | 0.6841 | 0.5250 |
| 50 | 0.6873 | 0.5138 | 0.6826 | 0.5300 |
| 60 | 0.6858 | 0.5400 | 0.6808 | 0.5400 |
| 70 | 0.6851 | 0.5562 | 0.6789 | 0.5600 |
| 80 | 0.6836 | 0.5738 | 0.6769 | 0.5800 |
| 90 | 0.6823 | 0.5875 | 0.6747 | 0.6100 |
| 100 | 0.6807 | 0.5962 | 0.6722 | 0.6250 |
Training Model on Adam Optimizer
| Epochs | loss | accuracy | val_loss | val_accuracy |
|---|---|---|---|---|
| 10 | 0.2938 | 0.8612 | 0.2520 | 0.9050 |
| 20 | 0.2172 | 0.9125 | 0.2506 | 0.9100 |
| 30 | 0.1524 | 0.9375 | 0.1783 | 0.9300 |
| 40 | 0.1688 | 0.9350 | 0.2488 | 0.9300 |
| 50 | 0.1223 | 0.9600 | 0.2259 | 0.9450 |
| 60 | 0.1204 | 0.9575 | 0.3382 | 0.9150 |
| 70 | 0.0760 | 0.9800 | 0.2224 | 0.9400 |
| 80 | 0.0478 | 0.9825 | 0.2671 | 0.9450 |
| 90 | 0.0541 | 0.9825 | 0.2407 | 0.9500 |
| 100 | 0.0288 | 0.9937 | 0.2102 | 0.9500 |
Fig. 3Adam: Precision vs Recall
Fig. 4SGD: Precision vs Recall
Hyper Parameters used in Training
| Parameter | Detail |
|---|---|
| Learning Rate | 0.0005 |
| Epochs | 100 |
| Batch Size | 32 |
| Optimizer | Adam |
| Loss Function | binary_crossentropy |
Fig. 5Diagram showing implemented Face Mask Model
Classification Report
| Precision | Recall | f1-score | Support | |
|---|---|---|---|---|
| dataset/with_mask | 0.98 | 0.97 | 0.98 | 400 |
| dataset/without_mask | 0.97 | 0.98 | 0.98 | 400 |
| accuracy | 0.98 | 800 | ||
| macro avg | 0.98 | 0.98 | 0.98 | 800 |
| weighted avg | 0.98 | 0.98 | 0.98 | 800 |
Fig. 6Accuracy test results during Model Training
Fig. 7Loss test results during Model Training
Fig. 10Predictions on Test Images
Fig. 8ROC Curve Plot
Comparison of different models
| Model | Accuracy | Time Per | Model Size |
|---|---|---|---|
| [%] | Epoch [s] | [MB] | |
| MobilenetV2 | 97 | 10.16 | 11 |
| DenseNet-121 | 98 | 10.94 | 96 |
| Inception-V3 | 96 | 9.82 | 89 |
| VGG-19 | 95 | 10.34 | 79 |
| Proposed Method | 98 | 8.95 | 33 |
Fig. 9Different model comparison w.r.t accuracy, size and training speed