With Regards Team Bazinga ;)
The Following codes is to be run in MATLAB r2020a version or newer. The data given are personal, it should not be duplicated or altered.
It detects human face from the given frame using yolov2 algorithm. It puts a bounding box identifying human face from the body.
-
dataprocessing.m: This code preprocess the data for training the model for yolov2 network
-
designtrain.m: It contains code to design yolov2 network which will be used to train the data and test it with a video.
-
Utilities:
i) AnchorBoxes.m: It is the code for anchor box used in YOLOv2.
ii) detectorYoloV2.mat: As YOLOv2 training takes time, after training the model is save. It is the trained YOLOv2 network.
iii) TrainingData.mat: It is the preprocessed training data.
iv) Train.mat: It is the ground truth of the data.
-
Results: It contains the snapshot of the training process.
-
data: It contains the data to test the YOLOv2.
It classifies if the person is wearing mask or not. Here, we've trained the model.
-
datapreprocessing.m: It prepares the data for training the model for mask/no-mask classification.
-
TrainandTest.m: It is used to train the classifier to detect if the person is wearing mask or not.
-
Utilities: It contains detectorYoloV2.mat which is the trained YOLOv2 model for human face detetction. It is necessary to identify the region of interest to extract HOG features to detect mask.
-
TrainingData: It is the sample training data used for training the model.
It identifies the face of the people. Here, we've trained the model.
-
datapreprocessing.m: It prepares the data for training the model to identify the person.
-
TrainandTest.m: It is used to train the classifier to detect the person not wearing mask.
-
Utilities: It contains detectorYoloV2.mat which is the trained YOLOv2 model for human face detetction. It is necessary to identify the region of interest to extract HOG features to identify the person.
-
TrainingData: It is the sample training data used for training the model.
It is the final code joining all the parts. It performs the whole function of smart mask/no-mask recognition.
-
maintest.m: It contains the main code which performs the complete task. Running this file will give the desired results.
-
faceMaskrecognize.m: It is a funnction called to perform the face mask recognition. It contains two functions, one for mask recognition and other for face recognition. When no mask is detected, it calls for face recognition.
-
maskrecognizer.m: It extracts the HOG features of the query image and detects the mask is present or not passing to the trained model.
-
facerecognizer.m: Upon no mask detection, the extracted features is passed to the facerecognizer function to identify the person.
-
utilities: It contains trained model of YOLOv2, maskClassifier, faceClassifier.
-
data: It contains the test data for testing the code.
In result we can see two situations:
- When the person is wearing mask: It detects the mask and displays "Mask detected"
- When the person is not wearing mask: It identifies the person from the dataset and displays "person_name wear mask save life"
◉ Published Paper: Smart Face Recognition with Mask/No Mask Detection
◉ First Position in #ShowYourSkill 2020 under Technology track: