Перейти к содержанию

Index

Datasets in Hyppopipe live in hyppopipe.data.dataset. All concrete readers inherit from ImageDataset and return data in a task-specific format (image + label, image + mask, and so on).

Class Task Layout
ImageFolderDataset Classification root/<class>/images
PairedImageMaskFolderDataset Semantic segmentation root/images + root/masks
YAMLDataset Classification / detection / segmentation YOLO data.yaml

Train / val / test splits

Open datasets often ship with pre-defined train, validation, and test folders. Hyppopipe respects this layout by default (absorb_folders=False).

When you need a different ratio, set absorb_folders=True and split programmatically:

from hyppopipe.data.dataset import ImageFolderDataset, split_random_fractions

full_ds = ImageFolderDataset("data/", absorb_folders=True)
splits = split_random_fractions(full_ds, (0.7, 0.15, 0.15), seed=42)

TrainVal and TrainValTest (alias SplitData) wrap train/val(/test) subsets for Trainer.

Task adapters

Some datasets contain labels for multiple tasks. Adapters in hyppopipe.data.dataset.adapters expose only the fields needed for a given task: classification, detection, segmentation, roi_classification.

Documentation

Bases: Sized, ABC, Dataset

Base class for image datasets used before task-specific adaptation.

__len__() abstractmethod

Return the number of samples in the dataset.