Skip to content

Commit 49d5505

Browse files
authored
Merge pull request #1828 from roboflow/fix/make-trace-annotator-to-work-with-unassigned-trackers
make the `TraceAnnotator` to work with unassigned trackers
2 parents b9731ef + 1cf9597 commit 49d5505

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "supervision"
33
description = "A set of easy-to-use utils that will come in handy in any Computer Vision project"
44
license = { text = "MIT" }
5-
version = "0.26.0rc5"
5+
version = "0.26.0rc6"
66
readme = "README.md"
77
requires-python = ">=3.8"
88
authors = [

supervision/annotators/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from supervision.annotators.base import BaseAnnotator, ImageType
1111
from supervision.annotators.utils import (
12+
PENDING_TRACK_ID,
1213
ColorLookup,
1314
Trace,
1415
resolve_color,
@@ -1739,6 +1740,7 @@ def annotate(
17391740
"The `tracker_id` field is missing in the provided detections."
17401741
" See more: https://supervision.roboflow.com/latest/how_to/track_objects"
17411742
)
1743+
detections = detections[detections.tracker_id != PENDING_TRACK_ID]
17421744

17431745
self.trace.put(detections)
17441746
for detection_idx in range(len(detections)):

0 commit comments

Comments
 (0)