class documentation

Exporter that writes an entire FiftyOne dataset to disk in a serialized JSON format along with its source media.

See :ref:`this page <FiftyOneDataset-export>` for format details.

Parameters
export_dirthe directory to write the export
export_media

defines how to export the raw media contained in the dataset. The supported values are:

  • True (default): copy all media files into the export directory
  • False: don't export media
  • "move": move media files into the export directory
  • "symlink": create symlinks to each media file in the export directory
rel_diran optional relative directory to strip from each input filepath to generate a unique identifier for each media. When exporting media, this identifier is joined with export_dir to generate an output path for each exported media. This argument allows for populating nested subdirectories that match the shape of the input paths. The path is converted to an absolute path (if necessary) via fiftyone.core.storage.normalize_path
chunk_sizean optional chunk size to use when exporting media files. If provided, media files will be nested in subdirectories of the output directory with at most this many media files per subdirectory. Has no effect if a rel_dir is provided
export_saved_viewswhether to include saved views in the export. Only applicable when exporting full datasets
export_runswhether to include annotation/brain/evaluation runs in the export. Only applicable when exporting full datasets
export_workspaceswhether to include saved workspaces in the export. Only applicable when exporting full datasets
use_dirswhether to export metadata into directories of per sample/frame files
orderedwhether to preserve the order of the exported collections
Method __init__ Undocumented
Method export_samples Exports the given sample collection.
Method setup Performs any necessary setup before exporting the first sample in the dataset.
Instance Variable chunk_size Undocumented
Instance Variable export_media Undocumented
Instance Variable export_runs Undocumented
Instance Variable export_saved_views Undocumented
Instance Variable export_workspaces Undocumented
Instance Variable ordered Undocumented
Instance Variable rel_dir Undocumented
Instance Variable use_dirs Undocumented
Method _export_media_field Undocumented
Method _export_media_fields Undocumented
Method _get_media_field_exporter Undocumented
Instance Variable _anno_dir Undocumented
Instance Variable _brain_dir Undocumented
Instance Variable _data_dir Undocumented
Instance Variable _eval_dir Undocumented
Instance Variable _fields_dir Undocumented
Instance Variable _frames_path Undocumented
Instance Variable _media_exporter Undocumented
Instance Variable _media_field_exporters Undocumented
Instance Variable _media_fields Undocumented
Instance Variable _metadata_path Undocumented
Instance Variable _runs_dir Undocumented
Instance Variable _samples_path Undocumented

Inherited from BatchDatasetExporter:

Method export_sample Exports the given sample to the dataset.

Inherited from DatasetExporter (via BatchDatasetExporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
Method close Performs any necessary actions after the last sample has been exported.
Method log_collection Logs any relevant information about the fiftyone.core.collections.SampleCollection whose samples will be exported.
def __init__(self, export_dir, export_media=None, rel_dir=None, chunk_size=None, export_saved_views=True, export_runs=True, export_workspaces=True, use_dirs=False, ordered=True): (source)
def export_samples(self, sample_collection, progress=None): (source)

Exports the given sample collection.

Parameters
sample_collectiona fiftyone.core.collections.SampleCollection
progress:Nonewhether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead
def setup(self): (source)

Performs any necessary setup before exporting the first sample in the dataset.

This method is called when the exporter's context manager interface is entered, DatasetExporter.__enter__.

chunk_size: None = (source)

Undocumented

export_media: None = (source)

Undocumented

export_runs: True = (source)

Undocumented

export_saved_views: True = (source)

Undocumented

export_workspaces: True = (source)

Undocumented

Undocumented

Undocumented

Undocumented

def _export_media_field(self, d, field_name, key=None): (source)

Undocumented

def _export_media_fields(self, sd): (source)

Undocumented

def _get_media_field_exporter(self, field_name): (source)

Undocumented

_anno_dir = (source)

Undocumented

_brain_dir = (source)

Undocumented

_data_dir = (source)

Undocumented

_eval_dir = (source)

Undocumented

_fields_dir = (source)

Undocumented

_frames_path = (source)

Undocumented

_media_exporter = (source)

Undocumented

_media_field_exporters: dict = (source)

Undocumented

_media_fields = (source)

Undocumented

_metadata_path = (source)

Undocumented

_runs_dir = (source)

Undocumented

_samples_path = (source)

Undocumented