Spaces:
Runtime error
Runtime error
yjernite
commited on
Commit
•
f7198da
1
Parent(s):
c174a7f
section 1 edits
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
-
import os
|
4 |
|
5 |
_ID_CLUSTER_SCREEN_SHOTS = {
|
6 |
19: ("cluster_19_of_24_unmarked_white_unmarked_man.JPG", "Cluster 19 of 24"),
|
@@ -92,7 +93,7 @@ with gr.Blocks() as demo:
|
|
92 |
### How do Diffusion Models Represent Identity?
|
93 |
|
94 |
One of the goals of our study was to look at the ways in which pictures generated by text-to-image models depict different notions of gender and ethnicity.
|
95 |
-
These concepts are inherently difficult to describe, however: gender and
|
96 |
they cannot (and should not) be predicted based on appearance features alone.
|
97 |
Since we are working with depictions of fictive humans when analyzing text-to-image model behaviors,
|
98 |
we cannot rely on self-identification either to assign identity categories to individual data points.
|
@@ -120,11 +121,11 @@ with gr.Blocks() as demo:
|
|
120 |
Why do the only exceptions appear to be fast food workers and other lower wage professions?
|
121 |
And finally, what could be the **consequences of such a lack of diversity** in the system outputs?
|
122 |
|
123 |
-
**Look like** is the operative phrase here
|
124 |
-
|
125 |
we instead focus on dataset-level trends in visual features that are correlated with social variation in the text prompts.
|
126 |
We do this through *controlled prompting* and *hierarchical clustering*: for each system,
|
127 |
-
we obtain a dataset of
|
128 |
where ***(identity terms)*** jointly enumerate phrases describing ethnicities and phrases denoting gender.
|
129 |
We then cluster these images by similarity and create an [Identity Representation Demo](https://hf.co/spaces/society-ethics/DiffusionFaceClustering)
|
130 |
to showcase the visual trends encoded in these clusters - as well as their relation to the social variables under consideration.
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import gradio as gr
|
4 |
from PIL import Image
|
|
|
5 |
|
6 |
_ID_CLUSTER_SCREEN_SHOTS = {
|
7 |
19: ("cluster_19_of_24_unmarked_white_unmarked_man.JPG", "Cluster 19 of 24"),
|
|
|
93 |
### How do Diffusion Models Represent Identity?
|
94 |
|
95 |
One of the goals of our study was to look at the ways in which pictures generated by text-to-image models depict different notions of gender and ethnicity.
|
96 |
+
These concepts are inherently difficult to describe, however: gender and ethnicity are multi-dimensional, inter-related, and, most importantly, socially constructed:
|
97 |
they cannot (and should not) be predicted based on appearance features alone.
|
98 |
Since we are working with depictions of fictive humans when analyzing text-to-image model behaviors,
|
99 |
we cannot rely on self-identification either to assign identity categories to individual data points.
|
|
|
121 |
Why do the only exceptions appear to be fast food workers and other lower wage professions?
|
122 |
And finally, what could be the **consequences of such a lack of diversity** in the system outputs?
|
123 |
|
124 |
+
**Look like** is the operative phrase here as the people depicted in the pictures are synthetic and so do not belong to socially-constructed groups.
|
125 |
+
Consequently, since we cannot assign a gender or ethnicity label to each data point,
|
126 |
we instead focus on dataset-level trends in visual features that are correlated with social variation in the text prompts.
|
127 |
We do this through *controlled prompting* and *hierarchical clustering*: for each system,
|
128 |
+
we obtain a dataset of images corresponding to prompts of the format "*Photo portrait of a **(identity terms)** person at work*",
|
129 |
where ***(identity terms)*** jointly enumerate phrases describing ethnicities and phrases denoting gender.
|
130 |
We then cluster these images by similarity and create an [Identity Representation Demo](https://hf.co/spaces/society-ethics/DiffusionFaceClustering)
|
131 |
to showcase the visual trends encoded in these clusters - as well as their relation to the social variables under consideration.
|