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.
- 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
- class datumaro.plugins.data_formats.datumaro_binary.DatumaroBinaryImporter[source]#
Bases:
DatumaroImporter
- PATH_CLS#
alias of
DatumaroBinaryPath
- classmethod detect(context: FormatDetectionContext) FormatDetectionConfidence | None [source]#
Modules