Mask AI
Convolutional Neural Network for analysing how people wear masks.
Why?
Wearing a face mask properly is one of the many steps to help reduce the spread of COVID-19. I wanted to use AI to create a tool that can analyze the way people wear masks.
Dataset
The dataset includes images of people with masks that are correctly and incorrectly worn. The images are 1024 x 1024 in resolution and the image names give us the information about the mask. Example: 01004_Mask_Mouth_Chin.jpg. Link to the data Github
Using the information in the image name, we can one-hot encode the values for nose, mouth, chin, and full mask.
Next, we turn the images to numpy arrays.
Turn the images into numpy arrays. The x is the image data and the y is the training data.
Convolutional Neural Network
The input shape is the shape of the image(250x250). We use convolutional layers to extract features. In the output layer, it is important that we use the sigmoid function because we are working with a multi-label classification problem and we want probabilities that are independent.
Results
Sample predictions