dabble.tracking
Description
🎯 Performs multiple object tracking for detected bboxes.
- class Node(config=None, **kwargs)[source]
Uses bounding boxes detected by an object detector model to track multiple objects.
dabble.trackingis a useful alternative tomodel.fairmotandmodel.jdeas it can track bounding boxes detected by the upstream object detector and is not limited to only"person"detections.Currently, two types of tracking algorithms can be selected: MOSSE and IOU. Information on the algorithms’ performance can be found here.
- Inputs
img(numpy.ndarray): A NumPy array of shape \((height, width, channels)\) containing the image data in BGR format.bboxes(numpy.ndarray): A NumPy array of shape \((N, 4)\) containing normalized bounding box coordinates of \(N\) detected objects. Each bounding box is represented as \((x_1, y_1, x_2, y_2)\) where \((x_1, y_1)\) is the top-left corner and \((x_2, y_2)\) is the bottom-right corner. The order corresponds to bbox_labels and bbox_scores.- Outputs
obj_attrs(Dict[str, Any]): A dictionary of attributes associated with each bounding box, in the same order as bboxes. Different nodes that produce this obj_attrs output type may contribute different attributes.dabble.trackingproduces theidsattribute which contains the tracking IDs of the detections.- Configs
tracking_type (
str) – {“iou”, “mosse”}, default=”iou”.
Type of tracking algorithm to be used. For more information about the trackers, please view the Object Counting (Over Time) use case.iou_threshold (
float) – [0, 1], default=0.1.
Minimum IoU value to be used with the matching logic.max_lost (
int) – [0, sys.maxsize), default=10.
Maximum number of frames to keep “lost” tracks after which they will be removed. Only used whentracking_type = iou.