fiftyone.utils.lerobot_export#
LeRobotDataset v3 export utilities.
Classes:
|
Exports selected logical episodes as a self-contained v3 dataset. |
- class fiftyone.utils.lerobot_export.LeRobotDatasetExporter(export_dir, export_media=None)#
Bases:
BatchDatasetExporterExports selected logical episodes as a self-contained v3 dataset.
- Parameters:
export_dir β the destination dataset root
export_media (None) β must be
True; this is the only mode that creates a valid LeRobot dataset
Attributes:
Methods:
export_samples(sample_collection[,Β progress])Exports the given sample collection.
close(*args)Performs any necessary actions after the last sample has been exported.
export_sample(*args,Β **kwargs)Exports the given sample to the dataset.
log_collection(sample_collection)Logs any relevant information about the
fiftyone.core.collections.SampleCollectionwhose samples will be exported.setup()Performs any necessary setup before exporting the first sample in the dataset.
- supports_media_references = True#
- export_samples(sample_collection, progress=None)#
Exports the given sample collection.
- Parameters:
sample_collection β a
fiftyone.core.collections.SampleCollectionprogress (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
- close(*args)#
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__()
- export_sample(*args, **kwargs)#
Exports the given sample to the dataset.
- Parameters:
*args β subclass-specific positional arguments
**kwargs β subclass-specific keyword arguments
- log_collection(sample_collection)#
Logs any relevant information about the
fiftyone.core.collections.SampleCollectionwhose 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 thefiftyone.core.collections.SampleCollection(which may not be available, for example, if the samples being exported are not stored in a collection).- Parameters:
sample_collection β the
fiftyone.core.collections.SampleCollectionwhose samples will be exported
- setup()#
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__().