Per-track Bayesian classifier stabiliser. Reads per-frame class [Double] probabilities tagged with a track id, blends them over a sliding history weighted by confidence and prior, and emits oneof t[[(UInt64, UInt64, Bool)], [Observation.Event]].
Typical backends
Tracked detections are classified per frame, collapsed to one stable label per id, and counted over a message broker.
Re-identified ids keep their label stable across occlusions, with the smoothed status posted as JSON.
Caveats
- AccuracyEach track's posterior is averaged over a fixed-length history; slots not yet filled are padded with
prior, so a freshly seen track stays conservative and is slow to flip positive early in its life — this is intentional smoothing, not a bug. - I/O contractCrops smaller than the configured minimum width or height are dropped before they enter a track's history; the track still exists but accumulates evidence only from in-spec samples.
- Parameter interactionKeep
forget_num_frames at least as large as the upstream tracker's own forget window, otherwise the tracker re-emits ids whose history this component has already discarded. - Hard constraintAggregation is keyed on track id, so id switches mid-life split one object's evidence across two histories; feed stable ids from a tracker or re-identifier upstream.
- OrderingTwo records sharing a track id within the same batch update and then read the same history in arrival order, so their results can differ from each other.
- State lifetimeConfiguration is captured once at the first tick; later changes do not take effect, and per-track histories persist until a track goes unseen past its forget window.