Skip to content

Neo2854/Masked-Face-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Masked-Face-Recognition

Masked Face Recognition using MTCNN and FaceNet

Requires Python>=3.8 Required Packages

  • opencv-python
  • scikit-learn
  • torch
  • imutils
  • facenet-pytorch
  • matplotlib
  • numpy

The required packages can be installed using requirements.txt

pip install -r requirements.txt

MTCNN

MTCNN paper link.

For detecting face and landmarks in MTCNN

python mtcnn.py <path_to_img>

Example outputs

output2.png output2.png
live_out1.png live_out2.png


Use the following command to align faces properly based on eye-landmarks

python mtcnn.py <path_to_img> --align

Example outputs

output2.png

Facenet

Facenet paper link. It is better to go through the paper to get more understanding on architecture and the loss function is used.

The Facenet model can be used with pretrained weights. For testing purposes this repository used RMFRD dataset which can be downloaded here.

Facenet Architecture


Import the face_recognition_model into your python file and create a FaceRecognizer object. add_face can be called to add some reference images of a person with a label. The predict function can then be called to recognize the face on new data.

About

Masked Face Recognition using MTCNN and FaceNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages