dataeval.typing

Common type protocols used for interoperability with DataEval.

Attributes

ArrayLike

Type alias for a Union representing objects that can be coerced into an array.

DeviceLike

Type alias for a Union representing types that specify a torch.device.

ImageClassificationDataset

Type alias for an AnnotatedDataset of ImageClassificationDatum elements.

ImageClassificationDatum

Type alias for an image classification datum tuple.

ObjectDetectionDataset

Type alias for an AnnotatedDataset of ObjectDetectionDatum elements.

ObjectDetectionDatum

Type alias for an object detection datum tuple.

SegmentationDataset

Type alias for an AnnotatedDataset of SegmentationDatum elements.

SegmentationDatum

Type alias for an image classification datum tuple.

Classes

AnnotatedDataset

Protocol for a generic AnnotatedDataset.

Array

Protocol for array objects providing interoperability with DataEval.

Dataset

Protocol for a generic Dataset.

DatasetMetadata

Dataset level metadata required for all AnnotatedDataset classes.

ObjectDetectionTarget

Protocol for targets in an Object Detection dataset.

SegmentationTarget

Protocol for targets in a Segmentation dataset.

Transform

Protocol defining a transform function.

Module Contents

type dataeval.typing.ArrayLike = numpy.typing.ArrayLike

Type alias for a Union representing objects that can be coerced into an array.

See also

NumPy ArrayLike

type dataeval.typing.DeviceLike = int | str | tuple[str, int] | torch.device

Type alias for a Union representing types that specify a torch.device.

See also

torch.device

type dataeval.typing.ImageClassificationDataset = AnnotatedDataset[ImageClassificationDatum]

Type alias for an AnnotatedDataset of ImageClassificationDatum elements.

type dataeval.typing.ImageClassificationDatum = tuple[ArrayLike, ArrayLike, DatumMetadata]

Type alias for an image classification datum tuple.

  • ArrayLike of shape (C, H, W) - Image data in channel, height, width format.

  • ArrayLike of shape (N,) - Class label as one-hot encoded ground-truth or prediction confidences.

  • dict[str, Any] - Datum level metadata.

type dataeval.typing.ObjectDetectionDataset = AnnotatedDataset[ObjectDetectionDatum]

Type alias for an AnnotatedDataset of ObjectDetectionDatum elements.

type dataeval.typing.ObjectDetectionDatum = tuple[ArrayLike, ObjectDetectionTarget, DatumMetadata]

Type alias for an object detection datum tuple.

  • ArrayLike of shape (C, H, W) - Image data in channel, height, width format.

  • ObjectDetectionTarget - Object detection target information for the image.

  • dict[str, Any] - Datum level metadata.

type dataeval.typing.SegmentationDataset = AnnotatedDataset[SegmentationDatum]

Type alias for an AnnotatedDataset of SegmentationDatum elements.

type dataeval.typing.SegmentationDatum = tuple[ArrayLike, SegmentationTarget, DatumMetadata]

Type alias for an image classification datum tuple.

  • ArrayLike of shape (C, H, W) - Image data in channel, height, width format.

  • SegmentationTarget - Segmentation target information for the image.

  • dict[str, Any] - Datum level metadata.