Idiap-Data commited on
Commit
d6bf08b
Β·
verified Β·
1 Parent(s): a73024b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -3
README.md CHANGED
@@ -1,3 +1,96 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # HyperFace-10k-LDM
6
+
7
+ 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/
8
+
9
+
10
+ ## Overview
11
+
12
+ * **Training**: HyperFace-10k-LDM was trained on a variant of [HyperFace Synthetic Dataset](https://www.idiap.ch/paper/hyperface/) with 10k identities and LDM for gallery
13
+ * **Backbone**: IResNet50
14
+ * **Parameters**: 43.6M
15
+ * **Task**: Face Recognition models trained on HyperFace Synthetic Face Datasets
16
+ * **Framework**: Pytorch
17
+ * **Output structure**: Batch of face embeddings (ie, features)
18
+
19
+
20
+ ## Evaluation of Model
21
+
22
+ ![HyperFace](https://www.idiap.ch/paper/hyperface/static/images/HyperFace_blockdiagram.png)
23
+
24
+ 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.
25
+
26
+ ### Performance benchmarks of different variants of **HyperFace**:
27
+
28
+ | RELEASE NAME | GALLERY | # IDs | # IMAGES | LFW (%) | CPLFW (%) | CALFW (%) | CFP (%) | AgeDB (%) |
29
+ |---------------------------|-----------------|----------|------------|-----------|-----------|-----------|----------|-----------|
30
+ | **HyperFace-10k-LDM** | LDM | 10,000 | 640,000 | 98.65 | 84.35 | 89.17 | 89.09 | 86.35 |
31
+ | HyperFace-10k-StyleGAN | StyleGAN | 10,000 | 640,000 | 98.67 | 84.68 | 89.82 | 89.14 | 87.07 |
32
+ | HyperFace-50k-StyleGAN | StyleGAN | 50,000 | 3,200,000 | 98.27 | 85.60 | 91.48 | 92.24 | 90.40 |
33
+
34
+ _Table 1: Comparison of different released HyperFace datasets_
35
+
36
+ | **Dataset name** | **#IDs**|**#Images**| **LFW** |**CPLFW** |**CALFW** | **CFP** |**AgeDB** |
37
+ |------------------------------|---------|-----------|----------|----------|----------|-------- |--------- |
38
+ | SynFace | 10’000 | 999’994 | 86.57 | 65.10 | 70.08 | 66.79 | 59.13 |
39
+ | SFace | 10’572 | 1’885’877 | 93.65 | 74.90 | 80.97 | 75.36 | 70.32 |
40
+ | Syn-Multi-PIE | 10’000 | 180’000 | 78.72 | 60.22 | 61.83 | 60.84 | 54.05 |
41
+ | IDnet | 10’577 | 1’057’200 | 84.48 | 68.12 | 71.42 | 68.93 | 62.63 |
42
+ | ExFaceGAN | 10’000 | 599’944 | 85.98 | 66.97 | 70.00 | 66.96 | 57.37 |
43
+ | GANDiffFace | 10’080 | 543’893 | 94.35 | 76.15 | 79.90 | 78.99 | 69.82 |
44
+ | Langevin-Dispersion | 10’000 | 650’000 | 94.38 | 65.75 | 86.03 | 65.51 | 77.30 |
45
+ | Langevin-DisCo | 10’000 | 650’000 | 97.07 | 76.73 | 89.05 | 79.56 | 83.38 |
46
+ | DigiFace-1M | 109’999 | 1’219’995 | 90.68 | 72.55 | 73.75 | 79.43 | 68.43 |
47
+ | IDiff-Face (Uniform) | 10’049 | 502’450 | 98.18 | 80.87 | 90.82 | 82.96 | 85.50 |
48
+ | IDiff-Face (Two-Stage) | 10’050 | 502’500 | 98.00 | 77.77 | 88.55 | 82.57 | 82.35 |
49
+ | DCFace | 10’000 | 500’000 | 98.35 | 83.12 | **91.70**| 88.43 | **89.50**|
50
+ | **HyperFace** | 10’000 | 500’000 | **98.50**| **84.23**| 89.40 | **88.83**| 86.53 |
51
+ | CASIA-WebFace (real dataset) | 10’572 | 490’623 | 99.42 | 90.02 | 93.43 | 94.97 | 94.32 |
52
+
53
+ _Table 2: Comparison of recognition performance of face recognition models trained with different synthetic datasets and a real dataset (i.e., CASIA-WebFace). The performance reported for each dataset is in terms of accuracy and best value for each benchmark is emboldened._
54
+
55
+ ## Running Code
56
+
57
+ * Minimal code to instantiate the model and perform inference:
58
+ Please use the corresponding git repository mentioned in the [project page](https://www.idiap.ch/paper/hyperface/) and run the following code to extract embeddings using the HyperFace trained face recognition models:
59
+ ``` bash
60
+ # Inferece (Face Recognition)
61
+ from face_alignment import align
62
+ from inference import load_pretrained_model, to_input
63
+
64
+ checkpoint = 'model_checkpoint.ckpt'
65
+ model = load_pretrained_model(checkpoint, architecture='ir_50')
66
+ path = 'path_to_the_image'
67
+ aligned_rgb_img = align.get_aligned_face(path)
68
+ bgr_input = to_input(aligned_rgb_img)
69
+ feature, _ = model(bgr_input)
70
+ ```
71
+
72
+
73
+ ## License
74
+
75
+ HyperFace is released under [MIT License](https://gitlab.idiap.ch/biometric/code.iclr2025_hyperface/-/blob/master/LICENSE)
76
+
77
+ ## Copyright
78
+
79
+ (c) 2025, Hatef Otroshi Shahreza, SΓ©bastien Marcel Idiap Research Institute, Martigny 1920, Switzerland.
80
+
81
+ https://gitlab.idiap.ch/biometric/code.iclr2025_hyperface/-/blob/master/LICENSE
82
+
83
+ Please refer to the link for information about the License & Copyright terms and conditions.
84
+
85
+ ## Citation
86
+
87
+ If you find our work useful, please cite the following publication:
88
+
89
+ ```bibtex
90
+ @inproceedings{shahreza2025hyperface,
91
+ title={HyperFace: Generating Synthetic Face Recognition Datasets by Exploring Face Embedding Hypersphere},
92
+ author={Hatef Otroshi Shahreza and S{\'e}bastien Marcel},
93
+ booktitle={The Thirteenth International Conference on Learning Representations},
94
+ year={2025}
95
+ }
96
+ ```