JCTN commited on
Commit
3f88eea
1 Parent(s): fd15670

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +71 -0
  2. arcface.onnx +3 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: diffusers
6
+ ---
7
+
8
+ # Arc2Face Model Card
9
+
10
+ <div align="center">
11
+
12
+ [**Project Page**](https://arc2face.github.io/) **|** [**Paper (ArXiv)**](https://arxiv.org/abs/2403.11641) **|** [**Code**](https://github.com/foivospar/Arc2Face) **|** [🤗 **Gradio demo**](https://huggingface.co/spaces/FoivosPar/Arc2Face)
13
+
14
+
15
+
16
+ </div>
17
+
18
+ ## Introduction
19
+
20
+ Arc2Face is an ID-conditioned face model, that can generate diverse, ID-consistent photos of a person given only its ArcFace ID-embedding.
21
+ It is trained on a restored version of the WebFace42M face recognition database, and is further fine-tuned on FFHQ and CelebA-HQ.
22
+
23
+ <div align="center">
24
+ <img src='assets/samples_short.jpg'>
25
+ </div>
26
+
27
+ ## Model Details
28
+
29
+ It consists of 2 components:
30
+ - encoder, a finetuned CLIP ViT-L/14 model
31
+ - arc2face, a finetuned UNet model
32
+
33
+ both of which are fine-tuned from [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5).
34
+ The encoder is tailored for projecting ID-embeddings to the CLIP latent space.
35
+ Arc2Face adapts the pre-trained backbone to the task of ID-to-face generation, conditioned solely on ID vectors.
36
+
37
+ ## Usage
38
+
39
+ The models can be downloaded directly from this repository or using python:
40
+ ```python
41
+ from huggingface_hub import hf_hub_download
42
+
43
+ hf_hub_download(repo_id="FoivosPar/Arc2Face", filename="arc2face/config.json", local_dir="./models")
44
+ hf_hub_download(repo_id="FoivosPar/Arc2Face", filename="arc2face/diffusion_pytorch_model.safetensors", local_dir="./models")
45
+ hf_hub_download(repo_id="FoivosPar/Arc2Face", filename="encoder/config.json", local_dir="./models")
46
+ hf_hub_download(repo_id="FoivosPar/Arc2Face", filename="encoder/pytorch_model.bin", local_dir="./models")
47
+ ```
48
+
49
+ Please check our [GitHub repository](https://github.com/foivospar/Arc2Face) for complete inference instructions.
50
+
51
+ ## Limitations and Bias
52
+
53
+ - Only one person per image can be generated.
54
+ - Poses are constrained to the frontal hemisphere, similar to FFHQ images.
55
+ - The model may reflect the biases of the training data or the ID encoder.
56
+
57
+ ## Citation
58
+
59
+
60
+ **BibTeX:**
61
+
62
+ ```bibtex
63
+ @misc{paraperas2024arc2face,
64
+ title={Arc2Face: A Foundation Model of Human Faces},
65
+ author={Foivos Paraperas Papantoniou and Alexandros Lattas and Stylianos Moschoglou and Jiankang Deng and Bernhard Kainz and Stefanos Zafeiriou},
66
+ year={2024},
67
+ eprint={2403.11641},
68
+ archivePrefix={arXiv},
69
+ primaryClass={cs.CV}
70
+ }
71
+ ```
arcface.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec639a0429b4819130d1405a2d3b38beaa4cc4a6c5bd9cf48b94fdf65461de83
3
+ size 260694151