Extract an complete process from insightface_tf to do face recognition and verification using pure TensorFlow.
Demo: http://chuyuan.vipgz1.idcfengye.com/
Training and Testing Dataset Download Website: Baidu
Contains:
- train.rec/train.idx : Main training data
- *.bin : varification data
Make TFRecords File:
$ python3 mx2tfrecords.py --bin_path '/data/ChuyuanXiong/up/face/faces_emore/train.rec' --idx_path '/data/ChuyuanXiong/up/face/faces_emore/train.idx' --tfrecords_file_path '/data/ChuyuanXiong/up/face/tfrecords'
Train:
$ python3 train.py --tfrecords '/data/ChuyuanXiong/up/face/tfrecords/tran.tfrecords' --batch_size 64 --num_classes 85742 --lr [0.001, 0.0005, 0.0003, 0.0001] --ckpt_save_dir '/data/ChuyuanXiong/backup/face_real403_ckpt' --epoch 10000
Test:
$ python3 eval_veri.py --datasets '/data/ChuyuanXiong/up/face/faces_emore/cfp_fp.bin' --dataset_name 'cfp_fp' --num_classes 85742 --ckpt_restore_dir '/data/ChuyuanXiong/backup/face_ckpt/Face_vox_iter_78900.ckpt'
Datasets | backbone | loss | steps | batch_size | acc |
---|---|---|---|---|---|
lfw | resnet50 | ArcFace | 78900 | 64 | 0.9903 |
cfp_ff | resnet50 | ArcFace | 78900 | 64 | 0.9847 |
cfp_fp | resnet50 | ArcFace | 78900 | 64 | 0.8797 |
agedb_30 | resnet50 | ArcFace | 78900 | 64 | 0.8991 |
Limited by the training time, so I just release the half-epoch training results temporarily. The model will be optimized later.
@inproceedings{deng2018arcface,
title={ArcFace: Additive Angular Margin Loss for Deep Face Recognition},
author={Deng, Jiankang and Guo, Jia and Niannan, Xue and Zafeiriou, Stefanos},
booktitle={CVPR},
year={2019}
}