Face recognition datasets are often collected by crawling Internet and without individuals' consents, raising ethical and privacy concerns. Generating synthetic datasets for training face recognition models has emerged as a promising alternative. However, the generation of synthetic datasets remains challenging as it entails adequate inter-class and intra-class variations. While advances in generative models have made it easier to increase intra-class variations in face datasets (such as pose, illumination, etc.), generating sufficient inter-class variation is still a difficult task. In this paper, we formulate the dataset generation as a packing problem on the embedding space (represented on a hypersphere) of a face recognition model and propose a new synthetic dataset generation approach, called HyperFace. We formalize our packing problem as an optimization problem and solve it with a gradient descent-based approach. Then, we use a conditional face generator model to synthesize face images from the optimized embeddings. We use our generated datasets to train face recognition models and evaluate the trained models on several benchmarking real datasets. Our experimental results show that models trained with HyperFace achieve state-of-the-art performance in training face recognition using synthetic datasets. Project page:
https://www.idiap.ch/paper/hyperface/
Block diagram of HyperFace Dataset Generation: We start from randomly synthesized face images and extract their embeddings using a pretrained face recognition model. The extracted embeddings are normalised and used as initial points in our HyperFace optmization. The HyperFace optimization tries to increase the intra-class variation for synthetic identities on the manifold of the face recognition model over the hypersphere using a regularization term. The resulting points are then used by a face generator model, which can generate synthetic face images from the embeddings.
1 # Inferece (Face Recognition)
2 from face_alignment import align
3 from inference import load_pretrained_model, to_input
4
5 checkpoint = 'model_checkpoint.ckpt'
6 model = load_pretrained_model(checkpoint, architecture='ir_50')
7 path = 'path_to_the_image'
8 aligned_rgb_img = align.get_aligned_face(path)
9 bgr_input = to_input(aligned_rgb_img)
10 feature, _ = model(bgr_input)
HyperFace is released under
MIT License
(c) 2025, Hatef Otroshi Shahreza, Sébastien Marcel Idiap Research Institute, Martigny 1920, Switzerland.
Please refer to the link for information about the License & Copyright terms and conditions.
1@inproceedings{shahreza2025hyperface,
2 title={HyperFace: Generating Synthetic Face Recognition Datasets by Exploring Face Embedding Hypersphere},
3 author={Hatef Otroshi Shahreza and S{\'e}bastien Marcel},
4 booktitle={The Thirteenth International Conference on Learning Representations},
5 year={2025}
6}