Real Time Face Mask Detection
· 164
Hassan Abbas Hassan Abbas

Real-Time Face Mask Detection Model

Perhaps one of the most striking lifestyle changes resulting from the COVID-19 pandemic is the mandatory use of face masks in grocery stores, restaurants and other public places. Wearing a mask, especially when in close proximity to others, is imperative to slowing the spread of COVID-19.

However, a large number of people still do not realize how essential a face mask is and decide not wear one. Therefore, this model aimed to propose a framework for face masks detection using deep learning.

Deep Learning is a type of Machine Learning, inspired by the structure of a human brain. To achieve this, deep learning uses a multi-layered structure of algorithms called neural networks.  Neural networks are the building blocks of deep learning systems, for it to be NN it must contain a labeled, directed graph structure where each node in the graph performs some simple computation.

Neural networks accept an input image/feature vector and transform it through a series of hidden layers, commonly using nonlinear activation functions. The last layer of a neural network (i.e., the “output layer”) is fully-connected and represents the final output classifications of the network.

More commonly Convolutional Neural Networks are used, we can thus define a CNN as a neural network that swaps in a specialized “convolutional” layer in place of “fully-connected” layer for at least one of the layers in the network. We chose the AlexNet network as our classifier due to the limited computational power.

In order to train our neutral network to correctly classify faces as with or without face masks we must first provide a labeled dataset. The dataset must cover in a balanced way the different genders, races and ages, we also made sure that the two classes had roughly the same size in order to avoid inconstancy, for that we used about 5000 images of each class.

The AlexNet network was trained for 17 epochs using the Adam optimizer and batch size of 128, the training took over 10 hours on a Core i7-6500U CPU @ 2.50GHz (no GPU was used). Although AlexNet is not very advanced, it enabled us to achieve 99% accuracy on the dataset and very pleasant accuracy on real-time classification.

This model was developed in order to try to tackle the face-mask problem, with some further development (using a deeper network) it can be used at public entrances (like hospitals, restaurants, shopping malls etc.) to monitor the abiding of the face mask rule. The uses of this model are countless and very helpful. It is also worth mentioning that the resolution of the capture plays a significant role in classification.






Related Posts
Graphic design
09 June
The Power of Email Marketing
03 June
Photography
01 June

WMK Tech Copyright © 2024. All rights reserved