Skip to content

Custom Face Recognition Application, scans the user-provided database for faces and then matches it with detected faces in the video stream

Notifications You must be signed in to change notification settings

mjoshi07/Face-Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face-Recognition

  • To run the application, clone the repository and build it using CMake
  • Should satisfy all dependencies
  • Download the weight files here models
  • Put .jpg images here faceImages
  • 1 image should contain only 1 face and names of all files should be unique
  • Name of the image file is assigned as the faceId to the face detected in the image
  • No Need to crop the .jpg images, application will first detect faces in it and then store the face embeddings from face images
  • Rename you video as "test_video.mp4" and move it here video

How it works

  • Scans the faceImages for faces in images, extracts 512 feature vector for each image and stores them in memory
  • Reads the specified input video stream frame-by-frame, be it a camera device or a video file
  • The application deploys 2 models[face detection and face embeddings] and runs them in synchronous manner
  • An input frame is processed by the face detection model to predict face bounding boxes
  • Face images are created using the face bounding boxes and are sent to face embedding model to provide a 512 feaure vector of each face
  • Face matching is performed using the feature vectors generated at run time and the ones generate from database
  • Dot product/cosine distance is calculated to assign FaceIDs, if no match is found "unknown" ID is assigned to that face

Models Used

  • face-detection-retail-0005 to detect faces in a frame
  • landmarks-regression-retail-0009 to predict landmarks in a face Image
  • SphereFace [converted to IR] so as to use with INFERENCE_ENGINE

Dependencies

  • Opencv[4.5.1 and above] built with InferenceEngine backend
  • dlib (for correlation tracker)

Test Results

output1 output2 output3

Things to Do

  • Face Detection
  • Face Landmarks Detection [Added but not using currently]
  • Face Recognition
  • Face Alignment before recognition using landmarks
  • Add Tracker and maintain state of each recognized face
  • Perform face detection, landmarks detection and recognition in asynchronous manner
  • Age Detection
  • Gender Detection
  • Emotion Detection

About

Custom Face Recognition Application, scans the user-provided database for faces and then matches it with detected faces in the video stream

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published