mava_exchange.tracks.RegionSeries

class mava_exchange.tracks.RegionSeries(name: str, description: str, dimensions: list[DimensionSpec], sampling_interval: float | None = None, parent: str | None = None, derived_from: list[str] | None = None, method: str | None = None)

Spatial detections — one row per detection (long format).

Use for bounding boxes (faces, objects). Geometry is normalized to [0,1] of the frame with a top-left origin (x, y, w, h) plus a detection score; each row also carries an identity (cluster_id) and an optional human label.

Each row in the Parquet file needs: start_seconds + one column per dimension (x, y, w, h, det_score) + cluster_id + label.

Example:

faces = RegionSeries(
    name="face_regions",
    description="Per-frame face bounding boxes",
    sampling_interval=0.5,
    dimensions=[
        DimensionSpec("x", "Box left edge (normalized)", "[0,1]"),
        DimensionSpec("y", "Box top edge (normalized)", "[0,1]"),
        DimensionSpec("w", "Box width (normalized)", "[0,1]"),
        DimensionSpec("h", "Box height (normalized)", "[0,1]"),
        DimensionSpec("det_score", "Detection confidence", "[0,1]"),
    ],
)
__init__(name: str, description: str, dimensions: list[DimensionSpec], sampling_interval: float | None = None, parent: str | None = None, derived_from: list[str] | None = None, method: str | None = None) → None

Methods

__init__(name, description, dimensions[, ...])

to_dict()

Converts to dictionary for manifest.json.

Attributes

columns

Returns column names.

derived_from

Source track names this track is derived from (provenance).

method

Derivation method (e.g. 'argmax', 'cluster_to_scalar', 'aggregate_scalar').

parent

Containment parent track name (None if top-level).

sampling_interval

Seconds between samples for regularly-sampled detections.

type

name

Track name (must be unique within package).

description

Human-readable description of what this track contains.

dimensions

Geometry + score columns (x, y, w, h, det_score).

name: str

Track name (must be unique within package).

description: str

Human-readable description of what this track contains.

dimensions: list[DimensionSpec]

Geometry + score columns (x, y, w, h, det_score).

sampling_interval: float | None = None

Seconds between samples for regularly-sampled detections.

parent: str | None = None

Containment parent track name (None if top-level).

derived_from: list[str] | None = None

Source track names this track is derived from (provenance).

method: str | None = None

Derivation method (e.g. ‘argmax’, ‘cluster_to_scalar’, ‘aggregate_scalar’).

type: Literal['mava:RegionSeries'] = 'mava:RegionSeries'
property columns: list[str]

Returns column names.

to_dict() → dict[str, Any]

Converts to dictionary for manifest.json.