dataset Module

The dataset module provides functionality for managing datasets for semantic segmentation.

class ucs.data.dataset.SemanticSegmentationDataset(data, feature_extractor, transform=None)[source]

Bases: Dataset

A custom dataset class for semantic segmentation tasks.

This class handles datasets containing images and their corresponding segmentation masks. It supports preprocessing using a feature extractor and optional Albumentations transformations.

Variables:
  • data (Dataset) – The dataset containing images and masks.

  • feature_extractor (SegformerImageProcessor) – The feature extractor for preprocessing images.

  • transform (Compose, optional) – The Albumentations transformations applied to each sample.

Parameters:
  • data (Dataset) – The dataset containing images and masks.

  • feature_extractor (SegformerImageProcessor) – The feature extractor for preprocessing images.

  • transform (Compose, optional) – Optional Albumentations transformations to be applied.