<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/visualization/image_visualizer.py#L83-L168) |

Visualizer for supervised image datasets.

Inherits From: [`Visualizer`](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/Visualizer)

## Methods

### `match`

[View source](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/visualization/image_visualizer.py#L86-L90)

    match(
        ds_info: dataset_info.DatasetInfo
    ) -> bool

See base class.

### `show`

[View source](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/visualization/image_visualizer.py#L92-L168)

    show(
        ds: tf.data.Dataset,
        ds_info: dataset_info.DatasetInfo,
        rows: int = 3,
        cols: int = 3,
        plot_scale: float = 3.0,
        image_key: Optional[str] = None,
        label_key: Optional[str] = None
    )

Display the dataset.

<br />

<br />

<br />

| Args ||
|---|---|
| `ds` | [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset). The tf.data.Dataset object to visualize. Examples should not be batched. Examples will be consumed in order until (rows \* cols) are read or the dataset is consumed. |
| `ds_info` | [`tfds.core.DatasetInfo`](https://www.tensorflow.org/datasets/api_docs/python/tfds/core/DatasetInfo) object of the dataset to visualize. |
| `rows` | `int`, number of rows of the display grid. |
| `cols` | `int`, number of columns of the display grid. |
| `plot_scale` | `float`, controls the plot size of the images. Keep this value around 3 to get a good plot. High and low values may cause the labels to get overlapped. |
| `image_key` | `string`, name of the feature that contains the image. If not set, the system will try to auto-detect it. |
| `label_key` | `string`, name of the feature that contains the label. If not set, the system will try to auto-detect it. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| `fig` | The pyplot figure. |

<br />