fiftyone.core.cli¶
Definition of the fiftyone command-line interface (CLI).
Classes:
Tools for working with the FiftyOne annotation API. |
|
Tools for working with your FiftyOne annotation config. |
|
Tools for working with the FiftyOne App. |
|
Tools for working with your FiftyOne App config. |
|
Connect to a remote FiftyOne App in your web browser. |
|
Launch the FiftyOne App. |
|
View datasets in the App without persisting them to the database. |
|
Tools for working with the FiftyOne Brain. |
|
Tools for working with your FiftyOne Brain config. |
|
Interface for defining commands. |
|
Populates the metadata field of all samples in the dataset. |
|
Tools for working with your FiftyOne config. |
|
Print constants from fiftyone.constants. |
|
Convert datasets on disk between supported formats. |
|
Tools for working with the FiftyOne Dataset Zoo. |
|
Deletes the local copy of the zoo dataset on disk. |
|
Download zoo datasets. |
|
Locate the downloaded zoo dataset on disk. |
|
Print information about datasets in the FiftyOne Dataset Zoo. |
|
List datasets in the FiftyOne Dataset Zoo. |
|
Load zoo datasets as persistent FiftyOne datasets. |
|
Tools for working with FiftyOne datasets. |
|
Tools for creating FiftyOne datasets. |
|
Delete FiftyOne datasets. |
|
Renders annotated versions of samples in FiftyOne datasets to disk. |
|
Export FiftyOne datasets to disk in supported formats. |
|
Prints the first few samples in a FiftyOne dataset. |
|
Print information about FiftyOne datasets. |
|
List FiftyOne datasets. |
|
Rename FiftyOne datasets. |
|
Print stats about FiftyOne datasets on disk. |
|
Stream samples in a FiftyOne dataset to the terminal. |
|
Prints the last few samples in a FiftyOne dataset. |
|
The FiftyOne command-line interface. |
|
Tools for migrating the FiftyOne database. |
|
Apply zoo models to datasets. |
|
Tools for working with the FiftyOne Model Zoo. |
|
Deletes the local copy of the zoo model on disk. |
|
Download zoo models. |
|
Generate embeddings for datasets with zoo models. |
|
Locate the downloaded zoo model on disk. |
|
Print information about models in the FiftyOne Model Zoo. |
|
List datasets in the FiftyOne Model Zoo. |
|
Handles package requirements for zoo models. |
|
Launch a FiftyOne quickstart. |
|
Transforms the images in a dataset per the specified parameters. |
|
Transforms the videos in a dataset per the specified parameters. |
|
FiftyOne utilities. |
|
Tools for working with the FiftyOne Zoo. |
Functions:
|
Executes the fiftyone tool with the given command-line args. |
-
class
fiftyone.core.cli.
Command
¶ Bases:
object
Interface for defining commands.
Command instances must implement the setup() method, and they should implement the execute() method if they perform any functionality beyond defining subparsers.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
FiftyOneCommand
¶ Bases:
fiftyone.core.cli.Command
The FiftyOne command-line interface.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
QuickstartCommand
¶ Bases:
fiftyone.core.cli.Command
Launch a FiftyOne quickstart.
Examples:
# Launch the quickstart fiftyone quickstart # Launch the quickstart with a video dataset fiftyone quickstart --video # Launch the quickstart as a remote session fiftyone quickstart --remote # Launch the quickstart in a desktop App session fiftyone quickstart --desktop
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ConfigCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with your FiftyOne config.
Examples:
# Print your entire config fiftyone config # Print a specific config field fiftyone config <field> # Print the location of your config on disk (if one exists) fiftyone config --locate
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ConstantsCommand
¶ Bases:
fiftyone.core.cli.Command
Print constants from fiftyone.constants.
Examples:
# Print all constants fiftyone constants # Print a specific constant fiftyone constants <CONSTANT>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ConvertCommand
¶ Bases:
fiftyone.core.cli.Command
Convert datasets on disk between supported formats.
Examples:
# 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 # 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 # 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
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with FiftyOne datasets.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsListCommand
¶ Bases:
fiftyone.core.cli.Command
List FiftyOne datasets.
Examples:
# List available datasets fiftyone datasets list
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsInfoCommand
¶ Bases:
fiftyone.core.cli.Command
Print information about FiftyOne datasets.
Examples:
# Print basic information about all datasets fiftyone datasets info fiftyone datasets info --sort-by created_at fiftyone datasets info --sort-by name --reverse # Print information about a specific dataset fiftyone datasets info <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsStatsCommand
¶ Bases:
fiftyone.core.cli.Command
Print stats about FiftyOne datasets on disk.
Examples:
# Print stats about the given dataset on disk fiftyone datasets stats <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsCreateCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for creating FiftyOne datasets.
Examples:
# Create a dataset from the given data on disk fiftyone datasets create \ --name <name> --dataset-dir <dataset-dir> --type <type> # 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 # Create a dataset from the given samples JSON file fiftyone datasets create --json-path <json-path>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsHeadCommand
¶ Bases:
fiftyone.core.cli.Command
Prints the first few samples in a FiftyOne dataset.
Examples:
# Print the first few samples in a dataset fiftyone datasets head <name> # Print the given number of samples from the head of a dataset fiftyone datasets head <name> --num-samples <num-samples>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsTailCommand
¶ Bases:
fiftyone.core.cli.Command
Prints the last few samples in a FiftyOne dataset.
Examples:
# Print the last few samples in a dataset fiftyone datasets tail <name> # Print the given number of samples from the tail of a dataset fiftyone datasets tail <name> --num-samples <num-samples>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsStreamCommand
¶ Bases:
fiftyone.core.cli.Command
Stream samples in a FiftyOne dataset to the terminal.
Examples:
# Stream the samples of the dataset to the terminal fiftyone datasets stream <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsExportCommand
¶ Bases:
fiftyone.core.cli.Command
Export FiftyOne datasets to disk in supported formats.
Examples:
# Export the dataset to disk in the specified format fiftyone datasets export <name> \ --export-dir <export-dir> --type <type> --label-field <label-field> # Export the dataset to disk in JSON format fiftyone datasets export <name> --json-path <json-path> # Perform a customized export of a dataset fiftyone datasets export <name> \ --type <type> \ --kwargs labels_path=/path/for/labels.json
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsDrawCommand
¶ Bases:
fiftyone.core.cli.Command
Renders annotated versions of samples in FiftyOne datasets to disk.
Examples:
# 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>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsRenameCommand
¶ Bases:
fiftyone.core.cli.Command
Rename FiftyOne datasets.
Examples:
# Rename the dataset fiftyone datasets rename <old-name> <new-name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetsDeleteCommand
¶ Bases:
fiftyone.core.cli.Command
Delete FiftyOne datasets.
Examples:
# Delete the datasets with the given name(s) fiftyone datasets delete <name1> <name2> ... # Delete the datasets whose names match the given glob pattern fiftyone datasets delete --glob-patt <glob-patt> # Delete all non-persistent datasets fiftyone datasets delete --non-persistent
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AnnotationCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with the FiftyOne annotation API.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AnnotationConfigCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with your FiftyOne annotation config.
Examples:
# Print your entire annotation config fiftyone annotation config # Print a specific annotation config field fiftyone annotation config <field> # Print the location of your annotation config on disk (if one exists) fiftyone annotation config --locate
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AppCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with the FiftyOne App.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AppConfigCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with your FiftyOne App config.
Examples:
# Print your entire App config fiftyone app config # Print a specific App config field fiftyone app config <field> # Print the location of your App config on disk (if one exists) fiftyone app config --locate
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AppLaunchCommand
¶ Bases:
fiftyone.core.cli.Command
Launch the FiftyOne App.
Examples:
# Launch the App fiftyone app launch # Launch the App with the given dataset loaded fiftyone app launch <name> # Launch a remote App session fiftyone app launch ... --remote # Launch a desktop App session fiftyone app launch ... --desktop
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AppViewCommand
¶ Bases:
fiftyone.core.cli.Command
View datasets in the App without persisting them to the database.
Examples:
# View a dataset stored on disk in the App fiftyone app view --dataset-dir <dataset-dir> --type <type> # View a zoo dataset in the App fiftyone app view --zoo-dataset <name> --splits <split1> ... # View a directory of images in the App fiftyone app view --images-dir <images-dir> # View a glob pattern of images in the App fiftyone app view --images-patt <images-patt> # View a directory of videos in the App fiftyone app view --videos-dir <videos-dir> # View a glob pattern of videos in the App fiftyone app view --videos-patt <videos-patt> # View a dataset stored in JSON format on disk in the App fiftyone app view --json-path <json-path> # View the dataset in a remote App session fiftyone app view ... --remote # View the dataset using the desktop App fiftyone app view ... --desktop # View a random subset of the data stored on disk in the App fiftyone app view ... --kwargs max_samples=50 shuffle=True
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
AppConnectCommand
¶ Bases:
fiftyone.core.cli.Command
Connect to a remote FiftyOne App in your web browser.
Examples:
# Connect to a remote App with port forwarding already configured fiftyone app connect # Connect to a remote App session fiftyone app connect --destination <destination> --port <port> # Connect to a remote App session using an ssh key fiftyone app connect ... --ssh-key <path/to/key> # Connect to a remote App using a custom local port fiftyone app connect ... --local-port <port>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
BrainCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with the FiftyOne Brain.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
BrainConfigCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with your FiftyOne Brain config.
Examples:
# Print your entire brain config fiftyone brain config # Print a specific brain config field fiftyone brain config <field> # Print the location of your brain config on disk (if one exists) fiftyone brain config --locate
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ZooCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with the FiftyOne Zoo.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with the FiftyOne Dataset Zoo.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooListCommand
¶ Bases:
fiftyone.core.cli.Command
List datasets in the FiftyOne Dataset Zoo.
Examples:
# List available datasets fiftyone zoo datasets list # List available datasets (names only) fiftyone zoo datasets list --names-only # List downloaded datasets fiftyone zoo datasets list --downloaded-only # List available datasets from the given source fiftyone zoo datasets list --source <source> # List available datasets with the given tag fiftyone zoo datasets list --tags <tag>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooFindCommand
¶ Bases:
fiftyone.core.cli.Command
Locate the downloaded zoo dataset on disk.
Examples:
# Print the location of the downloaded zoo dataset on disk fiftyone zoo datasets find <name> # Print the location of a specific split of the dataset fiftyone zoo datasets find <name> --split <split>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooInfoCommand
¶ Bases:
fiftyone.core.cli.Command
Print information about datasets in the FiftyOne Dataset Zoo.
Examples:
# Print information about a zoo dataset fiftyone zoo datasets info <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooDownloadCommand
¶ Bases:
fiftyone.core.cli.Command
Download zoo datasets.
Examples:
# Download the entire zoo dataset fiftyone zoo datasets download <name> # Download the specified split(s) of the zoo dataset fiftyone zoo datasets download <name> --splits <split1> ... # Download the zoo dataset to a custom directory fiftyone zoo datasets download <name> --dataset-dir <dataset-dir> # Download a zoo dataset that requires extra keyword arguments fiftyone zoo datasets download <name> \ --kwargs source_dir=/path/to/source/files
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooLoadCommand
¶ Bases:
fiftyone.core.cli.Command
Load zoo datasets as persistent FiftyOne datasets.
Examples:
# Load the zoo dataset with the given name fiftyone zoo datasets load <name> # Load the specified split(s) of the zoo dataset fiftyone zoo datasets load <name> --splits <split1> ... # Load the zoo dataset with a custom name fiftyone zoo datasets load <name> --dataset-name <dataset-name> # Load the zoo dataset from a custom directory fiftyone zoo datasets load <name> --dataset-dir <dataset-dir> # Load a zoo dataset that requires custom keyword arguments fiftyone zoo datasets load <name> \ --kwargs source_dir=/path/to/source_files # Load a random subset of a zoo dataset fiftyone zoo datasets load <name> \ --kwargs max_samples=50 shuffle=True
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
DatasetZooDeleteCommand
¶ Bases:
fiftyone.core.cli.Command
Deletes the local copy of the zoo dataset on disk.
Examples:
# Delete an entire zoo dataset from disk fiftyone zoo datasets delete <name> # Delete a specific split of a zoo dataset from disk fiftyone zoo datasets delete <name> --split <split>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for working with the FiftyOne Model Zoo.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooListCommand
¶ Bases:
fiftyone.core.cli.Command
List datasets in the FiftyOne Model Zoo.
Examples:
# List available models fiftyone zoo models list # List available models (names only) fiftyone zoo models list --names-only # List downloaded models fiftyone zoo models list --downloaded-only # List available models with the given tag fiftyone zoo models list --tags <tag>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooFindCommand
¶ Bases:
fiftyone.core.cli.Command
Locate the downloaded zoo model on disk.
Examples:
# Print the location of the downloaded zoo model on disk fiftyone zoo models find <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooInfoCommand
¶ Bases:
fiftyone.core.cli.Command
Print information about models in the FiftyOne Model Zoo.
Examples:
# Print information about a zoo model fiftyone zoo models info <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooRequirementsCommand
¶ Bases:
fiftyone.core.cli.Command
Handles package requirements for zoo models.
Examples:
# Print requirements for a zoo model fiftyone zoo models requirements <name> --print # Install any requirements for the zoo model fiftyone zoo models requirements <name> --install # Ensures that the requirements for the zoo model are satisfied fiftyone zoo models requirements <name> --ensure
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooDownloadCommand
¶ Bases:
fiftyone.core.cli.Command
Download zoo models.
Examples:
# Download the zoo model fiftyone zoo models download <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooApplyCommand
¶ Bases:
fiftyone.core.cli.Command
Apply zoo models to datasets.
Examples:
# Apply the zoo model to the dataset fiftyone zoo models apply <model-name> <dataset-name> <label-field> # 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
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooEmbedCommand
¶ Bases:
fiftyone.core.cli.Command
Generate embeddings for datasets with zoo models.
Examples:
# Generate embeddings for the dataset with the zoo model fiftyone zoo models embed <model-name> <dataset-name> <embeddings-field>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ModelZooDeleteCommand
¶ Bases:
fiftyone.core.cli.Command
Deletes the local copy of the zoo model on disk.
Examples:
# Delete the zoo model from disk fiftyone zoo models delete <name>
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
MigrateCommand
¶ Bases:
fiftyone.core.cli.Command
Tools for migrating the FiftyOne database.
See this page for more information about migrating FiftyOne deployments.
Examples:
# Print information about the current revisions of all datasets fiftyone migrate --info # Migrate the database and all datasets to the current client version fiftyone migrate --all # Migrate to a specific revision fiftyone migrate --all --version <VERSION> # Migrate a specific dataset fiftyone migrate ... --dataset-name <DATASET_NAME> # Update the database version without migrating any existing datasets fiftyone migrate
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
UtilsCommand
¶ Bases:
fiftyone.core.cli.Command
FiftyOne utilities.
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
ComputeMetadataCommand
¶ Bases:
fiftyone.core.cli.Command
Populates the metadata field of all samples in the dataset.
Examples:
# Populate all missing `metadata` sample fields fiftyone utils compute-metadata <dataset-name> # (Re)-populate the `metadata` field for all samples fiftyone utils compute-metadata <dataset-name> --overwrite
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
TransformImagesCommand
¶ Bases:
fiftyone.core.cli.Command
Transforms the images in a dataset per the specified parameters.
Examples:
# Convert the images in the dataset to PNGs fiftyone utils transform-images <dataset-name> --ext .png --delete-originals # Ensure that no images in the dataset exceed 1920 x 1080 fiftyone utils transform-images <dataset-name> --max-size 1920,1080
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
class
fiftyone.core.cli.
TransformVideosCommand
¶ Bases:
fiftyone.core.cli.Command
Transforms the videos in a dataset per the specified parameters.
Examples:
# Re-encode the videos in the dataset as H.264 MP4s fiftyone utils transform-videos <dataset-name> --reencode # 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
Methods:
execute
(parser, args)Executes the command on the given args.
setup
(parser)Setup the command-line arguments for the command.
-
static
setup
(parser)¶ Setup the command-line arguments for the command.
- Parameters
parser – an argparse.ArgumentParser instance
-
static
execute
(parser, args)¶ Executes the command on the given args.
- Parameters
parser – the argparse.ArgumentParser instance for the command
args – an argparse.Namespace instance containing the arguments for the command
-
static
-
fiftyone.core.cli.
main
()¶ Executes the fiftyone tool with the given command-line args.