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

DFR

Getting started

  1. Clone the repository:

     git clone -b OpenSphere_v0 --single-branch https://github.com/ydwen/opensphere.git
    
  2. Setup the environment:

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

     bash scripts/dataset_setup.sh
    
  4. 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
    
  5. 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}}