itasc.tracking_ultrack.extend

Functions

extend_track_from_db(*, source_id, ...)

Extend a track to the adjacent frame using ultrack LinkDB candidates.

list_extend_candidates(*, source_id, ...[, ...])

Ranked extend candidates at the adjacent frame, best-first, for a gallery.

Classes

ExtendAssignment(cell_id, candidate_label, ...)

ExtendCandidates(target_frame[, assignments])

Ranked extend shortlist for one direction, best-first, for a gallery.

ExtendResult(target_frame, candidate_label, ...)

class itasc.tracking_ultrack.extend.ExtendAssignment(cell_id, candidate_label, candidate_partition, mask_2d, bbox, weight)[source]

Bases: object

Parameters:
cell_id: int
candidate_label: int
candidate_partition: int
mask_2d: ndarray
bbox: tuple[int, int, int, int]
weight: float
class itasc.tracking_ultrack.extend.ExtendResult(target_frame, candidate_label, candidate_partition, mask_2d, bbox, weight, assignments=())[source]

Bases: object

Parameters:
target_frame: int
candidate_label: int
candidate_partition: int
mask_2d: ndarray
bbox: tuple[int, int, int, int]
weight: float
assignments: tuple[ExtendAssignment, ...] = ()
class itasc.tracking_ultrack.extend.ExtendCandidates(target_frame, assignments=())[source]

Bases: object

Ranked extend shortlist for one direction, best-first, for a gallery.

target_frame is the adjacent frame the candidates live on (one step in direction from the source); assignments carries each candidate’s full-frame mask, bbox and link weight so the UI can render clickable thumbnails.

Parameters:
target_frame: int
assignments: tuple[ExtendAssignment, ...] = ()
is_empty()[source]
Return type:

bool

itasc.tracking_ultrack.extend.extend_track_from_db(*, source_id, source_frame, direction, tracked_labels, db_path)[source]

Extend a track to the adjacent frame using ultrack LinkDB candidates.

The source label’s mask is matched to an Ultrack node; the highest-weight LinkDB edge into the adjacent frame picks the continuation. Returns None when the DB is missing, the target frame is out of range, the source cell is absent, or the matched node has no link in direction (the caller should show a local status message and leave the frame untouched).

Return type:

ExtendResult | None

Parameters:
itasc.tracking_ultrack.extend.list_extend_candidates(*, source_id, source_frame, direction, tracked_labels, db_path, limit=6)[source]

Ranked extend candidates at the adjacent frame, best-first, for a gallery.

Same matching as extend_track_from_db(), but returns the whole ranked shortlist of LinkDB candidates (each with its full-frame mask) instead of only the winner, so the correction UI can render clickable candidate thumbnails. Returns an empty ExtendCandidates (still carrying target_frame) when there is no DB, target frame, matched node or link.

Return type:

ExtendCandidates

Parameters: