probly.datasets.torch.DCICDataset

class probly.datasets.torch.DCICDataset(root: Path | str, transform: Callable[..., Any] | None = None, *, first_order: bool = True)[source]

Bases: Dataset

A Dataset base class for the DCICDatasets introduced in [SGZ+22].

These datasets can be found at https://zenodo.org/records/7180818.

Initialize an instance of the DCICDataset class.

Parameters:
  • root – Root directory of the dataset.

  • transform – Optional transform to apply to the data.

  • first_order – Whether to use first order data or class labels. Defaults to True.

data: list[Image.Image]

List of images.

image_labels: dict[str, list[int]]

Dictionary of image labels grouped by image.

image_paths: list[str]

List of image paths.

label_mappings: dict[int, int]

Mapping of labels to indices.

num_classes: int

Number of classes.

root: Path

Root directory of the dataset.

targets: list[torch.Tensor]

List of labels.

transform: Callable[..., Any] | None

Transform to apply to the data.