vis4d.state.track.qdtrack¶
Memory for QDTrack inference.
Classes
|
Quasi-dense embedding similarity based graph. |
QDTrack Track state. |
- 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.
- __call__(embeddings_list, det_boxes_list, det_scores_list, class_ids_list, frame_id_list)[source]¶
Forward during test.
- Return type:
- create_track(track_id, box, score, class_id, embedding, frame_id)[source]¶
Create a new track from a models.
- Return type:
None
- 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)