class documentation

class DatasetsExportCommand(Command): (source)

View In Hierarchy

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>

# 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

# Perform a customized export of a dataset
fiftyone datasets export <name> \
    --type <type> \
    --kwargs labels_path=/path/for/labels.json
Static Method execute Executes the command on the given args.
Static Method setup Setup the command-line arguments for the command.
@staticmethod
def execute(parser, args): (source)

Executes the command on the given args.

Parameters
parserthe argparse.ArgumentParser instance for the command
argsan argparse.Namespace instance containing the arguments for the command
@staticmethod
def setup(parser): (source)

Setup the command-line arguments for the command.

Parameters
parseran argparse.ArgumentParser instance