<br />

- **Description**:

3dshapes is a dataset of 3D shapes procedurally generated from 6 ground truth
independent latent factors. These factors are *floor colour* , *wall colour* ,
*object colour* , *scale* , *shape* and *orientation*.

All possible combinations of these latents are present exactly once, generating
N = 480000 total images.

### Latent factor values

- floor hue: 10 values linearly spaced in \[0, 1\]
- wall hue: 10 values linearly spaced in \[0, 1\]
- object hue: 10 values linearly spaced in \[0, 1\]
- scale: 8 values linearly spaced in \[0, 1\]
- shape: 4 values in \[0, 1, 2, 3\]
- orientation: 15 values linearly spaced in \[-30, 30\]

We varied one latent at a time (starting from orientation, then shape, etc), and
sequentially stored the images in fixed order in the `images` array. The
corresponding values of the factors are stored in the same order in the `labels`
array.

- **Additional Documentation** :
  [Explore on Papers With Code](https://paperswithcode.com/dataset/3d-shapes-dataset)

- **Homepage** :
  <https://github.com/deepmind/3d-shapes>

- **Source code** :
  [`tfds.datasets.shapes3d.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/shapes3d/shapes3d_dataset_builder.py)

- **Versions**:

  - **`2.0.0`** (default): New split API (<https://tensorflow.org/datasets/splits>)
- **Download size** : `255.18 MiB`

- **Dataset size** : `1.68 GiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  No

- **Splits**:

| Split | Examples |
|---|---|
| `'train'` | 480,000 |

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(64, 64, 3), dtype=uint8),
        'label_floor_hue': ClassLabel(shape=(), dtype=int64, num_classes=10),
        'label_object_hue': ClassLabel(shape=(), dtype=int64, num_classes=10),
        'label_orientation': ClassLabel(shape=(), dtype=int64, num_classes=15),
        'label_scale': ClassLabel(shape=(), dtype=int64, num_classes=8),
        'label_shape': ClassLabel(shape=(), dtype=int64, num_classes=4),
        'label_wall_hue': ClassLabel(shape=(), dtype=int64, num_classes=10),
        'value_floor_hue': float32,
        'value_object_hue': float32,
        'value_orientation': float32,
        'value_scale': float32,
        'value_shape': float32,
        'value_wall_hue': float32,
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (64, 64, 3) | uint8 |   |
| label_floor_hue | ClassLabel |   | int64 |   |
| label_object_hue | ClassLabel |   | int64 |   |
| label_orientation | ClassLabel |   | int64 |   |
| label_scale | ClassLabel |   | int64 |   |
| label_shape | ClassLabel |   | int64 |   |
| label_wall_hue | ClassLabel |   | int64 |   |
| value_floor_hue | Tensor |   | float32 |   |
| value_object_hue | Tensor |   | float32 |   |
| value_orientation | Tensor |   | float32 |   |
| value_scale | Tensor |   | float32 |   |
| value_shape | Tensor |   | float32 |   |
| value_wall_hue | Tensor |   | float32 |   |

- **Supervised keys** (See
  [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):
  `None`

- **Figure**
  ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):

![Visualization](https://storage.googleapis.com/tfds-data/visualization/fig/shapes3d-2.0.0.png)

- **Examples** ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):

<iframe src="https:///frame/datasets/catalog/shapes3d_9e26808b5b0306caecbc214e90dba268dba97e1a8aad080124809fab01fdbca6.frame" class="framebox inherit-locale " allow="clipboard-write https://" allowfullscreen is-upgraded></iframe>

- **Citation**:

    @misc{3dshapes18,
      title={3D Shapes Dataset},
      author={Burgess, Chris and Kim, Hyunjik},
      howpublished={https://github.com/deepmind/3dshapes-dataset/},
      year={2018}
    }