Skip to the content.

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

  1. Clone the repository:

     git clone -b OpenSphere_v0 --single-branch
  2. Setup the environment:

     cd opensphere
     conda env create -f environment.yml
  3. Download the dataset:

     bash scripts/
  4. Train the SphereFace2 model:

     CUDA_VISIBLE_DEVICES=0,1 python --config config/train/vggface2_sfnet20_sphereface2.yml

    or train the SphereFace model:

     CUDA_VISIBLE_DEVICES=0,1 python --config config/train/vggface2_sfnet20_sphereface.yml
  5. Test the model:

     CUDA_VISIBLE_DEVICES=0,1 python --config config/test/ijbb.yml

See our Github page for detailed instructions.


If this framework helps your research, please consider to cite:

      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},
      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},
      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}}
      title={Large-Margin Softmax Loss for Convolutional Neural Networks},
      author={Liu, Weiyang and Wen, Yandong and Yu, Zhiding and Yang, Meng},