Skip to content

An AI model that can distinguish between people wearing mask and not wearing mask. Furthermore, it can alert the authority about who were the defaulters recognizing them.

Notifications You must be signed in to change notification settings

bishalpaudelofficial/Mask-NoMask

Repository files navigation

Smart Face-Mask recognizer

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.

  1. dataprocessing.m: This code preprocess the data for training the model for yolov2 network

  2. designtrain.m: It contains code to design yolov2 network which will be used to train the data and test it with a video.

  3. 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.

  4. Results: It contains the snapshot of the training process.

  5. 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.

  1. datapreprocessing.m: It prepares the data for training the model for mask/no-mask classification.

  2. TrainandTest.m: It is used to train the classifier to detect if the person is wearing mask or not.

  3. 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.

  4. 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.

  1. datapreprocessing.m: It prepares the data for training the model to identify the person.

  2. TrainandTest.m: It is used to train the classifier to detect the person not wearing mask.

  3. 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.

  4. 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.

  1. maintest.m: It contains the main code which performs the complete task. Running this file will give the desired results.

  2. 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.

  3. maskrecognizer.m: It extracts the HOG features of the query image and detects the mask is present or not passing to the trained model.

  4. facerecognizer.m: Upon no mask detection, the extracted features is passed to the facerecognizer function to identify the person.

  5. utilities: It contains trained model of YOLOv2, maskClassifier, faceClassifier.

  6. data: It contains the test data for testing the code.

image

5. Results:

In result we can see two situations:

  1. When the person is wearing mask: It detects the mask and displays "Mask detected"
  2. When the person is not wearing mask: It identifies the person from the dataset and displays "person_name wear mask save life"

image

6. Achievement:

◉ Published Paper: Smart Face Recognition with Mask/No Mask Detection

Screenshot_20230119_182901

◉ First Position in #ShowYourSkill 2020 under Technology track:

image

About

An AI model that can distinguish between people wearing mask and not wearing mask. Furthermore, it can alert the authority about who were the defaulters recognizing them.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages