face recognition algorithms in pytorch framework, including arcface, cosface, sphereface and so on
Currently, I have graduated from campus and doing another kind of job. So this project may not be updated again.
The implementation of popular face recognition algorithms in pytorch framework, including arcface, cosface and sphereface and so on.
All codes are evaluated on Pytorch 0.4.0 with Python 3.6, Ubuntu 16.04.10, CUDA 9.1 and CUDNN 7.1. Partially evaluated on Pytorch 1.0.
For CNN training, I use CASIA-WebFace and Cleaned MS-Celeb-1M, aligned by MTCNN with the size of 112x112. For performance testing, I report the results on LFW, AgeDB-30, CFP-FP, MegaFace rank1 identification and verification.
For AgeDB-30 and CFP-FP, the aligned images and evaluation images pairs are restored from the mxnet binary file provided by insightface, tools are available in this repository. You should install a mxnet-cpu first for the image parsing, just do ' pip install mxnet ' is ok.
LFW @ BaiduNetdisk, AgeDB-30 @ BaiduNetdisk, CFP_FP @ BaiduNetdisk
MobileFaceNet: Struture described in MobileFaceNet
ResNet50: Original resnet structure
ResNet50-IR: CNN described in ArcFace paper
SEResNet50-IR: CNN described in ArcFace paper
Verification results on LFW, AgeDB-30 and CFP_FP
Small Protocol: trained with CASIA-WebFace of data size: 453580/10575
Large Protocol: trained with DeepGlint MS-Celeb-1M of data size: 3923399/86876
There exists an odd result fact that when training under small protocol, CFP-FP performances better than AgeDB-30, while when training with large scale dataset, CFP-FP performances worse than AgeDB-30.
|Loss||MF Acc.||MF Ver.||MF [email protected]||MF [email protected]||SIZE||protocol|
Visdom support for loss and accuracy during training process.
Softmax Loss vs SoftmaxCenter Loss. Left: softmax training set. Right: softmax + center loss training set.