This is a real time face mask detection project. I have created my own dataset and trained a model using transfer learning on ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8
I wrote up a script using python to collect the images using opencv library - capture.ipynb
After that I again used opencv library to convert these images to grayscale - convert_to_grayscale.ipynb
Then i used labelImg which is a great graphical image annotation tool. You should definitely check it out.
For training i used transfer learning on ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8
I got the model from TensorFlow 2 Detection Model Zoo and trained it using tensorflow object detection api.
You can check out their Documentation and their github repository
At first the performance was not good so i tried different things such as:
- Training on different models.
- Changing the number of iterations.
- The thing that most helped was implementing changes to the dataset.