Dataset#

class maite.protocols.multiobject_tracking.Dataset(*args, **kwargs)[source]#

A dataset protocol for multi-object tracking AI problem providing datum-level data access.

Implementers must provide index lookup (via __getitem__(ind: int) method) and support len (via __len__() method). Data elements looked up this way correspond to individual examples (as opposed to batches).

Indexing into or iterating over an multi-object tracking dataset returns a tuple of types VideoStream, MultiobjectTrackingTarget, and DatumMetadata. These correspond to the model input type, model target type, and datum-level metadata, respectively.

Attributes:
metadataDatasetMetadata

A read-only typed dictionary containing at least an ‘id’ key of type str that may also contain an ‘index2label’ key of type dict[str,int] mapping integer indices to str labels.

Methods

__getitem__(ind: int) -> tuple[VideoStream, MultiobjectTrackingTarget, DatumMetadata]

Provide map-style access to dataset elements. Returned tuple elements correspond to model input type, model target type, and datum-specific metadata type, respectively.

__len__() -> int

Return the number of data elements in the dataset.