datumaro.plugins.data_formats.datumaro_binary#

class datumaro.plugins.data_formats.datumaro_binary.DatumaroBinaryBase(path: str, *, encryption_key: bytes | None = None, num_workers: int = 0, subset: str | None = None, ctx: ImportContext | None = 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).

ann_types()[source]#

Returns available task type from dataset annotation types.

class datumaro.plugins.data_formats.datumaro_binary.DatumaroBinaryExporter(extractor: IDataset, save_dir: str, *, save_media: bool | None = None, image_ext: str | None = None, default_image_ext: str | None = None, save_dataset_meta: bool = False, ctx: ExportContext | None = None, encryption_key: bytes | None = 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) FormatDetectionConfidence | None[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