vis4d.op.track.assignment

Track assignment functions.

Functions

greedy_assign(detection_scores, ...[, ...])

Greedy assignment of detections to tracks given affinities.

Classes

TrackIDCounter()

Global counter for track ids.

class TrackIDCounter[source]

Global counter for track ids.

Holds a count of tracks to enable unique and contiguous track ids starting from zero.

classmethod get_ids(num_ids, device=device(type='cpu'))[source]

Generate a num_ids number of new unique tracking ids.

Parameters:
  • num_ids (int) – number of ids

  • device (torch.device, optional) – Device to create ids on. Defaults to torch.device(“cpu”).

Returns:

Tensor of new contiguous track ids.

Return type:

torch.Tensor

classmethod reset()[source]

Reset track id counter.

Return type:

None

greedy_assign(detection_scores, tracklet_ids, affinity_scores, match_score_thr=0.5, obj_score_thr=0.3, nms_conf_thr=None)[source]

Greedy assignment of detections to tracks given affinities.

Return type:

Tensor