vis4d.state.track.qdtrack
Memory for QDTrack inference.
Classes
|
Quasi-dense embedding similarity based graph. |
QDTrack Track state. |
- class Track[source]
QDTrack Track state.
- box
In shape (4,) and contains x1, y1, x2, y2.
- Type:
Tensor
- score
In shape (1,).
- Type:
Tensor
- class_id
In shape (1,).
- Type:
Tensor
- embedding
In shape (E,). E is the embedding dimension.
- Type:
Tensor
- last_frame
Last frame id.
- Type:
int
- class QDTrackGraph(track=None, memory_size=10, memory_momentum=0.8, nms_backdrop_iou_thr=0.3, backdrop_memory_size=1)[source]
Quasi-dense embedding similarity based graph.
- __init__(track=None, memory_size=10, memory_momentum=0.8, nms_backdrop_iou_thr=0.3, backdrop_memory_size=1)[source]
Init.
- get_tracks(device, frame_id=None, add_backdrops=False)[source]
Get tracklests.
If the frame_id is not provided, will return the latest state of all tracklets. Otherwise, will return the state of all tracklets at the given frame_id. If add_backdrops is True, will also return the backdrops.
- Parameters:
device (torch.device) – Device to put the tensors on.
frame_id (int, optional) – Frame id to query. Defaults to None.
add_backdrops (bool, optional) – Whether to add backdrops to the output. Defaults to False.
- Returns:
2D boxes in shape (N, 4). scores (Tensor): 2D scores in shape (N,). class_ids (Tensor): Class ids in shape (N,). track_ids (Tensor): Track ids in shape (N,). embeddings (Tensor): Embeddings in shape (N, E).
- Return type:
boxes (Tensor)
- __call__(embeddings_list, det_boxes_list, det_scores_list, class_ids_list, frame_id_list)[source]
Forward during test.
- Return type:
- update(frame_id, track_ids, boxes, scores, class_ids, embeddings)[source]
Update the track memory with a new state.
- Return type:
None