File size: 2,879 Bytes
b260763
 
 
 
 
 
 
 
 
37f377e
b260763
3e3cc54
b260763
 
 
 
 
4ae241e
 
 
 
 
 
 
 
cf3577e
b7c177d
4ae241e
3e3cc54
 
4ae241e
 
 
 
 
11d6ee6
4ae241e
 
 
11d6ee6
4ae241e
 
5c7822d
b260763
7bf4347
4ae241e
 
 
 
cf3577e
4ae241e
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import gradio as gr

VALID_CHOICES = [
    "Bald",
    "Young",
    "Mustache",
    "Eyeglasses",
    "Hat",
    "Smiling",
    "Gray_Hair",
]
ENABLE_GPU = False
MODEL_NAME = "stylegan_ffhq"
OUTPUT_LIST = [
    gr.outputs.Image(type="pil", label="Generated Images"),
    gr.outputs.Image(type="pil", label="Modified Images"),
]
# description = """
# This is an interactive demo of an extension of the <a href="https://genforce.github.io/interfacegan/">CVPR2020 InterfaceGAN paper</a>, by adding other attributes such as Hat, Bald, etc. to the generated images. Here is a step-by-step guide to use this interface: 
#   + ๐ŸŒพ Select the Random seed you want to use to generate the images  
#   + &#128450; Select the list of attributes you want to modify (of course, you can mix several attributes)  
#   + ๐Ÿ›  Select the coefficient of modification (higher value means stronger modification)  
#   + ๐Ÿ”ฅ Submit!  

# Check the <a href="https://github.com/genforce/interfacegan">original repo</a> as well as the <a href="https://github.com/younesbelkada/interfacegan">extended version of the work</a>.


# &#x2B55; This method is biased on the data it has been trained for attribute recognition. E.g. if you decide to modify the "Bald" attribute on Female faces, the method will turn it into Male faces. Future work may focus more on this direction to try to have unbiased results of the modifications.
#Check the <a href="https://github.com/genforce/interfacegan">original repo</a> as well as the <a href="https://github.com/younesbelkada/interfacegan">extended version of the work</a>.
# 
# </center>
# </p>
# """
description = """
<p>
This is an interactive demo of an extension of the <a href="https://genforce.github.io/interfacegan/">CVPR2020 InterfaceGAN paper</a>, which adds other attributes such as Hat, Bald, etc. to the generated images. Here is a step-by-step guide to use this space: 
<ul>
  <li>๐ŸŒพ Select the Random seed you want to use to generate the images</li>
  <li>&#128450; Select the list of attributes you want to modify (of course, you can mix several attributes)</li>
  <li>๐Ÿ›  Select the modification scale (higher value means stronger modification)</li>
  <li>๐Ÿ”ฅ Submit!</li>
</ul>
&#x2B55; This method is biased on the data it has been trained for attribute recognition. E.g. if you decide to modify the "Bald" attribute on Female faces, the method will turn it into Male faces. Future work may focus more on this direction to try to have unbiased results of the modifications.
</p>
"""
css = """
ul {
  list-style-type: none;
}

ul.no-bullets li
{
    list-style-type: none;
}
"""
title = "InterfaceGAN++ Demo"
article = "<div style='text-align: center;'><a href='https://github.com/genforce/interfacegan' target='_blank'>Original Paper</a> | <a href='https://github.com/younesbelkada/interfacegan' target='_blank'>Extended Version</a></div>"