function

benchmarks.hota.ids_per_detection

def ids_per_detection(res: StepResult, n_dets: int) -> torch.Tensor

Recover per-detection track ids in detection order (``-1`` if gated out).

Accurate under ``NoLifecycle``: ``snapshot`` is ``cat([updated, spawned])`` with no rows dropped, so matched detections read their id from ``snapshot.id[matched_pairs[:, 0]]`` and unmatched (residual) detections read the appended rows in residual order.

Source: unitrack/benchmarks/hota/tracker.py:409