# imagenet_resized

<br />

- **Description**:

This dataset consists of the ImageNet dataset resized to fixed size. The images
here are the ones provided by Chrabaszcz et. al. using the box resize method.

For [downsampled ImageNet](http://image-net.org/download.php) for unsupervised
learning see `downsampled_imagenet`.

> [!WARNING]
> **Warning:** The integer labels used are defined by the authors and do not match those from the other ImageNet datasets provided by Tensorflow datasets. See the original [label list](https://github.com/PatrykChrabaszcz/Imagenet32_Scripts/blob/master/map_clsloc.txt), and the [labels used by this dataset](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image_classification/imagenet_resized_labels.txt). Additionally, the original authors 1 index there labels which we convert to 0 indexed by subtracting one.

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

- **Homepage** :
  <https://patrykchrabaszcz.github.io/Imagenet32/>

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

- **Versions**:

  - **`0.1.0`** (default): Imagenet Resized Datset
  - `0.1.1`: Webisite URL update
- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  No

- **Splits**:

| Split | Examples |
|---|---|
| `'train'` | 1,281,167 |
| `'validation'` | 50,000 |

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

- **Citation**:

    @article{chrabaszcz2017downsampled,
      title={A downsampled variant of imagenet as an alternative to the cifar datasets},
      author={Chrabaszcz, Patryk and Loshchilov, Ilya and Hutter, Frank},
      journal={arXiv preprint arXiv:1707.08819},
      year={2017}
    }

## imagenet_resized/8x8 (default config)

- **Config description**: Images resized to 8x8

- **Download size** : `237.11 MiB`

- **Dataset size** : `378.49 MiB`

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(8, 8, 3), dtype=uint8),
        'label': ClassLabel(shape=(), dtype=int64, num_classes=1000),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (8, 8, 3) | uint8 |   |
| label | ClassLabel |   | int64 |   |

- **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/imagenet_resized-8x8-0.1.0.png)

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

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

## imagenet_resized/16x16

- **Config description**: Images resized to 16x16

- **Download size** : `923.34 MiB`

- **Dataset size** : `955.67 MiB`

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(16, 16, 3), dtype=uint8),
        'label': ClassLabel(shape=(), dtype=int64, num_classes=1000),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (16, 16, 3) | uint8 |   |
| label | ClassLabel |   | int64 |   |

- **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/imagenet_resized-16x16-0.1.0.png)

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

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

## imagenet_resized/32x32

- **Config description**: Images resized to 32x32

- **Download size** : `3.46 GiB`

- **Dataset size** : `2.93 GiB`

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(32, 32, 3), dtype=uint8),
        'label': ClassLabel(shape=(), dtype=int64, num_classes=1000),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (32, 32, 3) | uint8 |   |
| label | ClassLabel |   | int64 |   |

- **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/imagenet_resized-32x32-0.1.0.png)

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

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

## imagenet_resized/64x64

- **Config description**: Images resized to 64x64

- **Download size** : `13.13 GiB`

- **Dataset size** : `10.29 GiB`

- **Feature structure**:

    FeaturesDict({
        'image': Image(shape=(64, 64, 3), dtype=uint8),
        'label': ClassLabel(shape=(), dtype=int64, num_classes=1000),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| image | Image | (64, 64, 3) | uint8 |   |
| label | ClassLabel |   | int64 |   |

- **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/imagenet_resized-64x64-0.1.0.png)

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

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