itasc.tracking_ultrack.scoring

Shared similarity scoring used by both the linker and the greedy retracker.

Functions

centroid_corrected_iou(mask_a, mask_b)

Convenience wrapper for full-frame boolean masks.

centroid_corrected_iou_from_coords(...)

IoU after shifting target so its centroid matches source's.

similarity_score(*, area_ratio, ...)

Additive similarity score (higher = more preferred).

itasc.tracking_ultrack.scoring.centroid_corrected_iou_from_coords(src_coords, src_centroid, target_coords, target_centroid)[source]

IoU after shifting target so its centroid matches source’s.

Return type:

float

Parameters:
itasc.tracking_ultrack.scoring.centroid_corrected_iou(mask_a, mask_b)[source]

Convenience wrapper for full-frame boolean masks.

Return type:

float

Parameters:
itasc.tracking_ultrack.scoring.similarity_score(*, area_ratio, centroid_corrected_iou, distance, area_weight, iou_weight, distance_weight)[source]

Additive similarity score (higher = more preferred).

Shape terms are positive rewards in [0, 1]; distance is a raw penalty in pixels. Result can go negative for far candidates, matching the default Ultrack linker’s convention so ILP appear/disappear weights stay calibrated.

Return type:

float

Parameters: