Face Mask Detection Using Deep Learning
In order to prevent the spread of CORONA virus, everyone must wear a mask during the pandemic. In these tough times of COVID 19 it is necessary to build a model that detects people with and without mask in real time as it works as a simple precautionary measure to prevent the spread of virus. If deployed correctly, this machine learning technique helps in simplifying the work of frontline warriors and saving their lives. A basic Convolutional Neural Network (CNN) model is built using TensorFlow, Keras, Scikit learn and OpenCV to make the algorithm as accurate as possible. Javascript API helps in accessing webcam for real time face mask detection. Since Google Colab runs on web browser it can't access local hardware like a camera without APIs. The proposed work contains three stages: (i) pre processing, (ii) Training a CNN and (iii) Real time classification. The first part is the Pre processing section, which can be divided into "Grayscale Conversion" of RGB image, "image resizing and normalization" to avoid false predictions. Then the proposed CNN, classifies faces with and without masks as the output layer of proposed CNN architecture contains two neurons with Softmax activation to classify the same. Categorical cross entropy is employed as loss function. The proposed model has Validation accuracy of 96% If anyone in the video stream is not wearing a protective mask a Red coloured rectangle is drawn around the face with a dialog entitled as NO MASK and a Green coloured rectangle is drawn around the face of a person wearing MASK.
2021 International Conference on Computer Communication and Informatics (ICCCI)