dataeval.utils.data

Utility functions for dataset splitting and data and metadata manipulation.

Attributes

DatasetKind

Kind of MAITE dataset a consumer requires.

Classes

DatasetSplits

Output class containing test indices and a list of TrainValSplits.

TrainValSplit

Dataclass containing train and validation indices.

Functions

requires_maite_dataset([arg_name, expected])

Validate a named dataset argument before the wrapped call runs (decorator).

split_dataset(dataset[, num_folds, stratify, ...])

Dataset splitting function. Returns a dataclass containing a list of train and validation indices.

unzip_dataset(dataset, per_target)

Unzips a dataset into separate generators for images and targets.

validate_dataset(dataset, *[, expected, arg_name, caller])

Validate that a dataset matches the expected MAITE datum shape.

Module Contents

dataeval.utils.data.DatasetKind

Kind of MAITE dataset a consumer requires.

  • "image_only" — only the image (datum[0]) is read; tuple or bare image both OK.

  • "classification" — full 3-tuple; datum[1] is an Array of class scores/logits.

  • "object_detection" — full 3-tuple; datum[1] is an ObjectDetectionTarget.

  • "segmentation" — full 3-tuple; datum[1] is a SegmentationTarget.

  • "any_target" — full 3-tuple; datum[1] matches any of the above.