xiaohk commited on
Commit
3a991f9
1 Parent(s): 4dc33de

Update readme

Browse files
Files changed (1) hide show
  1. README.md +138 -34
README.md CHANGED
@@ -1,10 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # DiffusionDB
2
 
3
- DiffusionDB is the first large-scale text-to-image prompt dataset. It contains 2 million images generated by Stable Diffusion using prompts and hyperparameters specified by real users. The unprecedented scale and diversity of this human-actuated dataset provide exciting research opportunities in understanding the interplay between prompts and generative models, detecting deepfakes, and designing human-AI interaction tools to help users more easily use these models.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
- ## Get Started
6
 
7
- DiffusionDB is available at: [https://poloclub.github.io/diffusiondb](https://poloclub.github.io/diffusiondb).
 
 
 
 
 
 
8
 
9
  ## Dataset Structure
10
 
@@ -29,8 +100,11 @@ We use a modularized file structure to distribute DiffusionDB. The 2 million ima
29
  └── metadata.parquet
30
  ```
31
 
32
- These sub-folders have names `part-00xxxx`, and each image has a unique name generated by [UUID Version 4](https://en.wikipedia.org/wiki/Universally_unique_identifier). The JSON file in a sub-folder has the same name as the sub-folder. Each image is a PNG file. The JSON file contains key-value pairs mapping image filenames to their prompts and hyperparameters. For example, below is the image of `f3501e05-aef7-4225-a9e9-f516527408ac.png` and its key-value pair in `part-000001.json`.
 
 
33
 
 
34
 
35
  <img width="300" src="https://i.imgur.com/gqWcRs2.png">
36
 
@@ -46,7 +120,7 @@ These sub-folders have names `part-00xxxx`, and each image has a unique name gen
46
  }
47
  ```
48
 
49
- The data fields are:
50
 
51
  - key: Unique image name
52
  - `p`: Prompt
@@ -55,51 +129,81 @@ The data fields are:
55
  - `st`: Steps
56
  - `sa`: Sampler
57
 
58
- At the top level folder of DiffusionDB, we include a metadata table in Parquet format `metadata.parquet`.
59
- This table has seven columns: `image_name`, `prompt`, `part_id`, `seed`, `step`, `cfg`, and `sampler`, and it has 2 million rows where each row represents an image. `seed`, `step`, and `cfg` are We choose Parquet because it is column-based: researchers can efficiently query individual columns (e.g., prompts) without reading the entire table. Below are the five random rows from the table.
60
 
 
61
 
62
- | image_name | prompt | part_id | seed | step | cfg | sampler |
63
- |------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|------------|------|-----|---------|
64
- | 49f1e478-ade6-49a8-a672-6e06c78d45fc.png | ryan gosling in fallout 4 kneels near a nuclear bomb | 1643 | 2220670173 | 50 | 7.0 | 8 |
65
- | b7d928b6-d065-4e81-bc0c-9d244fd65d0b.png | A beautiful robotic woman dreaming, cinematic lighting, soft bokeh, sci-fi, modern, colourful, highly detailed, digital painting, artstation, concept art, sharp focus, illustration, by greg rutkowski | 87 | 51324658 | 130 | 6.0 | 8 |
66
- | 19b1b2f1-440e-4588-ba96-1ac19888c4ba.png | bestiary of creatures from the depths of the unconscious psyche, in the style of a macro photograph with shallow dof | 754 | 3953796708 | 50 | 7.0 | 8 |
67
- | d34afa9d-cf06-470f-9fce-2efa0e564a13.png | close up portrait of one calico cat by vermeer. black background, three - point lighting, enchanting, realistic features, realistic proportions. | 1685 | 2007372353 | 50 | 7.0 | 8 |
68
- | c3a21f1f-8651-4a58-a4d4-7500d97651dc.png | a bottle of jack daniels with the word medicare replacing the word jack daniels | 243 | 1617291079 | 50 | 7.0 | 8 |
69
 
70
- To save space, we use an integer to encode the `sampler` in the table above.
71
 
72
- |Sampler|Integer Value|
73
- |:--|--:|
74
- |ddim|1|
75
- |plms|2|
76
- |k_euler|3|
77
- |k_euler_ancestral|4|
78
- |ddik_heunm|5|
79
- |k_dpm_2|6|
80
- |k_dpm_2_ancestral|7|
81
- |k_lms|8|
82
 
83
- ## Dataset Creation
84
 
85
- We collected all images from the official Stable Diffusion Discord server. Please read our research paper for details. The code is included in [`./scripts/`](./scripts/).
 
86
 
87
- ## Data Removal
88
 
89
- If you find any harmful images or prompts in DiffusionDB, you can use [this Google Form](https://forms.gle/GbYaSpRNYqxCafMZ9) to report them. Similarly, if you are a creator of an image included in this dataset, you can use the [same form](https://forms.gle/GbYaSpRNYqxCafMZ9) to let us know if you would like to remove your image from DiffusionDB. We will closely monitor this form and update DiffusionDB periodically.
90
 
91
- ## Credits
92
 
93
- DiffusionDB is created by [Jay Wang](https://zijie/wang), [Evan Montoya](https://www.linkedin.com/in/evan-montoya-b252391b4/), [David Munechika](https://www.linkedin.com/in/dmunechika/), [Alex Yang](https://alexanderyang.me), [Ben Hoover](https://www.bhoov.com), [Polo Chau](https://faculty.cc.gatech.edu/~dchau/).
 
 
 
 
 
 
 
 
 
 
94
 
95
- ## Citation
96
 
 
97
 
98
- ## Licensing
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
  The DiffusionDB dataset is available under the [CC0 1.0 License](https://creativecommons.org/publicdomain/zero/1.0/).
101
  The Python code in this repository is available under the [MIT License](./LICENSE).
102
 
103
- ## Contact
 
 
 
104
 
105
  If you have any questions, feel free to [open an issue](https://github.com/poloclub/diffusiondb/issues/new) or contact [Jay Wang](https://zijie.wang).
 
1
+ ---
2
+ layout: default
3
+ title: Home
4
+ nav_order: 1
5
+ has_children: false
6
+
7
+ annotations_creators:
8
+ - no-annotation
9
+ language:
10
+ - en
11
+ language_creators:
12
+ - machine-generated
13
+ license:
14
+ - cc0-1.0
15
+ multilinguality:
16
+ - multilingual
17
+ pretty_name: DiffusionDB
18
+ size_categories:
19
+ - n>1T
20
+ source_datasets:
21
+ - original
22
+ tags:
23
+ - stable diffusion
24
+ - prompt engineering
25
+ - prompts
26
+ - research paper
27
+ task_categories:
28
+ - text-to-image
29
+ - image-to-text
30
+ task_ids:
31
+ - image-captioning
32
+ ---
33
+
34
  # DiffusionDB
35
 
36
+ ## Table of Contents
37
+
38
+ - [Dataset Description](#dataset-description)
39
+ - [Dataset Summary](#dataset-summary)
40
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
41
+ - [Languages](#languages)
42
+ - [Dataset Structure](#dataset-structure)
43
+ - [Data Instances](#data-instances)
44
+ - [Data Fields](#data-fields)
45
+ - [Data Splits](#data-splits)
46
+ - [Dataset Creation](#dataset-creation)
47
+ - [Curation Rationale](#curation-rationale)
48
+ - [Source Data](#source-data)
49
+ - [Annotations](#annotations)
50
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
51
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
52
+ - [Social Impact of Dataset](#social-impact-of-dataset)
53
+ - [Discussion of Biases](#discussion-of-biases)
54
+ - [Other Known Limitations](#other-known-limitations)
55
+ - [Additional Information](#additional-information)
56
+ - [Dataset Curators](#dataset-curators)
57
+ - [Licensing Information](#licensing-information)
58
+ - [Citation Information](#citation-information)
59
+ - [Contributions](#contributions)
60
+
61
+ ## Dataset Description
62
+
63
+ - **Homepage:** [DiffusionDB homepage](https://poloclub.github.io/diffusiondb)
64
+ - **Repository:** [DiffusionDB repository](https://github.com/poloclub/diffusiondb)
65
+ - **Paper:** [DiffusionDB: A Large-scale Prompt Gallery Dataset for Text-to-Image Generative Models](https://poloclub.github.io/diffusiondb)
66
+ - **Point of Contact:** [Jay Wang](mailto:jayw@gatech.edu)
67
+
68
+ ### Dataset Summary
69
 
70
+ DiffusionDB is the first large-scale text-to-image prompt dataset. It contains 2 million images generated by Stable Diffusion using prompts and hyperparameters specified by real users.
71
 
72
+ ### Supported Tasks and Leaderboards
73
+
74
+ The unprecedented scale and diversity of this human-actuated dataset provide exciting research opportunities in understanding the interplay between prompts and generative models, detecting deepfakes, and designing human-AI interaction tools to help users more easily use these models.
75
+
76
+ ### Languages
77
+
78
+ The text in the dataset is mostly English. It also contains other languages such as Spanish, Chinese, and Russian.
79
 
80
  ## Dataset Structure
81
 
 
100
  └── metadata.parquet
101
  ```
102
 
103
+ These sub-folders have names `part-00xxxx`, and each image has a unique name generated by [UUID Version 4](https://en.wikipedia.org/wiki/Universally_unique_identifier). The JSON file in a sub-folder has the same name as the sub-folder. Each image is a PNG file. The JSON file contains key-value pairs mapping image filenames to their prompts and hyperparameters.
104
+
105
+ ### Data Instances
106
 
107
+ For example, below is the image of `f3501e05-aef7-4225-a9e9-f516527408ac.png` and its key-value pair in `part-000001.json`.
108
 
109
  <img width="300" src="https://i.imgur.com/gqWcRs2.png">
110
 
 
120
  }
121
  ```
122
 
123
+ ### Data Fields
124
 
125
  - key: Unique image name
126
  - `p`: Prompt
 
129
  - `st`: Steps
130
  - `sa`: Sampler
131
 
132
+ ### Data Splits
 
133
 
134
+ We split 2 million images into 2,000 folders where each folder contains 1,000 images and a JSON file.
135
 
136
+ ## Dataset Creation
 
 
 
 
 
 
137
 
138
+ ### Curation Rationale
139
 
140
+ Recent diffusion models have gained immense popularity by enabling high-quality and controllable image generation based on text prompts written in natural language. Since the release of these models, people from different domains have quickly applied them to create awardwinning artworks, synthetic radiology images, and even hyper-realistic videos.
 
 
 
 
 
 
 
 
 
141
 
142
+ However, generating images with desired details is difficult, as it requires users to write proper prompts specifying the exact expected results. Developing such prompts requires trial and error, and can often feel random and unprincipled. Simon Willison analogizes writing prompts to wizards learning “magical spells”: users do not understand why some prompts work, but they will add these prompts to their “spell book.” For example, to generate highly-detailed images, it has become a common practice to add special keywords such as “trending on artstation” and “unreal engine” in the prompt.
143
 
144
+ Prompt engineering has become a field of study in the context of text-to-text generation, where researchers systematically investigate how to construct prompts to effectively solve different down-stream tasks. As large text-to-image models are relatively new, there is a pressing need to understand how these models react to prompts, how to write effective prompts, and how to design tools to help users generate images.
145
+ To help researchers tackle these critical challenges, we create DiffusionDB, the first large-scale prompt dataset with 2 million real prompt-image pairs.
146
 
147
+ ### Source Data
148
 
149
+ #### Initial Data Collection and Normalization
150
 
151
+ We construct DiffusionDB by scraping user-generated images on the official Stable Diffusion Discord server. We choose Stable Diffusion because it is currently the only open-source large text-to-image generative model, and all generated images have a CC0 1.0 Universal Public Domain Dedication license that waives all copyright and allows uses for any purpose. We choose the official [Stable Diffusion Discord server](https://discord.gg/stablediffusion) because it is public, and it has strict rules against generating and sharing illegal, hateful, or NSFW (not suitable for work, such as sexual and violent content) images. The server also disallows users to write or share prompts with personal information.
152
 
153
+ #### Who are the source language producers?
154
+
155
+ The language producers are users of the official [Stable Diffusion Discord server](https://discord.gg/stablediffusion).
156
+
157
+ ### Annotations
158
+
159
+ The dataset does not contain any additional annotations.
160
+
161
+ #### Annotation process
162
+
163
+ [N/A]
164
 
165
+ #### Who are the annotators?
166
 
167
+ [N/A]
168
 
169
+ ### Personal and Sensitive Information
170
+
171
+ The authors removed the discord usernames from the dataset.
172
+ We decide to anonymize the dataset because some prompts might include sensitive information: explicitly linking them to their creators can cause harm to creators.
173
+
174
+ ## Considerations for Using the Data
175
+
176
+ ### Social Impact of Dataset
177
+
178
+ The purpose of this dataset is to help develop better understanding of large text-to-image generative models.
179
+ The unprecedented scale and diversity of this human-actuated dataset provide exciting research opportunities in understanding the interplay between prompts and generative models, detecting deepfakes, and designing human-AI interaction tools to help users more easily use these models.
180
+
181
+ It should note that we collect images and their prompts from the Stable Diffusion Discord server. The Discord server has rules against users generating or sharing harmful or NSFW (not suitable for work, such as sexual and violent content) images. The Stable Diffusion model used in the server also has an NSFW filter that blurs the generated images if it detects NSFW content. However, it is still possible that some users had generated harmful images that were not detected by the NSFW filter or removed by the server moderators. Therefore, DiffusionDB can potentially contain these images. To mitigate the potential harm, we provide a [Google Form](https://forms.gle/GbYaSpRNYqxCafMZ9) on the [DiffusionDB website](https://poloclub.github.io/diffusiondb/) where users can report harmful or inappropriate images and prompts. We will closely monitor this form and remove reported images and prompts from DiffusionDB.
182
+
183
+ ### Discussion of Biases
184
+
185
+ The 2 million images in DiffusionDB have diverse styles and categories. However, Discord can be a biased data source. Our images come from channels where early users could use a bot to use Stable Diffusion before release. As these users had started using Stable Diffusion before the model was public, we hypothesize that they are AI art enthusiasts and are likely to have experience with other text-to-image generative models. Therefore, the prompting style in DiffusionDB might not represent novice users. Similarly, the prompts in DiffusionDB might not generalize to domains that require specific knowledge, such as medical images.
186
+
187
+ ### Other Known Limitations
188
+
189
+ **Generalizability.** Previous research has shown a prompt that works well on one generative model might not give the optimal result when used in other models.
190
+ Therefore, different models can need users to write different prompts. For example, many Stable Diffusion prompts use commas to separate keywords, while this pattern is less seen in prompts for DALL-E 2 or Midjourney. Thus, we caution researchers that some research findings from DiffusionDB might not be generalizable to other text-to-image generative models.
191
+
192
+ ## Additional Information
193
+
194
+ ### Dataset Curators
195
+
196
+ DiffusionDB is created by [Jay Wang](https://zijie/wang), [Evan Montoya](https://www.linkedin.com/in/evan-montoya-b252391b4/), [David Munechika](https://www.linkedin.com/in/dmunechika/), [Alex Yang](https://alexanderyang.me), [Ben Hoover](https://www.bhoov.com), [Polo Chau](https://faculty.cc.gatech.edu/~dchau/).
197
+
198
+
199
+ ### Licensing Information
200
 
201
  The DiffusionDB dataset is available under the [CC0 1.0 License](https://creativecommons.org/publicdomain/zero/1.0/).
202
  The Python code in this repository is available under the [MIT License](./LICENSE).
203
 
204
+ ### Citation Information
205
+
206
+
207
+ ### Contributions
208
 
209
  If you have any questions, feel free to [open an issue](https://github.com/poloclub/diffusiondb/issues/new) or contact [Jay Wang](https://zijie.wang).