datumaro.plugins.data_formats.common_semantic_segmentation#

Functions

make_categories([label_map])

Classes

CommonSemanticSegmentationBase(path, *[, ...])

CommonSemanticSegmentationImporter()

CommonSemanticSegmentation is introduced in the accuracy checker tool of OpenVINO™ to cover a general format of datasets for semantic segmentation task. This should have the following structure: - Dataset/ - dataset_meta.json # a list of labels - images/ - <img1>.png - <img2>.png - ... - masks/ - <img1>.png - <img2>.png - .

CommonSemanticSegmentationPath()

CommonSemanticSegmentationWithSubsetDirsImporter()

It supports the following subset sub-directory structure for CommonSemanticSegmentation.

class datumaro.plugins.data_formats.common_semantic_segmentation.CommonSemanticSegmentationPath[source]#

Bases: object

MASKS_DIR = 'masks'#
IMAGES_DIR = 'images'#
datumaro.plugins.data_formats.common_semantic_segmentation.make_categories(label_map=None)[source]#
class datumaro.plugins.data_formats.common_semantic_segmentation.CommonSemanticSegmentationBase(path: str, *, image_prefix: str = '', mask_prefix: str = '', subset: str | None = None, ctx: ImportContext | None = None)[source]#

Bases: SubsetBase

class datumaro.plugins.data_formats.common_semantic_segmentation.CommonSemanticSegmentationImporter[source]#

Bases: Importer

CommonSemanticSegmentation is introduced in the accuracy checker tool of OpenVINO™ to cover a general format of datasets for semantic segmentation task. This should have the following structure:

  • Dataset/
    • dataset_meta.json # a list of labels

    • images/
      • <img1>.png

      • <img2>.png

    • masks/
      • <img1>.png

      • <img2>.png

classmethod build_cmdline_parser(**kwargs)[source]#
classmethod detect(context: FormatDetectionContext) FormatDetectionConfidence[source]#
classmethod find_sources(path)[source]#
classmethod get_file_extensions() List[str][source]#
class datumaro.plugins.data_formats.common_semantic_segmentation.CommonSemanticSegmentationWithSubsetDirsImporter[source]#

Bases: CommonSemanticSegmentationWithSubsetDirsImporter

It supports the following subset sub-directory structure for CommonSemanticSegmentation.

Dataset/
└─ <split: train,val, ...>
    ├── dataset_meta.json # a list of labels
    ├── images/
    │   ├── <img1>.png
    │   ├── <img2>.png
    │   └── ...
    └── masks/
        ├── <img1>.png
        ├── <img2>.png
        └── ...

Then, the imported dataset will have train, val, … CommonSemanticSegmentation subsets.

NAME = 'common_semantic_segmentation_with_subset_dirs'#
classmethod detect(context: FormatDetectionContext) FormatDetectionConfidence | None#