class LegacyFiftyOneDatasetExporter(GenericSampleDatasetExporter): (source)
Constructor: LegacyFiftyOneDatasetExporter(export_dir, export_media, rel_dir, chunk_size, ...)
Legacy exporter that writes an entire FiftyOne dataset to disk in a serialized JSON format along with its source media.
Warning
The fiftyone.types.FiftyOneDataset
format was upgraded in
fiftyone==0.8 and this exporter is now deprecated. The new exporter
is FiftyOneDatasetExporter
.
Parameters | |
export | the directory to write the export |
export | defines how to export the raw media contained in the dataset. The supported values are:
|
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_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 | 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 |
abs | whether to store absolute paths to the media in the exported labels |
export | whether to include saved views in the export. Only applicable when exporting full datasets |
export | whether to include annotation/brain/evaluation runs in the export. Only applicable when exporting full datasets |
export | whether to include saved workspaces in the export. Only applicable when exporting full datasets |
pretty | whether to render the JSON in human readable format with newlines and indentations |
Method | __init__ |
Undocumented |
Method | close |
Performs any necessary actions after the last sample has been exported. |
Method | export |
Exports the given sample to the dataset. |
Method | log |
Logs any relevant information about the fiftyone.core.collections.SampleCollection whose samples will be exported. |
Method | setup |
Performs any necessary setup before exporting the first sample in the dataset. |
Instance Variable | abs |
Undocumented |
Instance Variable | chunk |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | pretty |
Undocumented |
Instance Variable | rel |
Undocumented |
Method | _export |
Undocumented |
Method | _export |
Undocumented |
Method | _export |
Undocumented |
Method | _get |
Undocumented |
Instance Variable | _anno |
Undocumented |
Instance Variable | _brain |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _eval |
Undocumented |
Instance Variable | _fields |
Undocumented |
Instance Variable | _frame |
Undocumented |
Instance Variable | _media |
Undocumented |
Instance Variable | _media |
Undocumented |
Instance Variable | _media |
Undocumented |
Instance Variable | _metadata |
Undocumented |
Instance Variable | _metadata |
Undocumented |
Instance Variable | _runs |
Undocumented |
Instance Variable | _samples |
Undocumented |
Instance Variable | _samples |
Undocumented |
Inherited from DatasetExporter
(via GenericSampleDatasetExporter
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Undocumented
Performs any necessary actions after the last sample has been exported.
This method is called when the exporter's context manager interface is
exited, DatasetExporter.__exit__
.
Parameters | |
*args | the arguments to DatasetExporter.__exit__ |
Logs any relevant information about the
fiftyone.core.collections.SampleCollection
whose samples will
be exported.
Subclasses can optionally implement this method if their export format
can record information such as the
fiftyone.core.collections.SampleCollection.info
of the
collection being exported.
By convention, this method must be optional; i.e., if it is not called
before the first call to export_sample
, then the exporter must
make do without any information about the
fiftyone.core.collections.SampleCollection
(which may not be
available, for example, if the samples being exported are not stored in
a collection).
Parameters | |
sample | the
fiftyone.core.collections.SampleCollection whose
samples will be exported |
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__
.