datumaro.plugins.data_formats.datumaro_binary#

class datumaro.plugins.data_formats.datumaro_binary.DatumaroBinaryBase(path: str, *, encryption_key: Optional[bytes] = None, num_workers: int = 0, subset: Optional[str] = None, ctx: Optional[ImportContext] = None)[source]#

Bases: DatumaroBase

Parameters:
  • path – Directory path to import DatumaroBinary format dataset

  • encryption_key – If the dataset is encrypted, it (secret key) is needed to import the dataset.

  • num_workers – The number of multi-processing workers for import. If num_workers = 0, do not use multiprocessing.

property is_stream: bool#

Boolean indicating whether the dataset is a stream

If the dataset is a stream, the dataset item is generated on demand from its iterator.

infos()[source]#

Returns meta-info of dataset.

categories()[source]#

Returns metainfo about dataset labels.

media_type()[source]#

Returns media type of the dataset items.

All the items are supposed to have the same media type. Supposed to be constant and known immediately after the object construction (i.e. doesn’t require dataset iteration).

class datumaro.plugins.data_formats.datumaro_binary.DatumaroBinaryExporter(extractor: IDataset, save_dir: str, *, save_media: Optional[bool] = None, image_ext: Optional[str] = None, default_image_ext: Optional[str] = None, save_dataset_meta: bool = False, ctx: Optional[ExportContext] = None, encryption_key: Optional[bytes] = None, no_media_encryption: bool = False, encryption: bool = False, num_workers: int = 0, max_blob_size: int = 1048576, **kwargs)[source]#

Bases: DatumaroExporter

Parameters:
  • encryption_key – If provided, the dataset is encrypted with this key for export.

  • no_media_encryption – If true and encryption is enabled, do not encrypt media files and only encrypt annotation files.

  • encryption – If true and encryption_key is None, generate a random secret key.

  • num_workers – The number of multi-processing workers for export. If num_workers = 0, do not use multiprocessing.

  • max_blob_size – The maximum size of DatasetItem serialization blob. Changing from the default is not recommended.

DEFAULT_IMAGE_EXT = '.jpg'#
PATH_CLS#

alias of DatumaroBinaryPath

classmethod build_cmdline_parser(**kwargs)[source]#
create_writer(subset: str, images_dir: str, pcd_dir: str, video_dir: str) _SubsetWriter[source]#
class datumaro.plugins.data_formats.datumaro_binary.DatumaroBinaryImporter[source]#

Bases: DatumaroImporter

PATH_CLS#

alias of DatumaroBinaryPath

classmethod build_cmdline_parser(**kwargs)[source]#
classmethod detect(context: FormatDetectionContext) Optional[FormatDetectionConfidence][source]#

Modules

datumaro.plugins.data_formats.datumaro_binary.base

datumaro.plugins.data_formats.datumaro_binary.exporter

datumaro.plugins.data_formats.datumaro_binary.format

datumaro.plugins.data_formats.datumaro_binary.importer

datumaro.plugins.data_formats.datumaro_binary.mapper