Made this face mask detector using Convolutional Neural Networks with the help of haarcascade face recogonitions models.
Link
This is an open dataset that contains approx 12k images divided into different direcotries for train and testing the model.
Inside each directory, there are separate directories for masked images and un-masked images.
It consists of 3 Conv2D layers, each followed by a MaxPooling Layer, followed by a Flatten and Dense layer, and finally the Output Layer.
I have used 'relu'
activation layer and sigmoid
activation for the output layer.
I have used the input size as 150 x 150 x 3
.
All of these configurations are from either hit and trial method or from my past experiences. (suggestions are welcome!)
The model usses binary_crossentropy
loss function.
I was able to achieve good accuracy and low loass using this loss function, and the final outcome was great!
I worked on this project with my friend
Himanshu Sheokand [ LinkedIn ] | [ GitHub ]
Happy coding!