Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,85 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
# For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
|
3 |
+
# Doc / guide: https://huggingface.co/docs/hub/datasets-cards
|
4 |
+
{}
|
5 |
+
---
|
6 |
+
|
7 |
+
# Dataset Card for dSprites
|
8 |
+
|
9 |
+
<!-- Provide a quick summary of the dataset. -->
|
10 |
+
|
11 |
+
## Dataset Details
|
12 |
+
|
13 |
+
### Dataset Description
|
14 |
+
|
15 |
+
<!-- Provide a longer summary of what this dataset is. -->
|
16 |
+
dSprites is a dataset of 2D shapes procedurally generated from 6 ground truth independent latent factors. These factors are color, shape, scale, rotation, x-position, and y-position of a sprite. All possible combinations of these latents are present exactly once, generating 737,280 total images. The dataset is widely used for studying disentangled representations in machine learning.
|
17 |
+
|
18 |
+
### Dataset Sources
|
19 |
+
|
20 |
+
<!-- Provide the basic links for the dataset. -->
|
21 |
+
|
22 |
+
- **Homepage:** https://github.com/google-deepmind/dsprites-dataset
|
23 |
+
- **Paper:** Matthey, L., Higgins, I., Hassabis, D., & Lerchner, A. (2017, May). dsprites: Disentanglement testing sprites dataset.
|
24 |
+
|
25 |
+
## Dataset Structure
|
26 |
+
|
27 |
+
<!-- This section provides a description of the dataset fields, and additional information about the dataset structure such as criteria used to create the splits, relationships between data points, etc. -->
|
28 |
+
|
29 |
+
Each sample in the dataset contains:
|
30 |
+
|
31 |
+
- **image:** A 64×64 grayscale image
|
32 |
+
|
33 |
+
- **orientation:** A float representing the rotation angle of the shape
|
34 |
+
|
35 |
+
- **shape:** A categorical label representing the shape type (square, ellipse, heart)
|
36 |
+
|
37 |
+
- **scale:** A float representing the size of the shape
|
38 |
+
|
39 |
+
- **color:** A categorical label representing the color (only 'white' in this dataset)
|
40 |
+
|
41 |
+
- **position_x:** A float representing the x-position of the shape
|
42 |
+
|
43 |
+
- **position_y:** A float representing the y-position of the shape
|
44 |
+
|
45 |
+
Total images: 737,280
|
46 |
+
|
47 |
+
Classes: 3 (square, ellipse, heart)
|
48 |
+
|
49 |
+
Splits:
|
50 |
+
|
51 |
+
- **Train:** 70% of total dataset
|
52 |
+
|
53 |
+
- **Test:** 30% of total dataset
|
54 |
+
|
55 |
+
Image specs: PNG format, 64×64 pixels, grayscale
|
56 |
+
|
57 |
+
## Example Usage
|
58 |
+
Below is a quick example of how to load this dataset via the Hugging Face Datasets library.
|
59 |
+
```
|
60 |
+
from datasets import load_dataset
|
61 |
+
|
62 |
+
# Load the dataset
|
63 |
+
dataset = load_dataset("../../aidatasets/images/dsprites.py", split="train", trust_remote_code=True)
|
64 |
+
# dataset = load_dataset("../../aidatasets/images/dsprites.py", split="test", trust_remote_code=True)
|
65 |
+
|
66 |
+
# Access a sample from the dataset
|
67 |
+
example = dataset[0]
|
68 |
+
image = example["image"]
|
69 |
+
shape = example["shape"]
|
70 |
+
|
71 |
+
image.show() # Display the image
|
72 |
+
print(f"Shape: {shape}")
|
73 |
+
```
|
74 |
+
|
75 |
+
## Citation
|
76 |
+
|
77 |
+
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
|
78 |
+
|
79 |
+
**BibTeX:**
|
80 |
+
|
81 |
+
@misc{matthey2017dsprites,
|
82 |
+
title={dsprites: Disentanglement testing sprites dataset},
|
83 |
+
author={Matthey, Loic and Higgins, Irina and Hassabis, Demis and Lerchner, Alexander},
|
84 |
+
year={2017}
|
85 |
+
}
|