Dataset exporters.
Class |
|
Base interface for exporters that export entire fiftyone.core.collections.SampleCollection instances in a single batch. |
Class |
|
Base interface for exporting datasets. |
Class |
|
Mixin for DatasetExporter classes that provides convenience methods for parsing the data_path, labels_path, and export_media parameters supported by many exporters. |
Class |
|
Exporter that writes an entire FiftyOne dataset to disk in a serialized JSON format along with its source media. |
Class |
|
Exporter that writes an image classification dataset to disk in a simple JSON format. |
Class |
|
Exporter that writes an image detection dataset to disk in a simple JSON format. |
Class |
|
Exporter that writes a labeled image dataset to disk with labels stored in ETA ImageLabels format. |
Class |
|
Exporter that writes a temporal video detection dataset to disk in a simple JSON format. |
Class |
|
Exporter that writes a labeled video dataset with labels stored in ETA VideoLabels format. |
Class |
|
Interface for exporting datasets of arbitrary fiftyone.core.sample.Sample instances. |
Class |
|
Interface for exporting grouped datasets. |
Class |
|
Exporter that writes an image classification directory tree to disk. |
Class |
|
Exporter that writes a directory of images to disk. |
Class |
|
Utility class for DatasetExporter instances that export images. |
Class |
|
Exporter that writes an image segmentation dataset to disk. |
Class |
|
Interface for exporting datasets of labeled image samples. |
Class |
|
Interface for exporting datasets of labeled video samples. |
Class |
|
Legacy exporter that writes an entire FiftyOne dataset to disk in a serialized JSON format along with its source media. |
Class |
|
Exporter that writes a directory of media files of arbitrary type to disk. |
Class |
|
Base class for DatasetExporter utilities that provide support for populating a directory or manifest of media files. |
Class |
|
Interface for exporting datasets of unlabeled image samples. |
Class |
|
Interface for exporting datasets of unlabeled samples. |
Class |
|
Interface for exporting datasets of unlabeled video samples. |
Class |
|
Exporter that writes a video classification directory tree to disk. |
Class |
|
Exporter that writes a directory of videos to disk. |
Class |
|
Utility class for DatasetExporter instances that export videos. |
Function | build |
Builds the DatasetExporter instance for the given parameters. |
Function | export |
Exports the given samples to disk. |
Function | write |
Writes the samples to disk as a dataset in the specified format. |
Variable | logger |
Undocumented |
Function | _check |
Undocumented |
Function | _check |
Undocumented |
Function | _classification |
Undocumented |
Function | _export |
Undocumented |
Function | _export |
Undocumented |
Function | _export |
Undocumented |
Function | _export |
Undocumented |
Function | _make |
Undocumented |
Function | _make |
Undocumented |
Function | _parse |
Undocumented |
Function | _parse |
Undocumented |
Function | _parse |
Undocumented |
Function | _parse |
Undocumented |
Function | _to |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Builds the DatasetExporter
instance for the given parameters.
Parameters | |
dataset | the fiftyone.types.Dataset type |
stripTrue | whether to exclude None-valued items from kwargs |
warnTrue | whether to issue warnings for any non-None unused parameters encountered |
**kwargs | keyword arguments to pass to the dataset exporter's constructor via DatasetExporter(**kwargs) |
Returns | |
a tuple of |
|
Exports the given samples to disk.
You can perform exports with this method via the following basic patterns:
- Provide export_dir and dataset_type to export the content to a directory in the default layout for the specified format, as documented in :ref:`this page <exporting-datasets>`
- Provide dataset_type along with data_path, labels_path, and/or export_media to directly specify where to export the source media and/or labels (if applicable) in your desired format. This syntax provides the flexibility to, for example, perform workflows like labels-only exports
- Provide a dataset_exporter to which to feed samples to perform a fully-customized export
In all workflows, the remaining parameters of this method can be provided to further configure the export.
See :ref:`this page <exporting-datasets>` for more information about the available export formats and examples of using this method.
See :ref:`this guide <custom-dataset-exporter>` for more details about
exporting datasets in custom formats by defining your own
fiftyone.utils.data.exporters.DatasetExporter
.
This method will automatically coerce the data to match the requested export in the following cases:
- When exporting in either an unlabeled image or image classification
format, if a spatial label field is provided
(
fiftyone.core.labels.Detection
,fiftyone.core.labels.Detections
,fiftyone.core.labels.Polyline
, orfiftyone.core.labels.Polylines
), then the image patches of the provided samples will be exported - When exporting in labeled image dataset formats that expect list-type
labels (
fiftyone.core.labels.Classifications
,fiftyone.core.labels.Detections
,fiftyone.core.labels.Keypoints
, orfiftyone.core.labels.Polylines
), if a label field contains labels in non-list format (e.g.,fiftyone.core.labels.Classification
), the labels will be automatically upgraded to single-label lists - When exporting in labeled image dataset formats that expect
fiftyone.core.labels.Detections
labels, if afiftyone.core.labels.Classification
field is provided, the labels will be automatically upgraded to detections that span the entire images
Parameters | |
samples | a fiftyone.core.collections.SampleCollection |
exportNone | the directory to which to export the samples in format dataset_type |
datasetNone | the fiftyone.types.Dataset type to write |
dataNone | an optional parameter that enables explicit control over the location of the exported media for certain export formats. Can be any of the following:
If None, a default value of this parameter will be chosen based on the value of the export_media parameter. Note that this parameter is not applicable to certain export formats such as binary types like TF records |
labelsNone | an optional parameter that enables explicit control over the location of the exported labels. Only applicable when exporting in certain labeled dataset formats. Can be any of the following:
For labeled datasets, the default value of this parameter will be chosen based on the export format so that the labels will be exported into export_dir |
exportNone | controls how to export the raw media. The supported values are:
If None, an appropriate default value of this parameter will be chosen based on the value of the data_path parameter. Note that some dataset formats may not support certain values for this parameter (e.g., when exporting in binary formats such as TF records, "symlink" is not an option) |
relNone | 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 data_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 |
datasetNone | a DatasetExporter to use to write the
dataset |
labelNone | the name of the label field to export, or a
dictionary mapping field names to output keys describing the label
fields to export. Only applicable if dataset_exporter is a
LabeledImageDatasetExporter or
LabeledVideoDatasetExporter , or if you are exporting image
patches |
frameNone | the name of the frame label field to export,
or a dictionary mapping field names to output keys describing the
frame label fields to export. Only applicable if
dataset_exporter is a LabeledVideoDatasetExporter |
progress:None | whether 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 |
numNone | the number of samples in samples. If omitted, this is computed (if possible) via len(samples) if needed for progress tracking |
**kwargs | optional keyword arguments to pass to the dataset exporter's
constructor. If you are exporting image patches, this can also
contain keyword arguments for
fiftyone.utils.patches.ImagePatchesExtractor |
Writes the samples to disk as a dataset in the specified format.
Parameters | |
samples | an iterable of samples that can be parsed by sample_parser |
sample | a fiftyone.utils.data.parsers.SampleParser to
use to parse the samples |
dataset | a DatasetExporter to use to write the
dataset |
sampleNone | the
fiftyone.core.collections.SampleCollection from which
samples were extracted. If samples is itself a
fiftyone.core.collections.SampleCollection , this parameter
defaults to samples. This parameter is optional and is only
passed to DatasetExporter.log_collection |
progress:None | whether 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 |
numNone | the number of samples in samples. If omitted, this is computed (if possible) via len(samples) if needed for progress tracking |
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented