data.datasets.segmentation package
Submodules
data.datasets.segmentation.ade20k module
- class data.datasets.segmentation.ade20k.ADE20KDataset(opts: Namespace, *args, **kwargs)[source]
Bases:
BaseImageSegmentationDataset
Dataset class for the ADE20K dataset
The structure of the dataset should be something like this:
ADEChallengeData2016/annotations/training/.png ADEChallengeData2016/annotations/validation/.png
ADEChallengeData2016/images/training/.jpg ADEChallengeData2016/images/validation/.jpg
- Parameters:
opts – Command-line arguments
data.datasets.segmentation.base_segmentation module
- class data.datasets.segmentation.base_segmentation.BaseImageSegmentationDataset(opts: Namespace, *args, **kwargs)[source]
Bases:
BaseImageDataset
Base Dataset class for Image Segmentation datasets. Sub-classes must define ignore_label and background_idx variable.
- Parameters:
opts – Command-line arguments
- classmethod add_arguments(parser: ArgumentParser) ArgumentParser [source]
Add dataset-specific arguments
- static color_palette() List[int] [source]
Class index to RGB color mapping. The list index corresponds to class id. Note that the color list is flattened.
data.datasets.segmentation.coco_segmentation module
- class data.datasets.segmentation.coco_segmentation.COCOSegmentationDataset(opts: Namespace, *args, **kwargs)[source]
Bases:
BaseImageSegmentationDataset
Dataset class for the COCO dataset that maps classes to PASCAL VOC classes
- Parameters:
opts – command-line arguments
data.datasets.segmentation.pascal_voc module
- class data.datasets.segmentation.pascal_voc.PascalVOCDataset(opts: Namespace, *args, **kwargs)[source]
Bases:
BaseImageSegmentationDataset
Dataset class for the PASCAL VOC 2012 dataset
The structure of PASCAL VOC dataset should be like this:
pascal_voc/VOCdevkit/VOC2012/Annotations pascal_voc/VOCdevkit/VOC2012/JPEGImages pascal_voc/VOCdevkit/VOC2012/SegmentationClass pascal_voc/VOCdevkit/VOC2012/SegmentationClassAug_Visualization pascal_voc/VOCdevkit/VOC2012/ImageSets pascal_voc/VOCdevkit/VOC2012/list pascal_voc/VOCdevkit/VOC2012/SegmentationClassAug pascal_voc/VOCdevkit/VOC2012/SegmentationObject
- Parameters:
opts – Command-line arguments
- classmethod add_arguments(parser: ArgumentParser) ArgumentParser [source]
Add dataset-specific arguments