yule-li / CosFace

Tensorflow implementation for paper CosFace: Large Margin Cosine Loss for Deep Face Recognition
285 stars 99 forks source link
cosine-loss face recongnition tensorflow

Recent Update

2018.07.04: I achieved a better accuracy(99.2%,trained model) on LFW. I did some modification as bellow:

Preprocessing

I supply the preprocessed dataset in baidu pan:CASIA-WebFace-112X96,lfw-112X96. You can download and unzip them to dir dataset.

If you want to preprocess the dataset by yourself, you can refer to sphereface.

Train

./train.sh

Test

Modify the MODEL_DIR in test.sh and run ./test.sh.

If you do not want to train your model, you can download my trained model and unzip it to models dir.

Reference