This repo is used to extract feature of face image and compute cosine similarity and l2 distance of two face images. We tried three state-of-the-art methods to extract feature:
- Do We Really Need to Collect Million of Faces for Effective Face Recognition?. We use the output of pool5 as our feature.
- LightCNN
- Facenet
Please install caffe for Do we, and then run:
pip install -r requirements.txt
for other python packages.
Models used for test please download in Facenet and ResNet-101 for Face Recognition. You do not need to put LightCNN model in model/.
- Try LightCNN:
python face_represent_lightcnn.py --img_list=input/list.txt --model="LightCNN-29v2" --num_classes=80013
Model here could also be LightCNN-29 or LightCNN-9.
- Try Facenet:
python face_represent_facenet.py model/20180402-114759.pb
- Try Do we ...:
python face_represent_dowe.py
Facenet is the best! Speed: LightCNN > Dowe > Facenet
- Crop image with face detector
- Show results