Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.
/ face-verification Public archive

Repository for Face Detection and Verification

License

Notifications You must be signed in to change notification settings

JifuZhao/face-verification

Repository files navigation

Face-Verification

Repository for Face Detection and Verification Systems


Tasks

  • Face Detection
    • Haar Cascade Classifier
    • LBP Classifier (not actually implemented)
  • Face Alignment
    • TBD
  • Face Verification
    • Base CNN model building and training
    • Face verification metric measure
  • Liveness Verification
    • Eye-blink
    • TBD
  • Interface or API

Demo

  • Sample Input Images

Sample

  • Frontal Face Detection

Sample

  • Frontal Face Crop

Sample

2. Base CNN Model for Face Verification

  • Training Dataset: VGGFace2 Dataset
  • Triplet Loss
    equation
    • a: anchor image
    • p: positive image
    • n: negative image
    • f(x): CNN model to encode the input image
    • $\alpha$: margin for triplet
    Sample

3. Face Verification

Give two input images, with the face verification api, the distance between to embedded images can be used to determine the identity of the input images. Below is the distance calculated for the sample input images.

Sample

4. Performance

Using the test dataset, the distance distribution between anchor image and positive image, and the distance distribution between anchor image and negative image, are shown below.

Sample

5. Extention: Face Recognition

Based on the pre-trained CNN models, face recognition can be performed using the encoded image vectors (in this project, a vector with 128 dimensions). Essentially, it can be performed using K-Nearest Neighbors (KNN) model.


Note

Currently the performance of pre-trained CNN models are mainly influenced by two factors: the quality of the input images and the iterations to train the model.

The input images used for training the CNN models have relatively low quality. With modern smart phones, the quality of the input image should be further improved. Thus, with better training images, the performance of the module should be further improved.

Limited by computation resources, a relatively small CNN model is used, and the model is only trained for 1,000 epochs. For better performance, please refer to other pre-trained models.

Useful Links:

Copyright @ Jifu Zhao 2018