# geirhos_conflict_stimuli

<br />

- **Description**:

Shape/texture conflict stimuli from "ImageNet-trained CNNs are biased towards
texture; increasing shape bias improves accuracy and robustness."

Note that, although the dataset source contains images with matching shape and
texture and we include them here, they are ignored for most evaluations in the
original paper.

- **Homepage** :
  <https://github.com/rgeirhos/texture-vs-shape>

- **Source code** :
  [`tfds.image_classification.GeirhosConflictStimuli`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/image_classification/geirhos_conflict_stimuli.py)

- **Versions**:

  - **`1.0.0`** (default): No release notes.
- **Download size** : `153.96 MiB`

- **Dataset size** : `130.44 MiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  Only when `shuffle_files=False` (test)

- **Splits**:

| Split | Examples |
|---|---|
| `'test'` | 1,280 |

- **Feature structure**:

    FeaturesDict({
        'file_name': Text(shape=(), dtype=string),
        'image': Image(shape=(None, None, 3), dtype=uint8),
        'shape_imagenet_labels': Sequence(ClassLabel(shape=(), dtype=int64, num_classes=1000)),
        'shape_label': ClassLabel(shape=(), dtype=int64, num_classes=16),
        'texture_imagenet_labels': Sequence(ClassLabel(shape=(), dtype=int64, num_classes=1000)),
        'texture_label': ClassLabel(shape=(), dtype=int64, num_classes=16),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| file_name | Text |   | string |   |
| image | Image | (None, None, 3) | uint8 |   |
| shape_imagenet_labels | Sequence(ClassLabel) | (None,) | int64 |   |
| shape_label | ClassLabel |   | int64 |   |
| texture_imagenet_labels | Sequence(ClassLabel) | (None,) | int64 |   |
| texture_label | ClassLabel |   | int64 |   |

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

- **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/geirhos_conflict_stimuli-1.0.0.png)

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

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

- **Citation**:

    @inproceedings{
      geirhos2018imagenettrained,
      title={ImageNet-trained {CNN}s are biased towards texture; increasing shape
             bias improves accuracy and robustness.},
      author={Robert Geirhos and Patricia Rubisch and Claudio Michaelis and
              Matthias Bethge and Felix A. Wichmann and Wieland Brendel},
      booktitle={International Conference on Learning Representations},
      year={2019},
      url={https://openreview.net/forum?id=Bygh9j09KX},
    }