<!-- # hard line break macro for HTML -->

<a id="dataset-zoo-overview"></a>

# Dataset Zoo Overview

The FiftyOne Dataset Zoo provides a powerful interface for downloading datasets
and loading them into FiftyOne.

It provides native access to dozens of popular benchmark datasets, and it also
supports downloading arbitrary public or private datasets whose
download/preparation methods are provided via GitHub repositories or URLs.

## Basic recipe

Methods for working with the Dataset Zoo are conveniently exposed via the
Python library and the CLI. The basic recipe for loading a zoo dataset and
visualizing it in the App is shown below.

Python

CLI

Use [`load_zoo_dataset()`](../api/fiftyone.zoo.datasets.md#fiftyone.zoo.datasets.load_zoo_dataset) to
load a zoo dataset into a FiftyOne dataset.

For example, the code sample below loads the validation split of
[COCO-2017](datasets/coco_2017.md#dataset-zoo-coco-2017) from the zoo and visualizes it in
the FiftyOne App:

```python
import fiftyone as fo
import fiftyone.zoo as foz

# List available zoo datasets
print(foz.list_zoo_datasets())

# Download the COCO-2017 validation split and load it into FiftyOne
dataset = foz.load_zoo_dataset("coco-2017", split="validation")

# Give the dataset a new name, and make it persistent
dataset.name = "coco-2017-validation-example"
dataset.persistent = True

# Visualize it in the App
session = fo.launch_app(dataset)
```

Use [fiftyone zoo datasets load](../cli/index.md#cli-fiftyone-zoo-datasets-load) to
load a zoo dataset into a FiftyOne dataset.

For example, the code sample below loads the validation split of
[COCO-2017](datasets/coco_2017.md#dataset-zoo-coco-2017) from the zoo and visualizes it in
the FiftyOne App:

```shell
# List available zoo datasets
fiftyone zoo datasets list

# Download the COCO-2017 validation split and load it into FiftyOne
fiftyone zoo datasets load coco-2017 --split validation \
    --dataset-name coco-2017-validation-example

# Visualize it in the App
fiftyone app launch coco-2017-validation-example
```

![Dataset Zoo](images/dataset_zoo_coco_2017.png)

#### NOTE
Some datasets are loaded via the
[TorchVision Datasets](https://pytorch.org/vision/stable/datasets.html)
or [TensorFlow Datasets](https://www.tensorflow.org/datasets) packages
under the hood.

If you do not have a [suitable package](api.md#dataset-zoo-ml-backend)
installed when attempting to download a zoo dataset, you’ll see an error
message that will help you install one.

## Built-in datasets

The Dataset Zoo provides built-in access to dozens of datasets that you can
load into FiftyOne with a single command.

<div style="margin:0; display:inline-block;">
    <a href="index.html" class="sd-btn sd-btn-primary book-a-demo" rel="noopener noreferrer" data-cta-dynamic="true">
        <div class="arrow">
            <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="size-3">
            <path stroke="currentColor" stroke-width="1.5"
                    d="M1.458 11.995h20.125M11.52 22.063 21.584 12 11.521 1.937"
                    vector-effect="non-scaling-stroke"></path>
            </svg>  
        </div>
        <div class="text">Explore the datasets in the zoo</div>
    </a>
</div>

## Remotely-sourced datasets

The Dataset Zoo also supports loading datasets whose download/preparation
methods are provided via GitHub repositories or URLs.

<div style="margin:0; display:inline-block;">
    <a href="remote.html" class="sd-btn sd-btn-primary book-a-demo" rel="noopener noreferrer" data-cta-dynamic="true">
        <div class="arrow">
            <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="size-3">
            <path stroke="currentColor" stroke-width="1.5"
                    d="M1.458 11.995h20.125M11.52 22.063 21.584 12 11.521 1.937"
                    vector-effect="non-scaling-stroke"></path>
            </svg>  
        </div>
        <div class="text">Learn how to download remote datasets</div>
    </a>
</div>

## API reference

The Dataset Zoo can be accessed via the Python library and the CLI. Consult the
API reference below to see how to download, load, and manage zoo datasets.

<div style="margin:0; display:inline-block;">
    <a href="api.html" class="sd-btn sd-btn-primary book-a-demo" rel="noopener noreferrer" data-cta-dynamic="true">
        <div class="arrow">
            <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="size-3">
            <path stroke="currentColor" stroke-width="1.5"
                    d="M1.458 11.995h20.125M11.52 22.063 21.584 12 11.521 1.937"
                    vector-effect="non-scaling-stroke"></path>
            </svg>  
        </div>
        <div class="text">Check out the API reference</div>
    </a>
</div>
