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

<a id="fiftyone-cli"></a>

# FiftyOne Command-Line Interface (CLI)

Installing FiftyOne automatically installs `fiftyone`, a command-line interface
(CLI) for interacting with FiftyOne. This utility provides access to many
useful features, including creating and inspecting datasets, visualizing
datasets in the App, exporting datasets and converting dataset formats,
and downloading datasets from the FiftyOne Dataset Zoo.

<a id="cli-quickstart"></a>

## Quickstart

To see the available top-level commands, type:

```text
fiftyone --help
```

You can learn more about any available subcommand via:

```text
fiftyone <command> --help
```

For example, to see your current FiftyOne config, you can execute
`fiftyone config`.

### Tab completion

To enable tab completion in `bash`, add the following line to your `~/.bashrc`:

```shell
eval "$(register-python-argcomplete fiftyone)"
```

To enable tab completion in `zsh`, add these lines to your `~/.zshrc`:

```shell
autoload bashcompinit
bashcompinit
eval "$(register-python-argcomplete fiftyone)"
```

To enable tab completion in `tcsh`, add these lines to your `~/.tcshrc`:

```shell
eval `register-python-argcomplete --shell tcsh fiftyone`
```

<a id="cli-fiftyone-main"></a>

## FiftyOne CLI

The FiftyOne command-line interface.

```text
fiftyone [-h] [-v] [--all-help]
         {quickstart,annotation,brain,evaluation,app,config,constants,convert,datasets,migrate,operators,skills,delegated,plugins,utils,zoo,labs}
         ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show version info
  --all-help            show help recursively and exit

available commands:
  {quickstart,annotation,brain,evaluation,app,config,constants,convert,datasets,migrate,operators,skills,delegated,plugins,utils,zoo,labs}

    quickstart          Launch a FiftyOne quickstart.
    annotation          Tools for working with the FiftyOne annotation API.
    brain               Tools for working with the FiftyOne Brain.
    evaluation          Tools for working with the FiftyOne evaluation API.
    app                 Tools for working with the FiftyOne App.
    config              Tools for working with your FiftyOne config.
    constants           Print constants from `fiftyone.constants`.
    convert             Convert datasets on disk between supported formats.
    datasets            Tools for working with FiftyOne datasets.
    migrate             Tools for migrating the FiftyOne database.
    operators           Tools for working with FiftyOne operators and panels.
    skills              Tools for working with FiftyOne skills.
    delegated           Tools for working with FiftyOne delegated operations.
    plugins             Tools for working with FiftyOne plugins.
    utils               FiftyOne utilities.
    zoo                 Tools for working with the FiftyOne Zoo.
    labs                Tools for working with FiftyOne Labs.
```

<a id="cli-fiftyone-quickstart"></a>

## FiftyOne quickstart


<div class="available-in">
    <div class="available-in-row">
        <span class="available-in-label">Available in:</span>
        <span class="available-in-pill available-in-pill--oss">Open Source</span><span class="available-in-pill available-in-pill--enterprise">Enterprise</span>
    </div>
    <div class="available-in-row">
        <span class="available-in-versions">Introduced in <a href="../release-notes.html#fiftyone-0-5-2">FiftyOne 0.5.2</a> &middot; <a href="../release-notes.html#fiftyone-enterprise-1-0">FiftyOne Enterprise 1.0</a></span>
    </div>
    
</div>

Launch a FiftyOne quickstart.

```text
fiftyone quickstart [-h] [-v] [-p PORT] [-A ADDRESS] [-r] [-a] [-w WAIT]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -v, --video           launch the quickstart with a video dataset
  -p PORT, --port PORT  the port number to use
  -A ADDRESS, --address ADDRESS
                        the address (server name) to use
  -r, --remote          whether to launch a remote App session
  -w WAIT, --wait WAIT  the number of seconds to wait for a new App
                        connection before returning if all connections are
                        lost. If negative, the process will wait forever,
                        regardless of connections
```

**Examples**

```shell
# Launch the quickstart
fiftyone quickstart
```

```shell
# Launch the quickstart with a video dataset
fiftyone quickstart --video
```

```shell
# Launch the quickstart as a remote session
fiftyone quickstart --remote
```

<a id="cli-fiftyone-config"></a>

## FiftyOne config

Tools for working with your FiftyOne config.

```text
fiftyone config [-h] [-l] [FIELD]
```

**Arguments**

```text
positional arguments:
  FIELD         a config field to print

optional arguments:
  -h, --help    show this help message and exit
  -l, --locate  print the location of your config on disk
```

**Examples**

```shell
# Print your entire config
fiftyone config
```

```shell
# Print a specific config field
fiftyone config <field>
```

```shell
# Print the location of your config on disk (if one exists)
fiftyone config --locate
```

<a id="cli-fiftyone-constants"></a>

## Print constants

Print constants from `fiftyone.constants`.

```text
fiftyone constants [-h] [CONSTANT]
```

**Arguments**

```text
positional arguments:
  CONSTANT    the constant to print

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Print all constants
fiftyone constants
```

```shell
# Print a specific constant
fiftyone constants <CONSTANT>
```

<a id="cli-fiftyone-convert"></a>

## Convert dataset formats

Convert datasets on disk between supported formats.

```text
fiftyone convert [-h] --input-type INPUT_TYPE --output-type OUTPUT_TYPE
                 [--input-dir INPUT_DIR]
                 [--input-kwargs KEY=VAL [KEY=VAL ...]]
                 [--output-dir OUTPUT_DIR]
                 [--output-kwargs KEY=VAL [KEY=VAL ...]] [-o]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --input-dir INPUT_DIR
                        the directory containing the dataset
  --input-kwargs KEY=VAL [KEY=VAL ...]
                        additional keyword arguments for
                        `fiftyone.utils.data.convert_dataset(..., input_kwargs=)`
  --output-dir OUTPUT_DIR
                        the directory to which to write the output dataset
  --output-kwargs KEY=VAL [KEY=VAL ...]
                        additional keyword arguments for
                        `fiftyone.utils.data.convert_dataset(..., output_kwargs=)`
  -o, --overwrite       whether to overwrite an existing output directory

required arguments:
  --input-type INPUT_TYPE
                        the fiftyone.types.Dataset type of the input dataset
  --output-type OUTPUT_TYPE
                        the fiftyone.types.Dataset type to output
```

**Examples**

```shell
# Convert an image classification directory tree to TFRecords format
fiftyone convert \
    --input-dir /path/to/image-classification-directory-tree \
    --input-type fiftyone.types.ImageClassificationDirectoryTree \
    --output-dir /path/for/tf-image-classification-dataset \
    --output-type fiftyone.types.TFImageClassificationDataset
```

```shell
# Convert a COCO detection dataset to CVAT image format
fiftyone convert \
    --input-dir /path/to/coco-detection-dataset \
    --input-type fiftyone.types.COCODetectionDataset \
    --output-dir /path/for/cvat-image-dataset \
    --output-type fiftyone.types.CVATImageDataset
```

```shell
# Perform a customized conversion via optional kwargs
fiftyone convert \
    --input-dir /path/to/coco-detection-dataset \
    --input-type fiftyone.types.COCODetectionDataset \
    --input-kwargs max_samples=100 shuffle=True \
    --output-dir /path/for/cvat-image-dataset \
    --output-type fiftyone.types.TFObjectDetectionDataset \
    --output-kwargs force_rgb=True \
    --overwrite
```

<a id="cli-fiftyone-datasets"></a>

## FiftyOne datasets

Tools for working with FiftyOne datasets.

```text
fiftyone datasets [-h] [--all-help]
                  {list,info,create,head,tail,stream,export,delete} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {list,info,create,head,tail,stream,export,delete}
    list                List FiftyOne datasets.
    info                Print information about FiftyOne datasets.
    stats               Print stats about FiftyOne datasets on disk.
    create              Tools for creating FiftyOne datasets.
    head                Prints the first few samples in a FiftyOne dataset.
    tail                Prints the last few samples in a FiftyOne dataset.
    stream              Streams the samples in a FiftyOne dataset.
    export              Export FiftyOne datasets to disk in supported formats.
    draw                Writes annotated versions of samples in FiftyOne datasets to disk.
    rename              Rename FiftyOne datasets.
    delete              Delete FiftyOne datasets.
```

<a id="cli-fiftyone-datasets-list"></a>

### List datasets

List FiftyOne datasets.

```text
fiftyone datasets list [-h] [-p PATT] [-t TAG [TAG ...]]
```

**Arguments**

```text
optional arguments:
  -h, --help        show this help message and exit
  -p PATT, --glob-patt PATT
                    an optional glob pattern of dataset names to include
  -t TAG [TAG ...], --tags TAG [TAG ...]
                    only show datasets with the given tag(s)
```

**Examples**

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

```shell
# List datasets matching a given pattern
fiftyone datasets list --glob-patt 'quickstart-*'
```

```shell
# List datasets with the given tag(s)
fiftyone datasets list --tags automotive healthcare
```

<a id="cli-fiftyone-datasets-info"></a>

### Print dataset information

Print information about FiftyOne datasets.

```text
fiftyone datasets info [-h] [-p PATT] [-t TAG [TAG ...]] [-s FIELD] [-r] [NAME]
```

**Arguments**

```text
positional arguments:
  NAME                  the name of a dataset

optional arguments:
  -h, --help            show this help message and exit
  -p PATT, --glob-patt PATT
                        an optional glob pattern of dataset names to include
  -t TAG [TAG ...], --tags TAG [TAG ...]
                        only show datasets with the given tag(s)
  -s FIELD, --sort-by FIELD
                        a field to sort the dataset rows by
  -r, --reverse         whether to print the results in reverse order
```

**Examples**

```shell
# Print basic information about multiple datasets
fiftyone datasets info
fiftyone datasets info --glob-patt 'quickstart-*'
fiftyone datasets info --tags automotive healthcare
fiftyone datasets info --sort-by created_at
fiftyone datasets info --sort-by name --reverse
```

```shell
# Print information about a specific dataset
fiftyone datasets info <name>
```

<a id="cli-fiftyone-datasets-stats"></a>

### Print dataset stats


<div class="available-in">
    <div class="available-in-row">
        <span class="available-in-label">Available in:</span>
        <span class="available-in-pill available-in-pill--oss">Open Source</span><span class="available-in-pill available-in-pill--enterprise">Enterprise</span>
    </div>
    <div class="available-in-row">
        <span class="available-in-versions">Introduced in <a href="../release-notes.html#fiftyone-0-7-4">FiftyOne 0.7.4</a> &middot; <a href="../release-notes.html#fiftyone-enterprise-1-0">FiftyOne Enterprise 1.0</a></span>
    </div>
    
</div>

Print stats about FiftyOne datasets on disk.

```text
fiftyone datasets stats [-h] [-m] [-c] NAME
```

**Arguments**

```text
positional arguments:
  NAME                 the name of the dataset

optional arguments:
  -h, --help           show this help message and exit
  -m, --include-media  whether to include stats about the size of the raw
                       media in the dataset
  -c, --compressed     whether to return the sizes of collections in their
                       compressed form on disk
```

**Examples**

```shell
# Print stats about the given dataset on disk
fiftyone datasets stats <name>
```

<a id="cli-fiftyone-datasets-create"></a>

### Create datasets

Tools for creating FiftyOne datasets.

```text
fiftyone datasets create [-h] [-n NAME] [-d DATASET_DIR] [-j JSON_PATH]
                         [-t TYPE] [-k KEY=VAL [KEY=VAL ...]]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  a name for the dataset
  -d DATASET_DIR, --dataset-dir DATASET_DIR
                        the directory containing the dataset
  -j JSON_PATH, --json-path JSON_PATH
                        the path to a samples JSON file to load
  -t TYPE, --type TYPE  the fiftyone.types.Dataset type of the dataset
  -k KEY=VAL [KEY=VAL ...], --kwargs KEY=VAL [KEY=VAL ...]
                        additional type-specific keyword arguments for
                        `fiftyone.core.dataset.Dataset.from_dir()`
```

**Examples**

```shell
# Create a dataset from the given data on disk
fiftyone datasets create \
    --name <name> --dataset-dir <dataset-dir> --type <type>
```

```shell
# Create a dataset from a random subset of the data on disk
fiftyone datasets create \
    --name <name> --dataset-dir <dataset-dir> --type <type> \
    --kwargs max_samples=50 shuffle=True
```

```shell
# Create a dataset from the given samples JSON file
fiftyone datasets create --json-path <json-path>
```

<a id="cli-fiftyone-datasets-head"></a>

### Print dataset head

Prints the first few samples in a FiftyOne dataset.

```text
fiftyone datasets head [-h] [-n NUM_SAMPLES] NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -n NUM_SAMPLES, --num-samples NUM_SAMPLES
                        the number of samples to print
```

**Examples**

```shell
# Prints the first few samples in a dataset
fiftyone datasets head <name>
```

```shell
# Prints the given number of samples from the head of a dataset
fiftyone datasets head <name> --num-samples <num-samples>
```

<a id="cli-fiftyone-datasets-tail"></a>

### Print dataset tail

Prints the last few samples in a FiftyOne dataset.

```text
fiftyone datasets tail [-h] [-n NUM_SAMPLES] NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -n NUM_SAMPLES, --num-samples NUM_SAMPLES
                        the number of samples to print
```

**Examples**

```shell
# Print the last few samples in a dataset
fiftyone datasets tail <name>
```

```shell
# Print the given number of samples from the tail of a dataset
fiftyone datasets tail <name> --num-samples <num-samples>
```

<a id="cli-fiftyone-datasets-stream"></a>

### Stream samples to the terminal

Stream samples in a FiftyOne dataset to the terminal.

```text
fiftyone datasets stream [-h] NAME
```

**Arguments**

```text
positional arguments:
  NAME        the name of the dataset

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Stream the samples of the dataset to the terminal
fiftyone datasets stream <name>
```

<a id="cli-fiftyone-datasets-export"></a>

### Export datasets

Export FiftyOne datasets to disk in supported formats.

```text
fiftyone datasets export [-h] [-d EXPORT_DIR] [-j JSON_PATH]
                         [-f LABEL_FIELD] [-t TYPE]
                         [--filters KEY=VAL [KEY=VAL ...]]
                         [-k KEY=VAL [KEY=VAL ...]]
                         NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the dataset to export

optional arguments:
  -h, --help            show this help message and exit
  -d EXPORT_DIR, --export-dir EXPORT_DIR
                        the directory in which to export the dataset
  -j JSON_PATH, --json-path JSON_PATH
                        the path to export the dataset in JSON format
  -f LABEL_FIELD, --label-field LABEL_FIELD
                        the name of the label field to export
  -t TYPE, --type TYPE  the fiftyone.types.Dataset type in which to export
  --filters KEY=VAL [KEY=VAL ...]
                        specific sample tags or class labels to export. To
                        use sample tags, pass tags as `tags=train,val` and
                        to use label filters, pass label field and values
                        as in ground_truth=car,person,dog
  -k KEY=VAL [KEY=VAL ...], --kwargs KEY=VAL [KEY=VAL ...]
                        additional type-specific keyword arguments for
                        `fiftyone.core.collections.SampleCollection.export()`
```

**Examples**

```shell
# Export the dataset to disk in the specified format
fiftyone datasets export <name> \
    --export-dir <export-dir> --type <type> --label-field <label-field>
```

```shell
# Export the dataset to disk in JSON format
fiftyone datasets export <name> --json-path <json-path>
```

```shell
# Only export cats and dogs from the validation split
fiftyone datasets export <name> \\
    --filters tags=validation ground_truth=cat,dog \\
    --export-dir <export-dir> --type <type> --label-field ground_truth
```

```shell
# Perform a customized export of a dataset
fiftyone datasets export <name> \
    --type <type> \
    --kwargs labels_path=/path/for/labels.json
```

<a id="cli-fiftyone-datasets-draw"></a>

### Drawing labels on samples

Renders annotated versions of samples in FiftyOne datasets to disk.

```text
fiftyone datasets draw [-h] [-d OUTPUT_DIR] [-f LABEL_FIELDS] NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -d OUTPUT_DIR, --output-dir OUTPUT_DIR
                        the directory to write the annotated media
  -f LABEL_FIELDS, --label-fields LABEL_FIELDS
                        a comma-separated list of label fields to export
```

**Examples**

```shell
# Write annotated versions of the media in the dataset with the
# specified label field(s) overlaid to disk
fiftyone datasets draw <name> \
    --output-dir <output-dir> --label-fields <list>,<of>,<fields>
```

<a id="cli-fiftyone-datasets-rename"></a>

### Rename datasets

Rename FiftyOne datasets.

```text
fiftyone datasets rename [-h] NAME NEW_NAME
```

**Arguments**

```text
positional arguments:
  NAME        the name of the dataset
  NEW_NAME    a new name for the dataset

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Rename the dataset
fiftyone datasets rename <old-name> <new-name>
```

<a id="cli-fiftyone-datasets-delete"></a>

### Delete datasets

Delete FiftyOne datasets.

```text
fiftyone datasets delete [-h] [-g GLOB_PATT] [--non-persistent]
                         [NAME [NAME ...]]
```

**Arguments**

```text
positional arguments:
  NAME                  the dataset name(s) to delete

optional arguments:
  -h, --help            show this help message and exit
  -g GLOB_PATT, --glob-patt GLOB_PATT
                        a glob pattern of datasets to delete
  --non-persistent      delete all non-persistent datasets
```

**Examples**

```shell
# Delete the datasets with the given name(s)
fiftyone datasets delete <name1> <name2> ...
```

```shell
# Delete the datasets whose names match the given glob pattern
fiftyone datasets delete --glob-patt <glob-patt>
```

```shell
# Delete all non-persistent datasets
fiftyone datasets delete --non-persistent
```

<a id="cli-fiftyone-migrate"></a>

## FiftyOne migrations

Tools for migrating the FiftyOne database.

See [this page](../user_guide/config.md#database-migrations) for more information about migrating
FiftyOne deployments.

```text
fiftyone migrate [-h] [-i] [-a]
                 [-v VERSION]
                 [-n DATASET_NAME [DATASET_NAME ...]]
                 [--error-level LEVEL]
                 [--verbose]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -i, --info            whether to print info about the current revisions
  -a, --all             whether to migrate the database and all datasets
  -v VERSION, --version VERSION
                        the revision to migrate to
  -n DATASET_NAME [DATASET_NAME ...], --dataset-name DATASET_NAME [DATASET_NAME ...]
                        the name of a specific dataset to migrate
  --error-level LEVEL   the error level (0=error, 1=warn, 2=ignore) to use
                        when migrating individual datasets
  --verbose             whether to log incremental migrations that are performed
```

**Examples**

```shell
# Print information about the current revisions of all datasets
fiftyone migrate --info
```

```shell
# Migrate the database and all datasets to the current client version
fiftyone migrate --all
```

```shell
# Migrate to a specific revision
fiftyone migrate --all --version <VERSION>
```

```shell
# Migrate a specific dataset
fiftyone migrate ... --dataset-name <DATASET_NAME>
```

```shell
# Update the database version without migrating any existing datasets
fiftyone migrate
```

<a id="cli-fiftyone-operators"></a>

## FiftyOne operators

Tools for working with FiftyOne operators and panels.

```text
fiftyone operators [-h] [--all-help] {list,info} ...
```

**Arguments**

```text
optional arguments:
  -h, --help   show this help message and exit
  --all-help   show help recursively and exit

available commands:
  {list,info}
    list       List operators and panels that are installed locally.
    info       Prints information about operators and panels that are installed locally.
```

<a id="cli-fiftyone-operators-list"></a>

### List operators

List operators and panels that are installed locally.

```text
fiftyone operators list [-h] [-g PATT] [-e] [-d] [-b] [-c] [-o] [-p] [-n] [-u]
```

**Arguments**

```text
optional arguments:
  -h, --help              show this help message and exit
  -g PATT, --glob-patt PATT
                          only show operators whose URI matches the glob pattern
  -e, --enabled           only show enabled operators and panels
  -d, --disabled          only show disabled operators and panels
  -b, --builtins-only     only show builtin operators and panels
  -c, --no-builtins       only show non-builtin operators and panels
  -o, --operators-only    only show operators
  -p, --panels-only       only show panels
  -n, --names-only        only show names
  -u, --include-unlisted  include unlisted operators
```

**Examples**

```shell
# List all available operators and panels
fiftyone operators list
```

```shell
# List operators and panels whose URI matches the given glob pattern
fiftyone operators list --glob-patt '*/compute_*'
```

```shell
# List enabled operators and panels
fiftyone operators list --enabled
```

```shell
# List disabled operators and panels
fiftyone operators list --disabled
```

```shell
# List non-builtin operators and panels
fiftyone operators list --no-builtins
```

```shell
# List panels
fiftyone operators list --panels-only
```

<a id="cli-fiftyone-operators-info"></a>

### Operator info

Prints information about operators and panels that are installed locally.

```text
fiftyone operators info [-h] URI
```

**Arguments**

```text
positional arguments:
  URI         the operator or panel URI

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Prints information about an operator or panel
fiftyone operators info <uri>
```

<a id="cli-fiftyone-skills"></a>

## FiftyOne skills

Tools for working with FiftyOne skills.

```text
fiftyone skills [-h] [--all-help] {list} ...
```

**Arguments**

```text
optional arguments:
  -h, --help   show this help message and exit
  --all-help   show help recursively and exit

available commands:
  {list}
    list      List skills provided by installed plugins.
```

<a id="cli-fiftyone-skills-list"></a>

### List skills

List skills provided by installed plugins.

```text
fiftyone skills list [-h] [-p PLUGIN [PLUGIN ...]] [-c CATEGORY [CATEGORY ...]] [-e] [-d] [-n]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -p PLUGIN [PLUGIN ...], --plugin PLUGIN [PLUGIN ...]
                        only show skills from this plugin(s)
  -c CATEGORY [CATEGORY ...], --category CATEGORY [CATEGORY ...]
                        only show skills in this category(s)
  -e, --enabled         only show skills from enabled plugins
  -d, --disabled        only show skills from disabled plugins
  -n, --names-only      only show names
```

**Examples**

```shell
# List all available skills
fiftyone skills list
```

```shell
# List skills from a specific plugin
fiftyone skills list --plugin @voxel51/my-plugin
```

```shell
# List skills in a specific category
fiftyone skills list --category data-ingestion
```

```shell
# List enabled skills
fiftyone skills list --enabled
```

```shell
# List skill names only
fiftyone skills list --names-only
```

<a id="cli-fiftyone-delegated"></a>

## FiftyOne delegated operations

Tools for working with FiftyOne delegated operations.

```text
fiftyone delegated [-h] [--all-help] {launch,list,info,output,fail,delete,cleanup} ...
```

**Arguments**

```text
optional arguments:
  -h, --help   show this help message and exit
  --all-help   show help recursively and exit

available commands:
  {launch,list,info,output,fail,delete,cleanup}
    launch              Launches a service for running delegated operations.
    list                List delegated operations.
    info                Prints information about a delegated operation.
    output              Prints the output for a delegated operation.
    fail                Manually mark delegated as failed.
    delete              Delete delegated operations.
    cleanup             Cleanup delegated operations.
```

<a id="cli-fiftyone-delegated-launch"></a>

### Launch delegated service

Launches a service for running delegated operations.

```text
fiftyone delegated launch [-h] [-t TYPE]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -t TYPE, --type TYPE  the type of service to launch. The default is 'local'
```

**Examples**

```shell
# Launch a local service
fiftyone delegated launch
```

<a id="cli-fiftyone-delegated-list"></a>

### List delegated operations

List delegated operations.

```text
fiftyone delegated list [-h]
                        [-o OPERATOR]
                        [-d DATASET]
                        [-m MATCH]
                        [-s STATE]
                        [--sort-by SORT_BY]
                        [--reverse]
                        [-l LIMIT]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -o OPERATOR, --operator OPERATOR
                        only list operations for this operator
  -d DATASET, --dataset DATASET
                        only list operations for this dataset
  -m MATCH, --match MATCH
                        only list operations whose operator or label contain this string
  -s STATE, --state STATE
                        only list operations with this state. Supported
                        values are ('SCHEDULED', 'QUEUED', 'RUNNING', 'COMPLETED', 'FAILED')
  --sort-by SORT_BY     how to sort the operations. Supported values are
                        ('SCHEDULED_AT', 'QUEUED_AT', 'STARTED_AT', 'COMPLETED_AT', 'FAILED_AT', 'OPERATOR', 'LABEL')
  --reverse             whether to sort in reverse order
  -l LIMIT, --limit LIMIT
                        a maximum number of operations to show
```

**Examples**

```shell
# List all delegated operations
fiftyone delegated list
```

```shell
# List some specific delegated operations
fiftyone delegated list \
    --dataset quickstart \
    --operator @voxel51/io/export_samples \
    --state COMPLETED \
    --sort-by COMPLETED_AT \
    --limit 10
```

<a id="cli-fiftyone-delegated-info"></a>

### Delegated operation info

Prints information about a delegated operation.

```text
fiftyone delegated info [-h] ID
```

**Arguments**

```text
positional arguments:
  ID          the operation ID

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Print information about a delegated operation
fiftyone delegated info <id>
```

<a id="cli-fiftyone-delegated-output"></a>

### Delegated operation output

Prints the output for a delegated operation.

```text
fiftyone delegated output [-h] ID
```

**Arguments**

```text
positional arguments:
  ID          the operation ID

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Print the output for a delegated operation
fiftyone delegated output <id>
```

<a id="cli-fiftyone-delegated-fail"></a>

### Mark delegated operations as failed

Manually mark delegated operations as failed.

```text
fiftyone delegated fail [-h] [IDS ...]
```

**Arguments**

```text
positional arguments:
  IDS         an operation ID or list of operation IDs

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Manually mark the specified operation(s) as FAILED
fiftyone delegated fail <id1> <id2> ...
```

<a id="cli-fiftyone-delegated-delete"></a>

### Delete delegated operations

Delete delegated operations.

```text
fiftyone delegated delete [-h] [IDS ...]
```

**Arguments**

```text
positional arguments:
  IDS         an operation ID or list of operation IDs

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Delete the specified operation(s)
fiftyone delegated delete <id1> <id2> ...
```

<a id="cli-fiftyone-delegated-cleanup"></a>

### Cleanup delegated operations

Cleanup delegated operations.

```text
fiftyone delegated cleanup [-h]
                           [-o OPERATOR]
                           [-d DATASET]
                           [-s STATE]
                           [--orphan]
                           [--dry-run]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -o OPERATOR, --operator OPERATOR
                        cleanup operations for this operator
  -d DATASET, --dataset DATASET
                        cleanup operations for this dataset
  -s STATE, --state STATE
                        delete operations in this state. Supported values
                        are ('QUEUED', 'COMPLETED', 'FAILED')
  --orphan              delete all operations associated with non-existent
                        datasets
  --dry-run             whether to print information rather than actually
                        deleting operations
```

**Examples**

```shell
# Delete all failed operations associated with a given dataset
fiftyone delegated cleanup --dataset quickstart --state FAILED
```

```shell
# Delete all delegated operations associated with non-existent datasets
fiftyone delegated cleanup --orphan
```

```shell
# Print information about operations rather than actually deleting them
fiftyone delegated cleanup --orphan --dry-run
```

<a id="cli-fiftyone-plugins"></a>

## FiftyOne plugins

Tools for working with FiftyOne plugins.

```text
fiftyone plugins [-h] [--all-help] {list,info,download,requirements,create,enable,disable,delete} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {list,info,download,search,requirements,create,enable,disable,delete}
    list                List plugins that are installed locally.
    info                Prints information about plugins that are installed locally.
    download            Download plugins from the web.
    search              Search for available plugins in a GitHub repository.
    requirements        Handles package requirements for plugins.
    create              Creates or initializes a plugin.
    enable              Enables the given plugin(s).
    disable             Disables the given plugin(s).
    delete              Delete plugins from your local machine.
```

<a id="cli-fiftyone-plugins-list"></a>

### List plugins

List plugins that are installed locally.

```text
fiftyone plugins list [-h] [-g PATT] [-t TAGS [TAGS ...]] [-e] [-d] [-b] [-c] [-n]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -g PATT, --glob-patt PATT
                        only show plugins whose name matches the glob pattern
  -t TAGS [TAGS ...], --tags TAGS [TAGS ...]
                        only show plugins with the specified tag(s)
  -e, --enabled         only show enabled plugins
  -d, --disabled        only show disabled plugins
  -b, --builtins-only   only show builtin plugins
  -c, --no-builtins     only show non-builtin plugins
  -n, --names-only      only show names
```

**Examples**

```shell
# List all available plugins
fiftyone plugins list
```

```shell
# List plugins whose name matches the given glob pattern
fiftyone plugins list --glob-patt '@voxel51/*'
```

```shell
# List plugins with the given tag
fiftyone plugins list --tags <tag>
```

```shell
# List enabled plugins
fiftyone plugins list --enabled
```

```shell
# List disabled plugins
fiftyone plugins list --disabled
```

```shell
# List non-builtin plugins
fiftyone plugins list --no-builtins
```

<a id="cli-fiftyone-plugins-info"></a>

### Plugin info

List plugins that are installed locally.

```text
fiftyone plugins info [-h] NAME_OR_DIR
```

**Arguments**

```text
positional arguments:
  NAME_OR_DIR  the plugin name or directory

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Prints information about a plugin
fiftyone plugins info <name>

# Prints information about a plugin in a given directory
fiftyone plugins info <dir>
```

<a id="cli-fiftyone-plugins-download"></a>

### Download plugins

Download plugins from the web.

When downloading plugins from GitHub, you can provide any of the following
formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone plugins download [-h] [-n [PLUGIN_NAMES ...]] [-o] URL_OR_GH_REPO
```

**Arguments**

```text
positional arguments:
  URL_OR_GH_REPO        A URL or <user>/<repo>[/<ref>] of a GitHub repository

optional arguments:
  -h, --help            show this help message and exit
  -n [PLUGIN_NAMES ...], --plugin-names [PLUGIN_NAMES ...]
                        a plugin name or list of plugin names to download
  -o, --overwrite       whether to overwrite existing plugins
```

**Examples**

```shell
# Download plugins from a GitHub repository URL
fiftyone plugins download <github-repo-url>
```

```shell
# Download plugins by specifying the GitHub repository details
fiftyone plugins download <user>/<repo>[/<ref>]
```

```shell
# Download specific plugins from a URL
fiftyone plugins download <url> --plugin-names <name1> <name2> <name3>
```

<a id="cli-fiftyone-plugins-search"></a>

### Search plugins

Search for available plugins in a GitHub repository.

When searching for plugins, you can provide any of the following
formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`

#### NOTE
To read from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the
`GITHUB_TOKEN` environment variable.

```text
fiftyone plugins search [-h] [--path PATH] URL_OR_GH_REPO
```

**Arguments**

```text
positional arguments:
  URL_OR_GH_REPO  A URL or <user>/<repo>[/<ref>] of a GitHub repository

optional arguments:
  -h, --help      show this help message and exit
  --path PATH     path inside the GitHub repository for plugins search
```

**Examples**

```shell
# Search for plugins by specifying a GitHub repository URL
fiftyone plugins search <github-repo-url>
```

```shell
# Search for plugins by specifying the GitHub repository details
fiftyone plugins search <user>/<repo>[/<ref>]
```

```shell
# Search for plugins by specifying a path inside the repository
fiftyone plugins search <github-repo-url> --path path/to/dir
fiftyone plugins search <user>/<repo>[/<ref>] --path path/to/dir
```

<a id="cli-fiftyone-plugins-requirements"></a>

### Plugin requirements

Handles package requirements for plugins.

```text
fiftyone plugins requirements [-h] [-p] [-i] [-e] [--error-level LEVEL] NAME
```

**Arguments**

```text
positional arguments:
  NAME                 the plugin name

optional arguments:
  -h, --help           show this help message and exit
  -p, --print          print the requirements for the plugin
  -i, --install        install any requirements for the plugin
  -e, --ensure         ensure the requirements for the plugin are satisfied
  --error-level LEVEL  the error level (0=error, 1=warn, 2=ignore) to use when installing or ensuring plugin requirements
```

**Examples**

```shell
# Print requirements for a plugin
fiftyone plugins requirements <name> --print
```

```shell
# Install any requirements for the plugin
fiftyone plugins requirements <name> --install
```

```shell
# Ensures that the requirements for the plugin are satisfied
fiftyone plugins requirements <name> --ensure
```

<a id="cli-fiftyone-plugins-create"></a>

### Create plugins

Creates or initializes a plugin.

```text
fiftyone plugins create [-h]
                        [-f [FILES ...]]
                        [-d OUTDIR]
                        [--label LABEL]
                        [--description DESCRIPTION]
                        [--version VERSION]
                        [-o]
                        [--kwargs KEY=VAL [KEY=VAL ...]]
                        [NAME ...]
```

**Arguments**

```text
positional arguments:
  NAME                  the plugin name(s)

optional arguments:
  -h, --help            show this help message and exit
  -f [FILES ...], --from-files [FILES ...]
                        a directory or list of explicit filepaths to include in the plugin
  -d OUTDIR, --outdir OUTDIR
                        a directory in which to create the plugin
  --label LABEL         a display name for the plugin
  --description DESCRIPTION
                        a description for the plugin
  --version VERSION     an optional FiftyOne version requirement for the plugin
  -o, --overwrite       whether to overwrite existing plugins
  --kwargs KEY=VAL [KEY=VAL ...]
                        additional keyword arguments to include in the plugin definition
```

**Examples**

```text
# Initialize a new plugin
fiftyone plugins create <name>
```

```shell
# Create a plugin from existing files
fiftyone plugins create \
    <name> \
    --from-files /path/to/dir \
    --label <label> \
    --description <description>
```

<a id="cli-fiftyone-plugins-enable"></a>

### Enable plugins

Enables the given plugin(s).

```text
fiftyone plugins enable [-h] [-a] [NAME ...]
```

**Arguments**

```text
positional arguments:
  NAME        the plugin name(s)

optional arguments:
  -h, --help  show this help message and exit
  -a, --all   whether to enable all plugins
```

**Examples**

```shell
# Enable a plugin
fiftyone plugins enable <name>
```

```shell
# Enable multiple plugins
fiftyone plugins enable <name1> <name2> ...
```

```shell
# Enable all plugins
fiftyone plugins enable --all
```

<a id="cli-fiftyone-plugins-disable"></a>

### Disable plugins

Disables the given plugin(s).

```text
fiftyone plugins disable [-h] [-a] [NAME ...]
```

**Arguments**

```text
positional arguments:
  NAME        the plugin name(s)

optional arguments:
  -h, --help  show this help message and exit
  -a, --all   whether to disable all plugins
```

**Examples**

```shell
# Disable a plugin
fiftyone plugins disable <name>
```

```shell
# Disable multiple plugins
fiftyone plugins disable <name1> <name2> ...
```

```shell
# Disable all plugins
fiftyone plugins disable --all
```

<a id="cli-fiftyone-plugins-delete"></a>

### Delete plugins

Delete plugins from your local machine.

```text
fiftyone plugins delete [-h] [-a] [NAME ...]
```

**Arguments**

```text
positional arguments:
  NAME        the plugin name(s)

optional arguments:
  -h, --help  show this help message and exit
  -a, --all   whether to delete all plugins
```

**Examples**

```shell
# Delete a plugin from local disk
fiftyone plugins delete <name>
```

```shell
# Delete multiple plugins from local disk
fiftyone plugins delete <name1> <name2> ...
```

```shell
# Delete all plugins from local disk
fiftyone plugins delete --all
```

<a id="cli-fiftyone-labs"></a>

## FiftyOne Labs

Tools for working with FiftyOne Labs.

```text
fiftyone labs [-h] [--all-help] {install,uninstall,list,search} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {install,uninstall,list,search}
    install             Install FiftyOne Labs features on your local machine.
    uninstall           Uninstall FiftyOne Labs features from your local machine.
    list                List installed FiftyOne Labs features on your local machine.
    search              Search for available FiftyOne Labs features.
```

<a id="cli-fiftyone-labs-install"></a>

### Install Labs features

Install FiftyOne Labs features on your local machine.

```text
fiftyone labs install [-h] [-a] [-o] [--branch BRANCH] [NAME ...]
```

**Arguments**

```text
positional arguments:
  NAME             the Labs feature(s) to install

optional arguments:
  -h, --help       show this help message and exit
  -a, --all        whether to install all Labs features
  -o, --overwrite  whether to reinstall existing Labs features
  --branch BRANCH  a Labs repository branch from which to install features
```

**Examples**

```shell
# Install specific FiftyOne labs feature(s)
fiftyone labs install <name1> <name2> ...
```

```shell
# Install all FiftyOne Labs features
fiftyone labs install --all
```

<a id="cli-fiftyone-labs-uninstall"></a>

### Uninstall Labs features

Uninstall FiftyOne Labs features from your local machine.

```text
fiftyone labs uninstall [-h] [-a] [NAME ...]
```

**Arguments**

```text
positional arguments:
  NAME        the Labs feature(s) to uninstall

optional arguments:
  -h, --help  show this help message and exit
  -a, --all   whether to uninstall all Labs features
```

**Examples**

```shell
# Uninstall specific Labs feature(s)
fiftyone labs uninstall <name1> <name2> ...
```

```shell
# Uninstall all Labs features
fiftyone labs uninstall --all
```

<a id="cli-fiftyone-labs-list"></a>

### List Labs features

List installed FiftyOne Labs features on your local machine.

```text
fiftyone labs list [-h] [-n]
```

**Arguments**

```text
optional arguments:
  -h, --help        show this help message and exit
  -n, --names-only  only show names
```

**Examples**

```shell
# List installed Labs features
fiftyone labs list
```

<a id="cli-fiftyone-labs-search"></a>

### Search Labs features

Search for available FiftyOne Labs features.

```text
fiftyone labs search [-h] [--branch BRANCH] [--path PATH] [-n]
```

**Arguments**

```text
optional arguments:
  -h, --help        show this help message and exit
  --branch BRANCH   a Labs repository branch from which to install features
  --path PATH       path inside the Labs repository for plugins search
  -n, --names-only  only show names
```

**Examples**

```shell
# List available Labs features
fiftyone labs search
```

```shell
# List available Labs features in a specific Labs repository branch
fiftyone labs search --branch <branch_name>
```

```shell
# List available Labs features in a specific Labs repository directory
fiftyone labs search --path path/to/dir
```

<a id="cli-fiftyone-utils"></a>

## FiftyOne utilities

FiftyOne utilities.

```text
fiftyone utils [-h] [--all-help]
               {compute-metadata,transform-images,transform-videos} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {compute-metadata,transform-images,transform-videos}
    compute-metadata    Populates the `metadata` field of all samples in the dataset.
    transform-images    Transforms the images in a dataset per the specified parameters.
    transform-videos    Transforms the videos in a dataset per the specified parameters.
```

<a id="cli-fiftyone-utils-compute-metadata"></a>

### Compute metadata

Populates the `metadata` field of all samples in the dataset.

```text
fiftyone utils compute-metadata [-h] [-o] [-n NUM_WORKERS] [-s] DATASET_NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -o, --overwrite       whether to overwrite existing metadata
  -n NUM_WORKERS, --num-workers NUM_WORKERS
                        a suggested number of worker processes to use
  -s, --skip-failures   whether to gracefully continue without raising an
                        error if metadata cannot be computed for a sample
```

**Examples**

```shell
# Populate all missing `metadata` sample fields
fiftyone utils compute-metadata <dataset-name>
```

```shell
# (Re)-populate the `metadata` field for all samples
fiftyone utils compute-metadata <dataset-name> --overwrite
```

<a id="cli-fiftyone-utils-transform-images"></a>

### Transform images

Transforms the images in a dataset per the specified parameters.

```text
fiftyone utils transform-images [-h] [--size SIZE] [--min-size MIN_SIZE]
                                [--max-size MAX_SIZE] [-i INTERPOLATION]
                                [-e EXT] [-f] [--media-field MEDIA_FIELD]
                                [--output-field OUTPUT_FIELD]
                                [-o OUTPUT_DIR] [-r REL_DIR]
                                [--no-update-filepaths]
                                [-d] [-n NUM_WORKERS] [-s]
                                DATASET_NAME
```

**Arguments**

```text
positional arguments:
  DATASET_NAME          the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  --size SIZE           a `width,height` for each image. A dimension can be
                        -1 if no constraint should be applied
  --min-size MIN_SIZE   a minimum `width,height` for each image. A dimension
                        can be -1 if no constraint should be applied
  --max-size MAX_SIZE   a maximum `width,height` for each image. A dimension
                        can be -1 if no constraint should be applied
  -i INTERPOLATION, --interpolation INTERPOLATION
                        an optional `interpolation` argument for `cv2.resize()`
  -e EXT, --ext EXT     an image format to convert to (e.g., '.png' or '.jpg')
  -f, --force-reencode  whether to re-encode images whose parameters already
                        meet the specified values
  --media-field MEDIA_FIELD
                        the input field containing the image paths to
                        transform
  --output-field OUTPUT_FIELD
                        an optional field in which to store the paths to
                        the transformed images. By default, `media_field`
                        is updated in-place
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        an optional output directory in which to write the
                        transformed images. If none is provided, the images
                        are updated in-place
  -r REL_DIR, --rel-dir REL_DIR
                        an optional relative directory to strip from each
                        input filepath to generate a unique identifier that
                        is joined with `output_dir` to generate an output
                        path for each image
  --no-update-filepaths
                        whether to store the output filepaths on the sample
                        collection
  -d, --delete-originals
                        whether to delete the original images after transforming
  -n NUM_WORKERS, --num-workers NUM_WORKERS
                        a suggested number of worker processes to use
  -s, --skip-failures   whether to gracefully continue without raising an
                        error if an image cannot be transformed
```

**Examples**

```shell
# Convert the images in the dataset to PNGs
fiftyone utils transform-images <dataset-name> --ext .png --delete-originals
```

```shell
# Ensure that no images in the dataset exceed 1920 x 1080
fiftyone utils transform-images <dataset-name> --max-size 1920,1080
```

<a id="cli-fiftyone-utils-transform-videos"></a>

### Transform videos

Transforms the videos in a dataset per the specified parameters.

```text
fiftyone utils transform-videos [-h] [--fps FPS] [--min-fps MIN_FPS]
                                [--max-fps MAX_FPS] [--size SIZE]
                                [--min-size MIN_SIZE] [--max-size MAX_SIZE]
                                [-r] [-f]
                                [--media-field MEDIA_FIELD]
                                [--output-field OUTPUT_FIELD]
                                [--output-dir OUTPUT_DIR]
                                [--rel-dir REL_DIR]
                                [--no-update-filepaths]
                                [-d] [-s] [-v]
                                DATASET_NAME
```

**Arguments**

```text
positional arguments:
  DATASET_NAME          the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  --fps FPS             a frame rate at which to resample the videos
  --min-fps MIN_FPS     a minimum frame rate. Videos with frame rate below
                        this value are upsampled
  --max-fps MAX_FPS     a maximum frame rate. Videos with frame rate exceeding
                        this value are downsampled
  --size SIZE           a `width,height` for each frame. A dimension can be -1
                        if no constraint should be applied
  --min-size MIN_SIZE   a minimum `width,height` for each frame. A dimension
                        can be -1 if no constraint should be applied
  --max-size MAX_SIZE   a maximum `width,height` for each frame. A dimension
                        can be -1 if no constraint should be applied
  -r, --reencode        whether to re-encode the videos as H.264 MP4s
  -f, --force-reencode  whether to re-encode videos whose parameters already
                        meet the specified values
  --media-field MEDIA_FIELD
                        the input field containing the video paths to
                        transform
  --output-field OUTPUT_FIELD
                        an optional field in which to store the paths to
                        the transformed videos. By default, `media_field`
                        is updated in-place
  --output-dir OUTPUT_DIR
                        an optional output directory in which to write the
                        transformed videos. If none is provided, the videos
                        are updated in-place
  --rel-dir REL_DIR     an optional relative directory to strip from each
                        input filepath to generate a unique identifier that
                        is joined with `output_dir` to generate an output
                        path for each video
  --no-update-filepaths
                        whether to store the output filepaths on the sample
                        collection
  -d, --delete-originals
                        whether to delete the original videos after transforming
  -s, --skip-failures   whether to gracefully continue without raising an
                        error if a video cannot be transformed
  -v, --verbose         whether to log the `ffmpeg` commands that are executed
```

**Examples**

```shell
# Re-encode the videos in the dataset as H.264 MP4s
fiftyone utils transform-videos <dataset-name> --reencode
```

```shell
# Ensure that no videos in the dataset exceed 1920 x 1080 and 30fps
fiftyone utils transform-videos <dataset-name> \
    --max-size 1920,1080 --max-fps 30.0
```

<a id="cli-fiftyone-annotation"></a>

## FiftyOne Annotation

Tools for working with the FiftyOne annotation API.

```text
fiftyone annotation [-h] [--all-help] {config} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {config}
    config              Tools for working with your FiftyOne annotation config.
```

<a id="cli-fiftyone-annotation-config"></a>

### Annotation Config

Tools for working with your FiftyOne annotation config.

```text
fiftyone annotation config [-h] [-l] [FIELD]
```

**Arguments**

```text
positional arguments:
  FIELD         an annotation config field to print

optional arguments:
  -h, --help    show this help message and exit
  -l, --locate  print the location of your annotation config on disk
```

**Examples**

```shell
# Print your entire annotation config
fiftyone annotation config
```

```shell
# Print a specific annotation config field
fiftyone annotation config <field>
```

```shell
# Print the location of your annotation config on disk (if one exists)
fiftyone annotation config --locate
```

<a id="cli-fiftyone-app"></a>

## FiftyOne App

Tools for working with the FiftyOne App.

```text
fiftyone app [-h] [--all-help] {config,launch,debug,view,connect} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {config,launch,view,connect}
    config              Tools for working with your App config.
    launch              Launch the FiftyOne App.
    debug               Launch the FiftyOne App in debug mode.
    view                View datasets in the App without persisting them to the database.
    connect             Connect to a remote FiftyOne App.
```

<a id="cli-fiftyone-app-config"></a>

### App Config


<div class="available-in">
    <div class="available-in-row">
        <span class="available-in-label">Available in:</span>
        <span class="available-in-pill available-in-pill--oss">Open Source</span><span class="available-in-pill available-in-pill--enterprise">Enterprise</span>
    </div>
    <div class="available-in-row">
        <span class="available-in-versions">Introduced in <a href="../release-notes.html#fiftyone-0-7-2">FiftyOne 0.7.2</a> &middot; <a href="../release-notes.html#fiftyone-enterprise-1-0">FiftyOne Enterprise 1.0</a></span>
    </div>
    
</div>

Tools for working with your FiftyOne App config.

```text
fiftyone app config [-h] [-l] [FIELD]
```

**Arguments**

```text
positional arguments:
  FIELD         an App config field to print

optional arguments:
  -h, --help    show this help message and exit
  -l, --locate  print the location of your App config on disk
```

**Examples**

```shell
# Print your entire App config
fiftyone app config
```

```shell
# Print a specific App config field
fiftyone app config <field>
```

```shell
# Print the location of your App config on disk (if one exists)
fiftyone app config --locate
```

<a id="cli-fiftyone-app-launch"></a>

### Launch the App

Launch the FiftyOne App.

```text
fiftyone app launch [-h] [-p PORT] [-A ADDRESS] [-b BROWSER] [-r] [-a] [-w WAIT] [NAME]
```

**Arguments**

```text
positional arguments:
  NAME                  the name of a dataset to open

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  the port number to use
  -A ADDRESS, --address ADDRESS
                        the address (server name) to use
  -r, --remote          whether to launch a remote App session
  -b BROWSER, --browser BROWSER
                        the browser to use to open the App
  -w WAIT, --wait WAIT  the number of seconds to wait for a new App
                        connection before returning if all connections are
                        lost. If negative, the process will wait forever,
                        regardless of connections
```

**Examples**

```shell
# Launch the App
fiftyone app launch
```

```shell
# Launch the App with the given dataset loaded
fiftyone app launch <name>
```

```shell
# Launch a remote App session
fiftyone app launch ... --remote
```

```shell
# Launch an App session with a specific browser
fiftyone app launch ... --browser <name>
```

<a id="cli-fiftyone-app-debug"></a>

### Launch the App (debug mode)

Launch the FiftyOne App in debug mode.

```text
fiftyone app debug [-h] [-p PORT] [-A ADDRESS]  [--headless] [NAME]
```

**Arguments**

```text
positional arguments:
  NAME                  the name of a dataset to open

options:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  the port number to use
  -A ADDRESS, --address ADDRESS
                        the address (server name) to use
  --headless            don't open the browser
```

**Examples**

```shell
# Launch the App in debug mode
fiftyone app debug
```

```shell
# Launch the App in debug mode with a given dataset loaded
fiftyone app debug <name>
```

<a id="cli-fiftyone-app-view"></a>

### View datasets in App

View datasets in the FiftyOne App without persisting them to the database.

```text
fiftyone app view [-h] [-n NAME] [-d DATASET_DIR] [-t TYPE] [-z NAME]
                  [-s SPLITS [SPLITS ...]] [--images-dir IMAGES_DIR]
                  [--images-patt IMAGES_PATT] [--videos-dir VIDEOS_DIR]
                  [--videos-patt VIDEOS_PATT] [-j JSON_PATH] [-p PORT]
                  [-A ADDRESS] [-r] [-a] [-w WAIT]
                  [-k KEY=VAL [KEY=VAL ...]]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  a name for the dataset
  -d DATASET_DIR, --dataset-dir DATASET_DIR
                        the directory containing the dataset to view
  -t TYPE, --type TYPE  the fiftyone.types.Dataset type of the dataset
  -z NAME, --zoo-dataset NAME
                        the name of a zoo dataset to view
  -s SPLITS [SPLITS ...], --splits SPLITS [SPLITS ...]
                        the dataset splits to load
  --images-dir IMAGES_DIR
                        the path to a directory of images
  --images-patt IMAGES_PATT
                        a glob pattern of images
  --videos-dir VIDEOS_DIR
                        the path to a directory of videos
  --videos-patt VIDEOS_PATT
                        a glob pattern of videos
  -j JSON_PATH, --json-path JSON_PATH
                        the path to a samples JSON file to view
  -p PORT, --port PORT  the port number to use
  -A ADDRESS, --address ADDRESS
                        the address (server name) to use
  -r, --remote          whether to launch a remote App session
  -w WAIT, --wait WAIT  the number of seconds to wait for a new App
                        connection before returning if all connections are
                        lost. If negative, the process will wait forever,
                        regardless of connections
  -k KEY=VAL [KEY=VAL ...], --kwargs KEY=VAL [KEY=VAL ...]
                        additional type-specific keyword arguments for
                        `fiftyone.core.dataset.Dataset.from_dir()`
```

**Examples**

```shell
# View a dataset stored on disk in the App
fiftyone app view --dataset-dir <dataset-dir> --type <type>
```

```shell
# View a zoo dataset in the App
fiftyone app view --zoo-dataset <name> --splits <split1> ...
```

```shell
# View a directory of images in the App
fiftyone app view --images-dir <images-dir>
```

```shell
# View a glob pattern of images in the App
fiftyone app view --images-patt <images-patt>
```

```shell
# View a directory of videos in the App
fiftyone app view --videos-dir <videos-dir>
```

```shell
# View a glob pattern of videos in the App
fiftyone app view --videos-patt <videos-patt>
```

```shell
# View a dataset stored in JSON format on disk in the App
fiftyone app view --json-path <json-path>
```

```shell
# View the dataset in a remote App session
fiftyone app view ... --remote
```

```shell
# View a random subset of the data stored on disk in the App
fiftyone app view ... --kwargs max_samples=50 shuffle=True
```

<a id="cli-fiftyone-app-connect"></a>

### Connect to remote App

Connect to a remote FiftyOne App in your web browser.

```text
fiftyone app connect [-h] [-d DESTINATION] [-p PORT] [-A ADDRESS] [-l PORT]
                     [-i KEY]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -d DESTINATION, --destination DESTINATION
                        the destination to connect to, e.g., [username@]hostname
  -p PORT, --port PORT  the remote port to connect to
  -l PORT, --local-port PORT
                        the local port to use to serve the App
  -i KEY, --ssh-key KEY
                        optional ssh key to use to login
```

**Examples**

```shell
# Connect to a remote App with port forwarding already configured
fiftyone app connect
```

```shell
# Connect to a remote App session
fiftyone app connect --destination <destination> --port <port>
```

```shell
# Connect to a remote App session using an ssh key
fiftyone app connect ... --ssh-key <path/to/key>
```

```shell
# Connect to a remote App using a custom local port
fiftyone app connect ... --local-port <port>
```

<a id="cli-fiftyone-brain"></a>

## FiftyOne Brain

Tools for working with the FiftyOne Brain.

```text
fiftyone brain [-h] [--all-help] {config} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {config}
    config              Tools for working with your FiftyOne Brain config.
```

<a id="cli-fiftyone-brain-config"></a>

### Brain Config

Tools for working with your FiftyOne Brain config.

```text
fiftyone brain config [-h] [-l] [FIELD]
```

**Arguments**

```text
positional arguments:
  FIELD         a brain config field to print

optional arguments:
  -h, --help    show this help message and exit
  -l, --locate  print the location of your brain config on disk
```

**Examples**

```shell
# Print your entire brain config
fiftyone brain config
```

```shell
# Print a specific brain config field
fiftyone brain config <field>
```

```shell
# Print the location of your brain config on disk (if one exists)
fiftyone brain config --locate
```

<a id="cli-fiftyone-evaluation"></a>

## FiftyOne Evaluation

Tools for working with the FiftyOne evaluation API.

```text
fiftyone evaluation [-h] [--all-help] {config} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {config}
    config              Tools for working with your FiftyOne evaluation config.
```

<a id="cli-fiftyone-evaluation-config"></a>

### Evaluation Config

Tools for working with your FiftyOne evaluation config.

```text
fiftyone evaluation config [-h] [-l] [FIELD]
```

**Arguments**

```text
positional arguments:
  FIELD         an evaluation config field to print

optional arguments:
  -h, --help    show this help message and exit
  -l, --locate  print the location of your evaluation config on disk
```

**Examples**

```shell
# Print your entire evaluation config
fiftyone evaluation config
```

```shell
# Print a specific evaluation config field
fiftyone evaluation config <field>
```

```shell
# Print the location of your evaluation config on disk (if one exists)
fiftyone evaluation config --locate
```

<a id="cli-fiftyone-zoo"></a>

## FiftyOne Zoo

Tools for working with the FiftyOne Zoo.

```text
fiftyone zoo [-h] [--all-help] {datasets,models} ...
```

**Arguments**

```text
optional arguments:
  -h, --help         show this help message and exit
  --all-help         show help recursively and exit

available commands:
  {datasets,models}
    datasets         Tools for working with the FiftyOne Dataset Zoo.
    models           Tools for working with the FiftyOne Model Zoo.
```

<a id="cli-fiftyone-zoo-datasets"></a>

## FiftyOne Dataset Zoo

Tools for working with the FiftyOne Dataset Zoo.

```text
fiftyone zoo datasets [-h] [--all-help]
                      {list,find,info,download,load,delete} ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {list,find,info,download,load,delete}
    list                List datasets in the FiftyOne Dataset Zoo.
    find                Locate a downloaded zoo dataset on disk.
    info                Print information about datasets in the FiftyOne Dataset Zoo.
    download            Download zoo datasets.
    load                Load zoo datasets as persistent FiftyOne datasets.
    delete              Deletes the local copy of the zoo dataset on disk.
```

<a id="cli-fiftyone-zoo-datasets-list"></a>

### List datasets in zoo

List datasets in the FiftyOne Dataset Zoo.

```text
fiftyone zoo datasets list [-h] [-n] [-d] [-s SOURCE] [-t TAGS [TAGS ...]] [-l LICENSE [LICENSE ...]]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -n, --names-only      only show dataset names
  -d, --downloaded-only
                        only show datasets that have been downloaded
  -s SOURCE, --source SOURCE
                        only show datasets available from the specified source
  -t TAGS [TAGS ...], --tags TAGS [TAGS ...]
                        only show datasets with the specified tag(s)
  -l LICENSE [LICENSE ...], --license LICENSE [LICENSE ...]
                        only show datasets distributed under the specified license(s)
```

**Examples**

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

```shell
# List available dataset names
fiftyone zoo datasets list --names-only
```

```shell
# List downloaded datasets
fiftyone zoo datasets list --downloaded-only
```

```shell
# List available datasets from the given source
fiftyone zoo datasets list --source <source>
```

```shell
# List available datasets with the given tag
fiftyone zoo datasets list --tags <tag>
```

```shell
# List available datasets with the given license
fiftyone zoo datasets list --license <license>
```

<a id="cli-fiftyone-zoo-datasets-find"></a>

### Find zoo datasets on disk

Locate a downloaded zoo dataset on disk.

```text
fiftyone zoo datasets find [-h] [-s SPLIT] NAME_OR_URL
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -s SPLIT, --split SPLIT
```

**Examples**

```shell
# Print the location of a downloaded zoo dataset on disk
fiftyone zoo datasets find <name>
```

```shell
# Print the location of a remotely-sourced zoo dataset on disk
fiftyone zoo datasets find https://github.com/<user>/<repo>
fiftyone zoo datasets find <url>
```

```shell
# Print the location of a specific split of a dataset
fiftyone zoo datasets find <name> --split <split>
```

<a id="cli-fiftyone-zoo-datasets-info"></a>

### Show zoo dataset info

Print information about datasets in the FiftyOne Dataset Zoo.

```text
fiftyone zoo datasets info [-h] NAME_OR_URL
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the dataset

optional arguments:
  -h, --help            show this help message and exit
```

**Examples**

```shell
# Print information about a zoo dataset
fiftyone zoo datasets info <name>
```

```shell
# Print information about a remote zoo dataset
fiftyone zoo datasets info https://github.com/<user>/<repo>
fiftyone zoo datasets info <url>
```

<a id="cli-fiftyone-zoo-datasets-download"></a>

### Download zoo datasets

Download zoo datasets.

When downloading remotely-sourced zoo datasets, you can provide any of the
following formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`
- a publicly accessible URL of an archive (eg zip or tar) file

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone zoo datasets download [-h] [-s SPLITS [SPLITS ...]]
                               [-k KEY=VAL [KEY=VAL ...]]
                               NAME_OR_URL
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the dataset

optional arguments:

  -h, --help            show this help message and exit
  -s SPLITS [SPLITS ...], --splits SPLITS [SPLITS ...]
                        the dataset splits to download
  -k KEY=VAL [KEY=VAL ...], --kwargs KEY=VAL [KEY=VAL ...]
                        optional dataset-specific keyword arguments for
                        `fiftyone.zoo.download_zoo_dataset()`
```

**Examples**

```shell
# Download a zoo dataset
fiftyone zoo datasets download <name>
```

```shell
# Download a remotely-sourced zoo dataset
fiftyone zoo datasets download https://github.com/<user>/<repo>
fiftyone zoo datasets download <url>
```

```shell
# Download the specified split(s) of a zoo dataset
fiftyone zoo datasets download <name> --splits <split1> ...
```

```shell
# Download a zoo dataset that requires extra keyword arguments
fiftyone zoo datasets download <name> \
    --kwargs source_dir=/path/to/source/files
```

<a id="cli-fiftyone-zoo-datasets-load"></a>

### Load zoo datasets

Load zoo datasets as persistent FiftyOne datasets.

When loading remotely-sourced zoo datasets, you can provide any of the
following formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`
- a publicly accessible URL of an archive (eg zip or tar) file

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone zoo datasets load [-h] [-s SPLITS [SPLITS ...]]
                           [-n DATASET_NAME] [-k KEY=VAL [KEY=VAL ...]]
                           NAME_OR_URL
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -s SPLITS [SPLITS ...], --splits SPLITS [SPLITS ...]
                        the dataset splits to load
  -n DATASET_NAME, --dataset-name DATASET_NAME
                        a custom name to give the FiftyOne dataset
  -k KEY=VAL [KEY=VAL ...], --kwargs KEY=VAL [KEY=VAL ...]
                        additional dataset-specific keyword arguments for
                        `fiftyone.zoo.load_zoo_dataset()`
```

**Examples**

```shell
# Load the zoo dataset with the given name
fiftyone zoo datasets load <name>
```

```shell
# Load a remotely-sourced zoo dataset
fiftyone zoo datasets load https://github.com/<user>/<repo>
fiftyone zoo datasets load <url>
```

```shell
# Load the specified split(s) of a zoo dataset
fiftyone zoo datasets load <name> --splits <split1> ...
```

```shell
# Load a zoo dataset with a custom name
fiftyone zoo datasets load <name> --dataset-name <dataset-name>
```

```shell
# Load a zoo dataset that requires custom keyword arguments
fiftyone zoo datasets load <name> \
    --kwargs source_dir=/path/to/source_files
```

```shell
# Load a random subset of a zoo dataset
fiftyone zoo datasets load <name> \
    --kwargs max_samples=50 shuffle=True
```

<a id="cli-fiftyone-zoo-datasets-delete"></a>

### Delete zoo datasets

Deletes the local copy of the zoo dataset on disk.

```text
fiftyone zoo datasets delete [-h] [-s SPLIT] NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the dataset

optional arguments:
  -h, --help            show this help message and exit
  -s SPLIT, --split SPLIT
                        a dataset split
```

**Examples**

```shell
# Delete an entire zoo dataset from disk
fiftyone zoo datasets delete <name>
```

```shell
# Delete a specific split of a zoo dataset from disk
fiftyone zoo datasets delete <name> --split <split>
```

<a id="cli-fiftyone-zoo-models"></a>

## FiftyOne Model Zoo


<div class="available-in">
    <div class="available-in-row">
        <span class="available-in-label">Available in:</span>
        <span class="available-in-pill available-in-pill--oss">Open Source</span><span class="available-in-pill available-in-pill--enterprise">Enterprise</span>
    </div>
    <div class="available-in-row">
        <span class="available-in-versions">Introduced in <a href="../release-notes.html#fiftyone-0-7-0">FiftyOne 0.7.0</a> &middot; <a href="../release-notes.html#fiftyone-enterprise-1-0">FiftyOne Enterprise 1.0</a></span>
    </div>
    
</div>

Tools for working with the FiftyOne Model Zoo.

```text
fiftyone zoo models [-h] [--all-help]
                    {list,find,info,requirements,download,apply,embed,delete,list-sources,register-source,delete-source}
                    ...
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  --all-help            show help recursively and exit

available commands:
  {list,find,info,requirements,download,apply,embed,delete,register-source,delete-source}
    list                List models in the FiftyOne Model Zoo.
    find                Locate the downloaded zoo model on disk.
    info                Print information about models in the FiftyOne Model Zoo.
    requirements        Handles package requirements for zoo models.
    download            Download zoo models.
    apply               Apply zoo models to datasets.
    embed               Generate embeddings for datasets with zoo models.
    delete              Deletes the local copy of the zoo model on disk.
    list-sources        Lists remote zoo model sources that are registered locally.
    register-source     Registers a remote source of zoo models.
    delete-source       Deletes the remote source and all downloaded models associated with it.
```

<a id="cli-fiftyone-zoo-models-list"></a>

### List models in zoo

List models in the FiftyOne Model Zoo.

```text
fiftyone zoo models list [-h] [-n] [-d] [-t TAGS [TAGS ...]] [-s SOURCE] [-l LICENSE [LICENSE ...]]
```

**Arguments**

```text
optional arguments:
  -h, --help            show this help message and exit
  -n, --names-only      only show model names
  -d, --downloaded-only
                        only show models that have been downloaded
  -t TAGS [TAGS ...], --tags TAGS [TAGS ...]
                        only show models with the specified tag(s)
  -s SOURCE, --source SOURCE
                        only show models available from the specified remote source
  -l LICENSE [LICENSE ...], --license LICENSE [LICENSE ...]
                        only show models distributed under the specified license(s)
```

**Examples**

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

```shell
# List available models (names only)
fiftyone zoo models list --names-only
```

```shell
# List downloaded models
fiftyone zoo models list --downloaded-only
```

```shell
# List available models with the given tag
fiftyone zoo models list --tags <tag>
```

```shell
# List available models from the given remote source
fiftyone zoo models list --source <source>
```

```shell
# List available models with the given license
fiftyone zoo models list --license <license>
```

<a id="cli-fiftyone-zoo-models-find"></a>

### Find zoo models on disk

Locate the downloaded zoo model on disk.

```text
fiftyone zoo models find [-h] NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the model

optional arguments:
  -h, --help            show this help message and exit
```

**Examples**

```shell
# Print the location of the downloaded zoo model on disk
fiftyone zoo models find <name>
```

<a id="cli-fiftyone-zoo-models-info"></a>

### Show zoo model info

Print information about models in the FiftyOne Model Zoo.

```text
fiftyone zoo models info [-h] NAME
```

**Arguments**

```text
positional arguments:
  NAME                  the name of the model

optional arguments:
  -h, --help            show this help message and exit
```

**Examples**

```shell
# Print information about a zoo model
fiftyone zoo models info <name>
```

<a id="cli-fiftyone-zoo-models-requirements"></a>

### Zoo model requirements

Handles package requirements for zoo models.

```text
fiftyone zoo models requirements [-h] [-p] [-i] [-e]
                                 [--error-level LEVEL]
                                 NAME
```

**Arguments**

```text
positional arguments:
  NAME                 the name of the model

optional arguments:
  -h, --help           show this help message and exit
  -p, --print          print the requirements for the zoo model
  -i, --install        install any requirements for the zoo model
  -e, --ensure         ensure the requirements for the zoo model are satisfied
  --error-level LEVEL  the error level (0=error, 1=warn, 2=ignore) to use
                       when installing or ensuring model requirements
```

**Examples**

```shell
# Print requirements for a zoo model
fiftyone zoo models requirements <name> --print
```

```shell
# Install any requirements for the zoo model
fiftyone zoo models requirements <name> --install
```

```shell
# Ensures that the requirements for the zoo model are satisfied
fiftyone zoo models requirements <name> --ensure
```

<a id="cli-fiftyone-zoo-models-download"></a>

### Download zoo models

Download zoo models.

When downloading remotely-sourced zoo models, you can provide any of the
following:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone zoo models download [-h] [-n MODEL_NAME] [-o] NAME_OR_URL
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the model

optional arguments:
  -h, --help            show this help message and exit
  -n MODEL_NAME, --model-name MODEL_NAME
                        the specific model to download, if `name_or_url` is
                        a remote source
  -o, --overwrite       whether to overwrite any existing model files
```

**Examples**

```shell
# Download a zoo model
fiftyone zoo models download <name>
```

```shell
# Download a remotely-sourced zoo model
fiftyone zoo models download https://github.com/<user>/<repo> \
    --model-name <name>
fiftyone zoo models download <url> --model-name <name>
```

<a id="cli-fiftyone-zoo-models-apply"></a>

### Apply zoo models to datasets


<div class="available-in">
    <div class="available-in-row">
        <span class="available-in-label">Available in:</span>
        <span class="available-in-pill available-in-pill--oss">Open Source</span><span class="available-in-pill available-in-pill--enterprise">Enterprise</span>
    </div>
    <div class="available-in-row">
        <span class="available-in-versions">Introduced in <a href="../release-notes.html#fiftyone-0-7-0">FiftyOne 0.7.0</a> &middot; <a href="../release-notes.html#fiftyone-enterprise-1-0">FiftyOne Enterprise 1.0</a></span>
    </div>
    
</div>

Apply zoo models to datasets.

When applying remotely-sourced zoo models, you can provide any of the following
formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`
- a publicly accessible URL of an archive (eg zip or tar) file

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone zoo models apply [-h] [-n MODEL_NAME] [-b BATCH_SIZE] [-t THRESH]
                          [-l] [-i] [--error-level LEVEL]
                          NAME_OR_URL DATASET_NAME LABEL_FIELD
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the zoo model
  DATASET_NAME          the name of the FiftyOne dataset to process
  LABEL_FIELD           the name of the field in which to store the predictions

optional arguments:
  -h, --help            show this help message and exit
  -n MODEL_NAME, --model-name MODEL_NAME
                        the specific model to apply, if `name_or_url` is a
                        remote source
  -b BATCH_SIZE, --batch-size BATCH_SIZE
                        an optional batch size to use during inference
  -t THRESH, --confidence-thresh THRESH
                        an optional confidence threshold to apply to any
                        applicable labels generated by the model
  -l, --store-logits    store logits for the predictions
  -i, --install         install any requirements for the zoo model
  --error-level LEVEL   the error level (0=error, 1=warn, 2=ignore) to use
                        when installing or ensuring model requirements
```

**Examples**

```shell
# Apply a zoo model to a dataset
fiftyone zoo models apply <model-name> <dataset-name> <label-field>
```

```shell
# Apply a remotely-sourced zoo model to a dataset
fiftyone zoo models apply https://github.com/<user>/<repo> \
    <dataset-name> <label-field> --model-name <model-name>
fiftyone zoo models apply <url> \
    <dataset-name> <label-field> --model-name <model-name>
```

```shell
# Apply a zoo classifier with some customized parameters
fiftyone zoo models apply \
    <model-name> <dataset-name> <label-field> \
    --confidence-thresh 0.7 \
    --store-logits \
    --batch-size 32
```

<a id="cli-fiftyone-zoo-models-embed"></a>

### Generate embeddings with zoo models

Generate embeddings for datasets with zoo models.

When applying remotely-sourced zoo models, you can provide any of the following
formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`
- a publicly accessible URL of an archive (eg zip or tar) file

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone zoo models embed [-h] [-n MODEL_NAME] [-b BATCH_SIZE] [-i]
                          [--error-level LEVEL]
                          NAME_OR_URL DATASET_NAME EMBEDDINGS_FIELD
```

**Arguments**

```text
positional arguments:
  NAME_OR_URL           the name or remote location of the zoo model
  DATASET_NAME          the name of the FiftyOne dataset to process
  EMBEDDINGS_FIELD      the name of the field in which to store the embeddings

optional arguments:
  -h, --help            show this help message and exit
  -n MODEL_NAME, --model-name MODEL_NAME
                        the specific model to apply, if `name_or_url` is a
                        remote source
  -b BATCH_SIZE, --batch-size BATCH_SIZE
                        an optional batch size to use during inference
  -i, --install         install any requirements for the zoo model
  --error-level LEVEL   the error level (0=error, 1=warn, 2=ignore) to use
                        when installing or ensuring model requirements
```

**Examples**

```shell
# Generate embeddings for a dataset with a zoo model
fiftyone zoo models embed <model-name> <dataset-name> <embeddings-field>
```

```shell
# Generate embeddings for a dataset with a remotely-sourced zoo model
fiftyone zoo models embed https://github.com/<user>/<repo> \
    <dataset-name> <embeddings-field> --model-name <model-name>
fiftyone zoo models embed <url> \
    <dataset-name> <embeddings-field> --model-name <model-name>
```

<a id="cli-fiftyone-zoo-models-delete"></a>

### Delete zoo models

Deletes the local copy of the zoo model on disk.

```text
fiftyone zoo models delete [-h] NAME
```

**Arguments**

```text
positional arguments:
  NAME        the name of the model

optional arguments:
  -h, --help  show this help message and exit
```

**Examples**

```shell
# Delete the zoo model from disk
fiftyone zoo models delete <name>
```

<a id="cli-fiftyone-zoo-models-list-sources"></a>

### List zoo model sources

Lists remote zoo model sources that are registered locally.

```text
fiftyone zoo models list-sources [-h]
```

**Examples**

```shell
# Lists the registered remote zoo model sources
fiftyone zoo models list-sources
```

<a id="cli-fiftyone-zoo-models-register-source"></a>

### Register zoo model sources

Registers a remote source of zoo models.

You can provide any of the following formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`
- a publicly accessible URL of an archive (eg zip or tar) file

#### NOTE
To download from a private GitHub repository that you have access to,
provide your GitHub personal access token by setting the `GITHUB_TOKEN`
environment variable.

```text
fiftyone zoo models register-source [-h] [-o] URL_OR_GH_REPO
```

**Arguments**

```text
positional arguments:
  URL_OR_GH_REPO   the remote source to register

optional arguments:
  -h, --help       show this help message and exit
  -o, --overwrite  whether to overwrite any existing files
```

**Examples**

```shell
# Register a remote zoo model source
fiftyone zoo models register-source https://github.com/<user>/<repo>
fiftyone zoo models register-source <url>
```

<a id="cli-fiftyone-zoo-models-delete-source"></a>

### Delete zoo model sources

Deletes the remote source and all downloaded models associated with it.

You can provide any of the following formats:

- a GitHub repo URL like `https://github.com/<user>/<repo>`
- a GitHub ref like `https://github.com/<user>/<repo>/tree/<branch>` or
  `https://github.com/<user>/<repo>/commit/<commit>`
- a GitHub ref string like `<user>/<repo>[/<ref>]`
- a publicly accessible URL of an archive (eg zip or tar) file

```text
fiftyone zoo models delete-source [-h] URL_OR_GH_REPO
```

**Arguments**

```text
positional arguments:
  URL_OR_GH_REPO   the remote source to delete

optional arguments:
  -h, --help       show this help message and exit
```

**Examples**

```shell
# Delete a remote zoo model source
fiftyone zoo models delete-source https://github.com/<user>/<repo>
fiftyone zoo models delete-source <url>
```
