In this pandemic season and lockdown, people are required to follow certain rules and regulations to reduce and prevent further spread of the virus. The goal of this camera project is to check if people are wearing masks correctly or not.
The camera can be installed near the entrance of the restaurants(or shops) and the camera will be used for face mask detection. Furthermore, the camera can be attached to another system (like speakers, screen or even auto-door) to notify people and restrict their access if mask if not worn(or worn incorrectly)
- Python 3.x (with OpenCV,Tensorflow,faster_rcnn_inception_v2 model)
- Anaconda
- Google Colab
- with_mask : if the mask is covering the face correctly
- without_mask : if the person is not wearing a mask
- mask_weared_incorrect : if the person is wearing a mask but it does not cover this face properly
- Installing tensorflow-gpu and Anaconda distribution.
- Labeling images gather using labelImg and saving the XML files.
- Use the XML files to extract the information of the bounding boxes to csv files.
- Use the csv files to generate the tf-records file.
- Generate a labelmap.pbtxt file according to your classes and configure your training.
- Train your object detector till the loss is < 0.05
- Save your inference graph and your Face Mask Detector is ready to launch!
- Images used for training model from Kaggle Dataset (Images from testing were scraped from the net)
- A great video tutorial from Edje Electronics