Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -42,8 +42,7 @@ task_ids:
|
|
42 |
- [Dataset Summary](#dataset-summary)
|
43 |
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
44 |
- [Languages](#languages)
|
45 |
-
- [
|
46 |
-
- [Key Differences](#key-differences)
|
47 |
- [Dataset Structure](#dataset-structure)
|
48 |
- [Data Instances](#data-instances)
|
49 |
- [Data Fields](#data-fields)
|
@@ -52,13 +51,6 @@ task_ids:
|
|
52 |
- [Data Splits](#data-splits)
|
53 |
- [Loading Data Subsets](#loading-data-subsets)
|
54 |
- [Method 1: Using Hugging Face Datasets Loader](#method-1-using-hugging-face-datasets-loader)
|
55 |
-
- [Method 2. Use the PoloClub Downloader](#method-2-use-the-poloclub-downloader)
|
56 |
-
- [Usage/Examples](#usageexamples)
|
57 |
-
- [Downloading a single file](#downloading-a-single-file)
|
58 |
-
- [Downloading a range of files](#downloading-a-range-of-files)
|
59 |
-
- [Downloading to a specific directory](#downloading-to-a-specific-directory)
|
60 |
-
- [Setting the files to unzip once they've been downloaded](#setting-the-files-to-unzip-once-theyve-been-downloaded)
|
61 |
-
- [Method 3. Use `metadata.parquet` (Text Only)](#method-3-use-metadataparquet-text-only)
|
62 |
- [Dataset Creation](#dataset-creation)
|
63 |
- [Curation Rationale](#curation-rationale)
|
64 |
- [Source Data](#source-data)
|
@@ -156,17 +148,13 @@ For example, below is the image of `f3501e05-aef7-4225-a9e9-f516527408ac.png` an
|
|
156 |
### Data Fields
|
157 |
|
158 |
- key: Unique image name
|
159 |
-
- `p`:
|
160 |
-
- `se`: Random seed
|
161 |
-
- `c`: CFG Scale (guidance scale)
|
162 |
-
- `st`: Steps
|
163 |
-
- `sa`: Sampler
|
164 |
|
165 |
### Dataset Metadata
|
166 |
|
167 |
To help you easily access prompts and other attributes of images without downloading all the Zip files, we include a metadata table `metadata.parquet` for DiffusionDB-pixelart.
|
168 |
|
169 |
-
|
170 |
|
171 |
Below are three random rows from `metadata.parquet`.
|
172 |
|
@@ -183,18 +171,7 @@ Below are three random rows from `metadata.parquet`.
|
|
183 |
|Column|Type|Description|
|
184 |
|:---|:---|:---|
|
185 |
|`image_name`|`string`|Image UUID filename.|
|
186 |
-
|`
|
187 |
-
|`part_id`|`uint16`|Folder ID of this image.|
|
188 |
-
|`seed`|`uint32`| Random seed used to generate this image.|
|
189 |
-
|`step`|`uint16`| Step count (hyperparameter).|
|
190 |
-
|`cfg`|`float32`| Guidance scale (hyperparameter).|
|
191 |
-
|`sampler`|`uint8`| Sampler method (hyperparameter). Mapping: `{1: "ddim", 2: "plms", 3: "k_euler", 4: "k_euler_ancestral", 5: "k_heun", 6: "k_dpm_2", 7: "k_dpm_2_ancestral", 8: "k_lms", 9: "others"}`.
|
192 |
-
|`width`|`uint16`|Image width.|
|
193 |
-
|`height`|`uint16`|Image height.|
|
194 |
-
|`user_name`|`string`|The unique discord ID's SHA256 hash of the user who generated this image. For example, the hash for `xiaohk#3146` is `e285b7ef63be99e9107cecd79b280bde602f17e0ca8363cb7a0889b67f0b5ed0`. "deleted_account" refer to users who have deleted their accounts. None means the image has been deleted before we scrape it for the second time.|
|
195 |
-
|`timestamp`|`timestamp`|UTC Timestamp when this image was generated. None means the image has been deleted before we scrape it for the second time. Note that timestamp is not accurate for duplicate images that have the same prompt, hypareparameters, width, height.|
|
196 |
-
|`image_nsfw`|`float32`|Likelihood of an image being NSFW. Scores are predicted by [LAION's state-of-art NSFW detector](https://github.com/LAION-AI/LAION-SAFETY) (range from 0 to 1). A score of 2.0 means the image has already been flagged as NSFW and blurred by Stable Diffusion.|
|
197 |
-
|`prompt_nsfw`|`float32`|Likelihood of a prompt being NSFW. Scores are predicted by the library [Detoxicy](https://github.com/unitaryai/detoxify). Each score represents the maximum of `toxicity` and `sexual_explicit` (range from 0 to 1).|
|
198 |
|
199 |
> **Warning**
|
200 |
> Although the Stable Diffusion model has an NSFW filter that automatically blurs user-generated NSFW images, this NSFW filter is not perfect—DiffusionDB still contains some NSFW images. Therefore, we compute and provide the NSFW scores for images and prompts using the state-of-the-art models. The distribution of these scores is shown below. Please decide an appropriate NSFW score threshold to filter out NSFW images before using DiffusionDB in your projects.
|
@@ -217,8 +194,8 @@ You can use the Hugging Face [`Datasets`](https://huggingface.co/docs/datasets/q
|
|
217 |
import numpy as np
|
218 |
from datasets import load_dataset
|
219 |
|
220 |
-
# Load the dataset with the `
|
221 |
-
dataset = load_dataset('jainr3/diffusiondb-pixelart', '
|
222 |
```
|
223 |
|
224 |
## Dataset Creation
|
|
|
42 |
- [Dataset Summary](#dataset-summary)
|
43 |
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
44 |
- [Languages](#languages)
|
45 |
+
- [Subset](#subset)
|
|
|
46 |
- [Dataset Structure](#dataset-structure)
|
47 |
- [Data Instances](#data-instances)
|
48 |
- [Data Fields](#data-fields)
|
|
|
51 |
- [Data Splits](#data-splits)
|
52 |
- [Loading Data Subsets](#loading-data-subsets)
|
53 |
- [Method 1: Using Hugging Face Datasets Loader](#method-1-using-hugging-face-datasets-loader)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
- [Dataset Creation](#dataset-creation)
|
55 |
- [Curation Rationale](#curation-rationale)
|
56 |
- [Source Data](#source-data)
|
|
|
148 |
### Data Fields
|
149 |
|
150 |
- key: Unique image name
|
151 |
+
- `p`: Text
|
|
|
|
|
|
|
|
|
152 |
|
153 |
### Dataset Metadata
|
154 |
|
155 |
To help you easily access prompts and other attributes of images without downloading all the Zip files, we include a metadata table `metadata.parquet` for DiffusionDB-pixelart.
|
156 |
|
157 |
+
Two tables share the same schema, and each row represents an image. We store these tables in the Parquet format because Parquet is column-based: you can efficiently query individual columns (e.g., prompts) without reading the entire table.
|
158 |
|
159 |
Below are three random rows from `metadata.parquet`.
|
160 |
|
|
|
171 |
|Column|Type|Description|
|
172 |
|:---|:---|:---|
|
173 |
|`image_name`|`string`|Image UUID filename.|
|
174 |
+
|`text`|`string`|The text prompt used to generate this image.|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
> **Warning**
|
177 |
> Although the Stable Diffusion model has an NSFW filter that automatically blurs user-generated NSFW images, this NSFW filter is not perfect—DiffusionDB still contains some NSFW images. Therefore, we compute and provide the NSFW scores for images and prompts using the state-of-the-art models. The distribution of these scores is shown below. Please decide an appropriate NSFW score threshold to filter out NSFW images before using DiffusionDB in your projects.
|
|
|
194 |
import numpy as np
|
195 |
from datasets import load_dataset
|
196 |
|
197 |
+
# Load the dataset with the `2k_random_1k` subset
|
198 |
+
dataset = load_dataset('jainr3/diffusiondb-pixelart', '2k_random_1k')
|
199 |
```
|
200 |
|
201 |
## Dataset Creation
|