datumaro.plugins.data_formats.imagenet#
Classes
|
|
|
|
Multi-level version of ImagenetImporter. |
|
|
|
Multi-level image directory structure importer. |
- class datumaro.plugins.data_formats.imagenet.ImagenetPath[source]#
Bases:
object
- IMAGE_DIR_NO_LABEL = 'no_label'#
- SEP_TOKEN = ':'#
- class datumaro.plugins.data_formats.imagenet.ImagenetBase(path: str, *, subset: str | None = None, ctx: ImportContext | None = None, min_depth: int | None = None, max_depth: int | None = None)[source]#
Bases:
SubsetBase
- class datumaro.plugins.data_formats.imagenet.ImagenetImporter[source]#
Bases:
Importer
Multi-level version of ImagenetImporter. For example, it imports the following directory structure.
root ├── label_0 │ ├── label_0_1 │ │ └── img1.jpg │ └── label_0_2 │ └── img2.jpg └── label_1 └── img3.jpg
- DETECT_CONFIDENCE = 5#
- classmethod detect(context: FormatDetectionContext) FormatDetectionConfidence [source]#
- class datumaro.plugins.data_formats.imagenet.ImagenetWithSubsetDirsImporter[source]#
Bases:
ImagenetWithSubsetDirsImporter
Multi-level image directory structure importer. Example:
root ├── train │ ├── label_0 │ │ ├── label_0_1 │ │ │ └── img1.jpg │ │ └── label_0_2 │ │ └── img2.jpg │ └── label_1 │ └── img3.jpg ├── val │ ├── label_0 │ │ ├── label_0_1 │ │ │ └── img1.jpg │ │ └── label_0_2 │ │ └── img2.jpg │ └── label_1 │ └── img3.jpg └── test │ ├── label_0 │ ├── label_0_1 │ │ └── img1.jpg │ └── label_0_2 │ └── img2.jpg └── label_1 └── img3.jpg
- NAME = 'imagenet_with_subset_dirs'#
- classmethod detect(context: FormatDetectionContext) FormatDetectionConfidence | None #
- class datumaro.plugins.data_formats.imagenet.ImagenetExporter(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, save_hashkey_meta: bool = False, stream: bool = False, ctx: ExportContext | None = None)[source]#
Bases:
Exporter
- DEFAULT_IMAGE_EXT = '.jpg'#
- USE_SUBSET_DIRS = False#
- class datumaro.plugins.data_formats.imagenet.ImagenetWithSubsetDirsExporter(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, save_hashkey_meta: bool = False, stream: bool = False, ctx: ExportContext | None = None)[source]#
Bases:
ImagenetExporter
- USE_SUBSET_DIRS = True#