Spaces:
Runtime error
Runtime error
echen01
commited on
Commit
•
f903e88
1
Parent(s):
33dd132
update readme
Browse files- README.md +37 -2
- flagged/1890s/tmphowwncle.png +0 -3
- flagged/1900s/tmpiyqo8vid.png +0 -3
- flagged/1910s/tmplsvkbwmm.png +0 -3
- flagged/1920s/tmpm88oq3m5.png +0 -3
- flagged/1930s/tmp1xg1cf_k.png +0 -3
- flagged/1940s/tmpyxtlostd.png +0 -3
- flagged/1950s/tmp00ekzg14.png +0 -3
- flagged/1960s/tmp0ptji34n.png +0 -3
- flagged/1970s/tmppty6lfdc.png +0 -3
- flagged/1980s/tmpo1znpbho.png +0 -3
- flagged/1990s/tmpkoptsgzw.png +0 -3
- flagged/2000s/tmpn85t4qg9.png +0 -3
- flagged/2010s/tmpxwhqu3bi.png +0 -3
- flagged/Cropped Input/tmpewip1qud.png +0 -3
- flagged/Input Image/tmpqdqusbe1.png +0 -3
- flagged/log.csv +0 -2
- flagged/1880s/tmpqihfju9s.png → imgs/teaser.png +2 -2
README.md
CHANGED
@@ -9,6 +9,41 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
12 |
+
# What's in a Decade? Transforming Faces Through Time
|
13 |
+
![Teaser image](imgs/teaser.png)
|
14 |
+
**What's in a Decade? Transforming Faces Through Time** \
|
15 |
+
Eric Ming Chen, Jin Sun, Apoorv Khandelwal, Dani Lischinski, Noah Snavely, Hadar Averbuch-Elor \
|
16 |
+
https://arxiv.org/abs/2210.06642
|
17 |
|
18 |
+
Abstract: *How can one visually characterize people in a decade? In this work, we assemble the Faces Through Time dataset, which contains over a thousand portrait images from each decade, spanning the 1880s to the present day. Using our new dataset, we present a framework for resynthesizing portrait images across time, imagining how a portrait taken during a particular decade might have looked like, had it been taken in other decades. Our framework optimizes a family of per-decade generators that reveal subtle changes that differentiate decades—such as different hairstyles or makeup—while maintaining the identity of the input portrait. Experiments show that our method is more effective in resynthesizing portraits across time compared to state-of-the-art image-to-image translation methods, as well as attribute-based and language-guided portrait editing models.*
|
19 |
+
|
20 |
+
|
21 |
+
## Demo
|
22 |
+
Welcome to our demo for Faces Through Time!
|
23 |
+
|
24 |
+
Unfortunately, because the Hugging Face demo is CPU only, it takes over 20 minutes. We suggest running it locally, following the instructions below. The results should take 1 minute per image.
|
25 |
+
|
26 |
+
|
27 |
+
### Running the Demo Locally
|
28 |
+
First clone the repo with git lfs. This will also download all required checkpoints. The total repo size is about 10GB.
|
29 |
+
```
|
30 |
+
git lfs install
|
31 |
+
git clone https://huggingface.co/spaces/emc348/faces-through-time
|
32 |
+
```
|
33 |
+
|
34 |
+
To run with cuda, change line 3 in `configs/global_config.py` to
|
35 |
+
```python
|
36 |
+
device = "cuda"
|
37 |
+
```
|
38 |
+
|
39 |
+
To reduce artifacts in the generated images, we suggest turning on the background mask during GAN inversion. This is turned off by default because of Hugging Face speed limitations. In `configs/hyperparameters.py`, change line 15 to
|
40 |
+
```python
|
41 |
+
use_mask = True
|
42 |
+
```
|
43 |
+
|
44 |
+
|
45 |
+
To start the demo, run
|
46 |
+
```
|
47 |
+
gradio app.py
|
48 |
+
```
|
49 |
+
The demo will start at `http://localhost:7860` on your server. To visualize results, upload an image of a person, and select the input decade. The script will automatically crop and align the input image.
|
flagged/1890s/tmphowwncle.png
DELETED
Git LFS Details
|
flagged/1900s/tmpiyqo8vid.png
DELETED
Git LFS Details
|
flagged/1910s/tmplsvkbwmm.png
DELETED
Git LFS Details
|
flagged/1920s/tmpm88oq3m5.png
DELETED
Git LFS Details
|
flagged/1930s/tmp1xg1cf_k.png
DELETED
Git LFS Details
|
flagged/1940s/tmpyxtlostd.png
DELETED
Git LFS Details
|
flagged/1950s/tmp00ekzg14.png
DELETED
Git LFS Details
|
flagged/1960s/tmp0ptji34n.png
DELETED
Git LFS Details
|
flagged/1970s/tmppty6lfdc.png
DELETED
Git LFS Details
|
flagged/1980s/tmpo1znpbho.png
DELETED
Git LFS Details
|
flagged/1990s/tmpkoptsgzw.png
DELETED
Git LFS Details
|
flagged/2000s/tmpn85t4qg9.png
DELETED
Git LFS Details
|
flagged/2010s/tmpxwhqu3bi.png
DELETED
Git LFS Details
|
flagged/Cropped Input/tmpewip1qud.png
DELETED
Git LFS Details
|
flagged/Input Image/tmpqdqusbe1.png
DELETED
Git LFS Details
|
flagged/log.csv
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
Input Image,Input Decade,Cropped Input,1880s,1890s,1900s,1910s,1920s,1930s,1940s,1950s,1960s,1970s,1980s,1990s,2000s,2010s,flag,username,timestamp
|
2 |
-
/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/Input Image/tmpqdqusbe1.png,1920s,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/Cropped Input/tmpewip1qud.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1880s/tmpqihfju9s.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1890s/tmphowwncle.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1900s/tmpiyqo8vid.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1910s/tmplsvkbwmm.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1920s/tmpm88oq3m5.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1930s/tmp1xg1cf_k.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1940s/tmpyxtlostd.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1950s/tmp00ekzg14.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1960s/tmp0ptji34n.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1970s/tmppty6lfdc.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1980s/tmpo1znpbho.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/1990s/tmpkoptsgzw.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/2000s/tmpn85t4qg9.png,/share/phoenix/nfs04/S7/emc348/faces-through-time/flagged/2010s/tmpxwhqu3bi.png,,,2023-06-07 16:44:52.259412
|
|
|
|
|
|
flagged/1880s/tmpqihfju9s.png → imgs/teaser.png
RENAMED
File without changes
|