Repository for Face Detection and Verification Systems
- OpenCV Cascade Classifiers for Face Detection
- Keras Implementation of FaceNet for Face Verification
- 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
1. Face Detection --> OpenCV Haar Feature-based Cascade Classifiers
- Sample Input Images
- Frontal Face Detection
- Frontal Face Crop
- Check Jupyter Notebook for details.
- Training Dataset: VGGFace2 Dataset
- Triplet Loss
- a: anchor image
- p: positive image
- n: negative image
- f(x): CNN model to encode the input image
-
$\alpha$ : margin for triplet
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.
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.
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.
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.
- FaceNet: A Unified Embedding for Face Recognition and Clustering
- Deep face recognition with Keras, Dlib and OpenCV
- Face detection with OpenCV and deep learning
- Face recognition using Tensorflow
- The world's simplest facial recognition api for Python and the command line
Copyright @ Jifu Zhao 2018