cifar_format module

class datumaro.plugins.cifar_format.RestrictedUnpickler(file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())[source]

Bases: _pickle.Unpickler

find_class(module, name)[source]

Return an object from a specified module.

If necessary, the module will be imported. Subclasses may override this method (e.g. to restrict unpickling of arbitrary classes and functions).

This method is called whenever a class or a function object is needed. Both arguments passed are str objects.

class datumaro.plugins.cifar_format.PickleLoader[source]

Bases: object

safe_numpy = {'_reconstruct', 'dtype', 'ndarray'}
restricted_load()[source]
class datumaro.plugins.cifar_format.CifarPath[source]

Bases: object

META_10_FILE = 'batches.meta'
META_100_FILE = 'meta'
TRAIN_FILE_PREFIX = 'data_batch_'
USELESS_FILE = 'file.txt~'
IMAGE_SIZE = 32
class datumaro.plugins.cifar_format.CifarExtractor(path, subset=None)[source]

Bases: datumaro.components.extractor.SourceExtractor

__init__(path, subset=None)[source]
class datumaro.plugins.cifar_format.CifarImporter[source]

Bases: datumaro.components.extractor.Importer

classmethod find_sources(path)[source]
class datumaro.plugins.cifar_format.CifarConverter(extractor: datumaro.components.extractor.IExtractor, save_dir: str, *, save_images: bool = False, image_ext: Optional[str] = None, default_image_ext: Optional[str] = None, save_dataset_meta: bool = False, ctx: Optional[datumaro.components.converter.ExportContext] = None)[source]

Bases: datumaro.components.converter.Converter

DEFAULT_IMAGE_EXT = '.png'
apply()[source]
classmethod patch(dataset, patch, save_dir, **kwargs)[source]