datumaro.plugins.data_formats.cityscapes#

Functions

make_cityscapes_categories([label_map])

parse_label_map(path)

write_label_map(path, label_map)

Classes

CityscapesBase(path, *[, subset, ctx])

CityscapesExporter(extractor, save_dir[, ...])

CityscapesImporter()

CityscapesPath()

LabelmapType(value)

An enumeration.

class datumaro.plugins.data_formats.cityscapes.CityscapesPath[source]#

Bases: object

GT_FINE_DIR = 'gtFine'#
IMGS_FINE_DIR = ''#
ORIGINAL_IMAGE_DIR = 'leftImg8bit'#
ORIGINAL_IMAGE = '_leftImg8bit'#
INSTANCES_IMAGE = '_instanceIds.png'#
GT_INSTANCE_MASK_SUFFIX = '_gtFine_instanceIds.png'#
COLOR_IMAGE = '_color.png'#
LABELIDS_IMAGE = '_labelIds.png'#
LABEL_TRAIN_IDS_SUFFIX = '_gtFine_labelTrainIds.png'#
LABELMAP_FILE = 'label_colors.txt'#
datumaro.plugins.data_formats.cityscapes.make_cityscapes_categories(label_map=None)[source]#
datumaro.plugins.data_formats.cityscapes.parse_label_map(path)[source]#
datumaro.plugins.data_formats.cityscapes.write_label_map(path, label_map)[source]#
class datumaro.plugins.data_formats.cityscapes.CityscapesBase(path: str, *, subset: Optional[str] = None, ctx: Optional[ImportContext] = None)[source]#

Bases: SubsetBase

class datumaro.plugins.data_formats.cityscapes.CityscapesImporter[source]#

Bases: Importer

classmethod detect(context: FormatDetectionContext) None[source]#
classmethod find_sources(path)[source]#
class datumaro.plugins.data_formats.cityscapes.LabelmapType(value)[source]#

Bases: Enum

An enumeration.

cityscapes = 1#
source = 2#
class datumaro.plugins.data_formats.cityscapes.CityscapesExporter(extractor, save_dir, apply_colormap=True, label_map=None, **kwargs)[source]#

Bases: Exporter

DEFAULT_IMAGE_EXT = '.png'#
classmethod build_cmdline_parser(**kwargs)[source]#
save_label_map()[source]#
save_mask(path, mask, colormap=None, apply_colormap=True, dtype=<class 'numpy.uint8'>)[source]#
classmethod patch(dataset, patch, save_dir, **kwargs)[source]#