The viewer is disabled because this dataset repo requires arbitrary Python code execution. Please consider
removing the
loading script
and relying on
automated data support
(you can use
convert_to_parquet
from the datasets
library). If this is not possible, please
open a discussion
for direct help.
Dataset Card for Noisy dSprites
Dataset Description
The Noisy dSprites dataset is a synthetic 2D shapes dataset designed for benchmarking algorithms in disentangled representation learning and unsupervised representation learning.
It is a variant of the original dSprites dataset introduced in the β-VAE paper. In this version, random noise is added to the background of each image, while the object shape itself remains unchanged. This allows researchers to evaluate robustness to background noise and test how well models can disentangle factors under noisy observation conditions.
The dataset consists of procedurally generated images of 2D sprites, under controlled variations of 6 known factors of variation:
- Object color (1 value in original dSprites, fixed: white)
- Object shape (3 values: square, ellipse, heart)
- Object scale (6 values)
- Object orientation (40 values)
- Object position X (32 values)
- Object position Y (32 values)
All possible combinations of these factors are present exactly once, generating a total of 737,280 images at a resolution of 64×64 pixels. Each image is provided along with Discrete latent classes (indices for each factor) and Continuous latent values.
These variants allow systematic testing under noisy background.
The dataset is commonly used for benchmarking disentanglement learning, and can be used in conjunction with other variants:
Dataset Source
- Homepage: https://github.com/google-research/disentanglement_lib/
- License: Apache License 2.0
- Paper: Francesco Locatello et al. Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations. ICML 2019.
Dataset Structure
Factors | Possible Classes (Indices) | Values |
---|---|---|
color | white=0 (fixed) | 1.0 (fixed) |
shape | square=0, ellipse=1, heart=2 | 1.0, 2.0, 3.0 (categorical) |
scale | 0,...,5 | [0.5, 1.0] linearly spaced (6 values) |
orientation | 0,...,39 | [0, 2π] radians (40 values) |
posX | 0,...,31 | [0, 1] normalized position (32 values) |
posY | 0,...,31 | [0, 1] normalized position (32 values) |
Note: In this Noisy variant, the object is kept white and the background pixels are replaced with random noise. Each image corresponds to a unique combination of these 6 factors. The images are stored in a row-major order (fastest-changing factor is posY
, slowest-changing factor is color
).
Why no train/test split?
The Noisy dSprites dataset does not provide an official train/test split. It is designed for representation learning research, where the goal is to learn disentangled and interpretable latent factors. Since the dataset is a complete Cartesian product of all factor combinations, models typically require access to the full dataset to explore factor-wise variations.
Example Usage
Below is a quick example of how to load this dataset via the Hugging Face Datasets library:
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("randall-lab/dsprites-noisy", split="train", trust_remote_code=True)
# Access a sample from the dataset
example = dataset[0]
image = example["image"]
label = example["label"] # [color_idx, shape_idx, scale_idx, orientation_idx, posX_idx, posY_idx]
label_values = example["label_values"] # corresponding continuous values
# Label Classes
color = example["color"] # 0
shape = example["shape"] # 0-2
scale = example["scale"] # 0-5
orientation = example["orientation"] # 0-39
posX = example["posX"] # 0-31
posY = example["posY"] # 0-31
# Label Values
color_value = example["colorValue"] # 1
shape_value = example["shapeValue"] # 1.0, 2.0, 3.0
scale_value = example["scaleValue"] # [0.5, 1]
orientation_value = example["orientationValue"] # [0, 2π]
posX_value = example["posXValue"] # [0, 1]
posY_value = example["posYValue"] # [0, 1]
image.show() # Display the image
print(f"Label (factors): {label}")
print(f"Label values (factors): {label_values}")
If you are using colab, you should update datasets to avoid errors
pip install -U datasets
Citation
@inproceedings{locatello2019challenging,
title={Challenging Common Assumptions in the Unsupervised Learning of Disentangled Representations},
author={Locatello, Francesco and Bauer, Stefan and Lucic, Mario and Raetsch, Gunnar and Gelly, Sylvain and Sch{\"o}lkopf, Bernhard and Bachem, Olivier},
booktitle={International Conference on Machine Learning},
pages={4114--4124},
year={2019}
}
- Downloads last month
- 10