SemanticSegmentationImageDataset#
- class SemanticSegmentationImageDataset[source]#
Bases:
ImageDataset
Reads semantic segmentatioin images and labels from files.
Uses
SemanticSegmentationDataReader
to read the data.- __init__(img_dir: str, label_dir: str, *args, **kwargs)[source]#
Constructor.
- Parameters:
img_dir (str) – Directory containing images.
label_dir (str) – Directory containing segmentation masks.
*args – See
ImageDataset.__init__()
.**kwargs – See
ImageDataset.__init__()
.
Methods
__init__
(img_dir, label_dir, *args, **kwargs)Constructor.
- __add__(other: Dataset[T_co]) ConcatDataset[T_co] #
- Parameters:
other (Dataset[T_co]) –
- Return type:
ConcatDataset[T_co]
- __getitem__(key) tuple[torch.Tensor, torch.Tensor] #
- Return type:
- __init__(img_dir: str, label_dir: str, *args, **kwargs)[source]#
Constructor.
- Parameters:
img_dir (str) – Directory containing images.
label_dir (str) – Directory containing segmentation masks.
*args – See
ImageDataset.__init__()
.**kwargs – See
ImageDataset.__init__()
.