class MediaExporter(object): (source)
Known subclasses: fiftyone.utils.data.exporters.ImageExporter
, fiftyone.utils.data.exporters.VideoExporter
Constructor: MediaExporter(export_mode, export_path, rel_dir, chunk_size, ...)
Base class for DatasetExporter
utilities that provide support
for populating a directory or manifest of media files.
This class is designed for populating a single, flat directory or manifest of media files, and automatically takes care of things like name clashes as necessary.
The export strategy used is defined by the export_mode parameter, and users of this class can restrict the available options via the supported_modes parameter.
Parameters | |
export | the export mode to use. The supported values are:
|
export | the location to export the media. Can be any of the following:
|
rel | an 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_path 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 | an 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 |
supported | an optional tuple specifying a subset of the export_mode values that are allowed |
default | the file extension to use when generating default output paths |
ignore | whether to omit file extensions when generating UUIDs for files |
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | close |
Performs any necessary actions to complete the export. |
Method | export |
Exports the given media. |
Method | setup |
Performs necessary setup to begin exporting media. |
Instance Variable | chunk |
Undocumented |
Instance Variable | default |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | ignore |
Undocumented |
Instance Variable | rel |
Undocumented |
Instance Variable | supported |
Undocumented |
Method | _get |
Undocumented |
Method | _handle |
Undocumented |
Method | _write |
Undocumented |
Instance Variable | _filename |
Undocumented |
Instance Variable | _manifest |
Undocumented |
Instance Variable | _manifest |
Undocumented |
fiftyone.utils.data.exporters.ImageExporter
, fiftyone.utils.data.exporters.VideoExporter
Undocumented
Exports the given media.
Parameters | |
media | the media or path to the media on disk |
outpath:None | a manually-specified location to which to export
the media. By default, the media will be exported into
export_path |
Returns | |
a tuple of |
|
Performs necessary setup to begin exporting media.
DatasetExporter
classes using this class should invoke this
method in DatasetExporter.setup
.
fiftyone.utils.data.exporters.ImageExporter
, fiftyone.utils.data.exporters.VideoExporter
Undocumented