SemanticSegmentationDataReader#

class SemanticSegmentationDataReader[source]#

Bases: Dataset

Reads semantic segmentatioin images and labels from files.

__init__(img_dir: str, label_dir: str)[source]#

Constructor.

Parameters:
  • img_dir (str) – Directory containing images.

  • label_dir (str) – Directory containing segmentation masks.

Methods

__init__(img_dir, label_dir)

Constructor.

validate_paths()

__add__(other: Dataset[T_co]) ConcatDataset[T_co]#
Parameters:

other (Dataset[T_co]) –

Return type:

ConcatDataset[T_co]

__getitem__(ind: int) tuple[numpy.ndarray, numpy.ndarray][source]#
Parameters:

ind (int) –

Return type:

tuple[numpy.ndarray, numpy.ndarray]

__init__(img_dir: str, label_dir: str)[source]#

Constructor.

Parameters:
  • img_dir (str) – Directory containing images.

  • label_dir (str) – Directory containing segmentation masks.

validate_paths() None[source]#
Return type:

None