OpenSphere provides a consistent and unified training and evaluation framework for hyperspherical face recognition research. The framework decouples the loss function from the other varying components such as network architecture, optimizer, and data augmentation. It can fairly compare different loss functions in hyperspherical face recognition on popular benchmarks, serving as a transparent platform to reproduce published results.
Brief history of hyperspherical face recognition
Getting started
-
Clone the repository:
git clone -b OpenSphere_v0 --single-branch https://github.com/ydwen/opensphere.git
-
Setup the environment:
cd opensphere conda env create -f environment.yml
-
Download the dataset:
bash scripts/dataset_setup.sh
-
Train the SphereFace2 model:
CUDA_VISIBLE_DEVICES=0,1 python train.py --config config/train/vggface2_sfnet20_sphereface2.yml
or train the SphereFace model:
CUDA_VISIBLE_DEVICES=0,1 python train.py --config config/train/vggface2_sfnet20_sphereface.yml
-
Test the model:
CUDA_VISIBLE_DEVICES=0,1 python test.py --config config/test/ijbb.yml
See our Github page for detailed instructions.
Citation
If this framework helps your research, please consider to cite:
@article{Liu2022SphereFaceR,
title={SphereFace Revived: Unifying Hyperspherical Face Recognition},
author={Liu, Weiyang and Wen, Yandong and Raj, Bhiksha and Singh, Rita and Weller, Adrian},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2022}}
@article{Wen2022SphereFace2,
title={SphereFace2: Binary Classification is All You Need for Deep Face Recognition},
author={Wen, Yandong and Liu, Weiyang and Weller, Adrian and Raj, Bhiksha and Singh, Rita},
booktitle = {ICLR},
year={2022}}
@InProceedings{Liu2017SphereFace,
title = {SphereFace: Deep Hypersphere Embedding for Face Recognition},
author = {Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Li, Ming and Raj, Bhiksha and Song, Le},
booktitle = {CVPR},
year = {2017}}
@inproceedings{Liu2016LSoftmax,
title={Large-Margin Softmax Loss for Convolutional Neural Networks},
author={Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Yang, Meng},
booktitle={ICML},
year={2016}}