dsprites
Stay organized with collections
Save and categorize content based on your preferences.
dSprites is a dataset of 2D shapes procedurally generated from 6 ground truth
independent latent factors. These factors are color, shape, scale,
rotation, x and y positions of a sprite.
All possible combinations of these latents are present exactly once, generating
N = 737280 total images.
Latent factor values
- Color: white
- Shape: square, ellipse, heart
- Scale: 6 values linearly spaced in [0.5, 1]
- Orientation: 40 values in [0, 2 pi]
- Position X: 32 values in [0, 1]
- Position Y: 32 values in [0, 1]
We varied one latent at a time (starting from Position Y, then Position X, etc),
and sequentially stored the images in fixed order. Hence the order along the
first dimension is fixed and allows you to map back to the value of the latents
corresponding to that image.
We chose the latents values deliberately to have the smallest step changes while
ensuring that all pixel outputs were different. No noise was added.
Split |
Examples |
'train' |
737,280 |
FeaturesDict({
'image': Image(shape=(64, 64, 1), dtype=uint8),
'label_orientation': ClassLabel(shape=(), dtype=int64, num_classes=40),
'label_scale': ClassLabel(shape=(), dtype=int64, num_classes=6),
'label_shape': ClassLabel(shape=(), dtype=int64, num_classes=3),
'label_x_position': ClassLabel(shape=(), dtype=int64, num_classes=32),
'label_y_position': ClassLabel(shape=(), dtype=int64, num_classes=32),
'value_orientation': float32,
'value_scale': float32,
'value_shape': float32,
'value_x_position': float32,
'value_y_position': float32,
})
Feature |
Class |
Shape |
Dtype |
Description |
|
FeaturesDict |
|
|
|
image |
Image |
(64, 64, 1) |
uint8 |
|
label_orientation |
ClassLabel |
|
int64 |
|
label_scale |
ClassLabel |
|
int64 |
|
label_shape |
ClassLabel |
|
int64 |
|
label_x_position |
ClassLabel |
|
int64 |
|
label_y_position |
ClassLabel |
|
int64 |
|
value_orientation |
Tensor |
|
float32 |
|
value_scale |
Tensor |
|
float32 |
|
value_shape |
Tensor |
|
float32 |
|
value_x_position |
Tensor |
|
float32 |
|
value_y_position |
Tensor |
|
float32 |
|

@misc{dsprites17,
author = {Loic Matthey and Irina Higgins and Demis Hassabis and Alexander Lerchner},
title = {dSprites: Disentanglement testing Sprites dataset},
howpublished= {https://github.com/deepmind/dsprites-dataset/},
year = "2017",
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-01 UTC.
[null,null,["Last updated 2024-06-01 UTC."],[],[],null,["# dsprites\n\n\u003cbr /\u003e\n\n- **Description**:\n\ndSprites is a dataset of 2D shapes procedurally generated from 6 ground truth\nindependent latent factors. These factors are *color* , *shape* , *scale* ,\n*rotation* , *x* and *y* positions of a sprite.\n\nAll possible combinations of these latents are present exactly once, generating\nN = 737280 total images.\n\n### Latent factor values\n\n- Color: white\n- Shape: square, ellipse, heart\n- Scale: 6 values linearly spaced in \\[0.5, 1\\]\n- Orientation: 40 values in \\[0, 2 pi\\]\n- Position X: 32 values in \\[0, 1\\]\n- Position Y: 32 values in \\[0, 1\\]\n\nWe varied one latent at a time (starting from Position Y, then Position X, etc),\nand sequentially stored the images in fixed order. Hence the order along the\nfirst dimension is fixed and allows you to map back to the value of the latents\ncorresponding to that image.\n\nWe chose the latents values deliberately to have the smallest step changes while\nensuring that all pixel outputs were different. No noise was added.\n\n- **Additional Documentation** :\n [Explore on Papers With Code\n north_east](https://paperswithcode.com/dataset/dsprites)\n\n- **Homepage** :\n \u003chttps://github.com/deepmind/dsprites-dataset\u003e\n\n- **Source code** :\n [`tfds.datasets.dsprites.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/dsprites/dsprites_dataset_builder.py)\n\n- **Versions**:\n\n - **`2.0.0`** (default): New split API (\u003chttps://tensorflow.org/datasets/splits\u003e)\n - `2.1.0`: No release notes.\n- **Download size** : `26.73 MiB`\n\n- **Dataset size** : `Unknown size`\n\n- **Auto-cached**\n ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):\n Unknown\n\n- **Splits**:\n\n| Split | Examples |\n|-----------|----------|\n| `'train'` | 737,280 |\n\n- **Feature structure**:\n\n FeaturesDict({\n 'image': Image(shape=(64, 64, 1), dtype=uint8),\n 'label_orientation': ClassLabel(shape=(), dtype=int64, num_classes=40),\n 'label_scale': ClassLabel(shape=(), dtype=int64, num_classes=6),\n 'label_shape': ClassLabel(shape=(), dtype=int64, num_classes=3),\n 'label_x_position': ClassLabel(shape=(), dtype=int64, num_classes=32),\n 'label_y_position': ClassLabel(shape=(), dtype=int64, num_classes=32),\n 'value_orientation': float32,\n 'value_scale': float32,\n 'value_shape': float32,\n 'value_x_position': float32,\n 'value_y_position': float32,\n })\n\n- **Feature documentation**:\n\n| Feature | Class | Shape | Dtype | Description |\n|-------------------|--------------|-------------|---------|-------------|\n| | FeaturesDict | | | |\n| image | Image | (64, 64, 1) | uint8 | |\n| label_orientation | ClassLabel | | int64 | |\n| label_scale | ClassLabel | | int64 | |\n| label_shape | ClassLabel | | int64 | |\n| label_x_position | ClassLabel | | int64 | |\n| label_y_position | ClassLabel | | int64 | |\n| value_orientation | Tensor | | float32 | |\n| value_scale | Tensor | | float32 | |\n| value_shape | Tensor | | float32 | |\n| value_x_position | Tensor | | float32 | |\n| value_y_position | Tensor | | float32 | |\n\n- **Supervised keys** (See\n [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):\n `None`\n\n- **Figure**\n ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):\n\n- **Examples** ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):\n\nDisplay examples... \n\n- **Citation**:\n\n @misc{dsprites17,\n author = {Loic Matthey and Irina Higgins and Demis Hassabis and Alexander Lerchner},\n title = {dSprites: Disentanglement testing Sprites dataset},\n howpublished= {https://github.com/deepmind/dsprites-dataset/},\n year = \"2017\",\n }"]]