| CARVIEW |
Select Language
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Wed, 03 Apr 2024 10:07:00 GMT
access-control-allow-origin: *
etag: W/"660d2a44-1b61"
expires: Sun, 28 Dec 2025 19:12:35 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 7568:2DDCFF:7EC5D1:8E2B70:69517ECA
accept-ranges: bytes
age: 0
date: Sun, 28 Dec 2025 19:02:35 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210055-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1766948555.394522,VS0,VE210
vary: Accept-Encoding
x-fastly-request-id: dc9a0bae2074948e8b6aa5bddaf9e745158251e6
content-length: 2243
OpenSphere | OpenSphere is an easy-to-use hyperspherical face recognition library based on PyTorch.
Skip to the content.

OpenSphere is an easy-to-use hyperspherical face recognition library based on PyTorch.
GitHub DownloadOpenSphere 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.ymlor 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}}