Dataset Viewer

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 dSprites

Dataset Details

Dataset Description

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.

Dataset Sources

Dataset Structure

Each sample in the dataset contains:

  • image: A 64×64 grayscale image

  • orientation: A float representing the rotation angle of the shape

  • shape: A categorical label representing the shape type (square, ellipse, heart)

  • scale: A float representing the size of the shape

  • color: A categorical label representing the color (only 'white' in this dataset)

  • position_x: A float representing the x-position of the shape

  • position_y: A float representing the y-position of the shape

Total images: 737,280

Classes: 3 (square, ellipse, heart)

Splits:

  • Train: 70% of total dataset

  • Test: 30% of total dataset

Image specs: PNG format, 64×64 pixels, grayscale

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("../../aidatasets/images/dsprites.py", split="train", trust_remote_code=True)
# dataset = load_dataset("../../aidatasets/images/dsprites.py", split="test", trust_remote_code=True)  

# Access a sample from the dataset  
example = dataset[0]  
image = example["image"]  
shape = example["shape"]  

image.show()  # Display the image  
print(f"Shape: {shape}")

Citation

BibTeX:

@misc{matthey2017dsprites, title={dsprites: Disentanglement testing sprites dataset}, author={Matthey, Loic and Higgins, Irina and Hassabis, Demis and Lerchner, Alexander}, year={2017} }

Downloads last month
12