Stage 1: try yolo algorithm object detection
This project should be overcome the process of recognition should be real-time. And fortunately we have the image data provided on Kaggle: https://www.kaggle.com/vtech6/medical-masks-dataset/data including images and classification by person. It contains a good or poor mask wearing information in the data set.
And then I try to apply yolo v3, which is a proven model with object detection that has high speed and enough quality. Here is the script I deploy on Colab (a free computing resource provided Google) https://github.com/bladesu/mask_image_pretrain_on_colab. Finally, I got a model could be applied to deploy to machine which make model inference. Following inset is 6 photos to be predicted with trained model. The model is trained after 49000 iteration over the data set with 3 wearing classes.