method

costs.Cosine.__call__

def __call__(self, cs: Tracklets, ds: Detections, ctx: FrameContext) -> CostExpression

Compute the cosine-distance cost matrix.

Parameters

NameTypeDescription
csTrackletsTracklet snapshot with ``N`` rows.
dsDetectionsDetection record with ``M`` rows.
ctxFrameContextFrame context (unused).

Returns

CostExpression — ``(N, M)`` cost matrix; lower is better.

Source: unitrack/costs/distance.py:41