# celeb_a_hq

<br />

> [!WARNING]
> **Warning:** Manual download required. See instructions below.

- **Description**:

High-quality version of the CELEBA dataset, consisting of 30000 images in 1024 x
1024 resolution.

> [!NOTE]
> **Note:** CelebAHQ dataset may contain potential bias. The fairness indicators [example](https://www.tensorflow.org/responsible_ai/fairness_indicators/tutorials/Fairness_Indicators_TFCO_CelebA_Case_Study) goes into detail about several considerations to keep in mind while using the CelebAHQ dataset.

> [!WARNING]
> **Warning:** This dataset currently requires you to prepare images on your own.

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

- **Homepage** :
  <https://github.com/tkarras/progressive_growing_of_gans>

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

- **Versions**:

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

- **Manual download instructions** : This dataset requires you to
  download the source data manually into `download_config.manual_dir`
  (defaults to `~/tensorflow_datasets/downloads/manual/`):  

  manual_dir should contain multiple tar files with images (data2x2.tar,
  data4x4.tar .. data1024x1024.tar).
  Detailed instructions are here:
  <https://github.com/tkarras/progressive_growing_of_gans#preparing-datasets-for-training>

- **Splits**:

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

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

- **Citation**:

    @article{DBLP:journals/corr/abs-1710-10196,
      author    = {Tero Karras and
                   Timo Aila and
                   Samuli Laine and
                   Jaakko Lehtinen},
      title     = {Progressive Growing of GANs for Improved Quality, Stability, and Variation},
      journal   = {CoRR},
      volume    = {abs/1710.10196},
      year      = {2017},
      url       = {http://arxiv.org/abs/1710.10196},
      archivePrefix = {arXiv},
      eprint    = {1710.10196},
      timestamp = {Mon, 13 Aug 2018 16:46:42 +0200},
      biburl    = {https://dblp.org/rec/bib/journals/corr/abs-1710-10196},
      bibsource = {dblp computer science bibliography, https://dblp.org}
    }

## celeb_a_hq/1024 (default config)

- **Config description**: CelebaHQ images in 1024 x 1024 resolution

- **Dataset size** : `54.04 GiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(1024, 1024, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (1024, 1024, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-1024-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/512

- **Config description**: CelebaHQ images in 512 x 512 resolution

- **Dataset size** : `15.33 GiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(512, 512, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (512, 512, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-512-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/256

- **Config description**: CelebaHQ images in 256 x 256 resolution

- **Dataset size** : `4.21 GiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(256, 256, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (256, 256, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-256-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/128

- **Config description**: CelebaHQ images in 128 x 128 resolution

- **Dataset size** : `1.13 GiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(128, 128, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (128, 128, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-128-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/64

- **Config description**: CelebaHQ images in 64 x 64 resolution

- **Dataset size** : `310.94 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(64, 64, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (64, 64, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-64-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/32

- **Config description**: CelebaHQ images in 32 x 32 resolution

- **Dataset size** : `85.39 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(32, 32, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (32, 32, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-32-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/16

- **Config description**: CelebaHQ images in 16 x 16 resolution

- **Dataset size** : `25.71 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(16, 16, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (16, 16, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-16-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/8

- **Config description**: CelebaHQ images in 8 x 8 resolution

- **Dataset size** : `9.42 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(8, 8, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (8, 8, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-8-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/4

- **Config description**: CelebaHQ images in 4 x 4 resolution

- **Dataset size** : `5.10 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(4, 4, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (4, 4, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-4-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/2

- **Config description**: CelebaHQ images in 2 x 2 resolution

- **Dataset size** : `3.94 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(2, 2, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (2, 2, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-2-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>

## celeb_a_hq/1

- **Config description**: CelebaHQ images in 1 x 1 resolution

- **Dataset size** : `3.62 MiB`

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

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(1, 1, 3), dtype=uint8),
        'image/filename': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (1, 1, 3) | uint8 |   |
| image/filename | Text |   | string |   |

- **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/celeb_a_hq-1-2.0.0.png)

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

<button id="displaydataframe">Display examples...</button>