xiaohk commited on
Commit
4dc33de
β€’
1 Parent(s): 2eda5d3

Update readme

Browse files
Files changed (1) hide show
  1. README.md +105 -3
README.md CHANGED
@@ -1,3 +1,105 @@
1
- ---
2
- license: cc0-1.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
11
+ We use a modularized file structure to distribute DiffusionDB. The 2 million images in DiffusionDB are split into 2,000 folders, where each folder contains 1,000 images and a JSON file that links these 1,000 images to their prompts and hyperparameters.
12
+
13
+ ```
14
+ ./
15
+ β”œβ”€β”€ images
16
+ β”‚Β Β  β”œβ”€β”€ part-000001
17
+ β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 3bfcd9cf-26ea-4303-bbe1-b095853f5360.png
18
+ β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 5f47c66c-51d4-4f2c-a872-a68518f44adb.png
19
+ β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 66b428b9-55dc-4907-b116-55aaa887de30.png
20
+ β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 99c36256-2c20-40ac-8e83-8369e9a28f32.png
21
+ β”‚Β Β  β”‚Β Β  β”œβ”€β”€ f3501e05-aef7-4225-a9e9-f516527408ac.png
22
+ β”‚Β Β  β”‚Β Β  β”œβ”€β”€ [...]
23
+ β”‚Β Β  β”‚Β Β  └── part-000001.json
24
+ β”‚Β Β  β”œβ”€β”€ part-000002
25
+ β”‚Β Β  β”œβ”€β”€ part-000003
26
+ β”‚Β Β  β”œβ”€β”€ part-000004
27
+ β”‚Β Β  β”œβ”€β”€ [...]
28
+ β”‚Β Β  └── part-002000
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
+
37
+ ```json
38
+ {
39
+ "f3501e05-aef7-4225-a9e9-f516527408ac.png": {
40
+ "p": "geodesic landscape, john chamberlain, christopher balaskas, tadao ando, 4 k, ",
41
+ "se": 38753269,
42
+ "c": 12.0,
43
+ "st": 50,
44
+ "sa": "k_lms"
45
+ },
46
+ }
47
+ ```
48
+
49
+ The data fields are:
50
+
51
+ - key: Unique image name
52
+ - `p`: Prompt
53
+ - `se`: Random seed
54
+ - `c`: CFG Scale (guidance scale)
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).