Mask checker is a neural network model based on the YoloV3 deep learning framework which is designed to find and classify people present in the image input which are with or without a protective mask covering of their face.
The network is being trained on organic public images of crowds of people. Using real images of people wearing different types of face covering enables this network to detect people wearing a vast types of masks, from the more advanced respirators and N95/PP3 masks, the general surgical masks, and the various homemade cloth variations of face coverings. The model is also being developed in a way to enable to detect the chin, neck, or mouth and other "bad" mask wearing styles.
The goal of this project is to develop a full system which can help in combating the current COVID19 pandemic, but that can also be used in the future.
Future goals
- Expanded data set
- YoloV3 tiny version
- DLL/SO export
- A portable Raspberry Pi solution
Darknet installation
Follow the installation process from either the original or the better Alexei fork of the Darknet project. Check if Darknet is running normally.
Cloning the repository
- Clone this repo to a folder
- Copy the cfg/yolov3_custom_train.cfg to the cfg folder of your Darknet installation
- Copy the files from data to the data folder of your Darknet installation
- Download the weights from here and copy it to the Darknet installation folder
- Download the data set from here and unzip it in the Darknet installation folder
To train from scratch
sudo ./darknet detector train data/yolo.data cfg/yolov3_custom_train.cfg cfg/darknet53.conv.74
If training from scratch you will require the additional darknet53.conv.74 file.
To continue training from the weights
./darknet detector train data/yolo.data cfg/yolov3_custom_train.cfg maskStandard.weights
To detect on an image
./darknet detector test data/yolo.data cfg/yolov3_custom_train.cfg backup/yolov3_custom_train.weights [IMAGE_PATH]
For a more advanced tutorial refer to the original Darknet repo.