Merge pull request #1828 from roboflow/fix/make-trace-annotator-to-work-with-unassigned-trackers

make the `TraceAnnotator` to work with unassigned trackers
This commit is contained in:
Piotr Skalski authored and GitHub committed 2025-04-24 00:30:13 +02:00
commit 49d5505efa
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
name = "supervision"
description = "A set of easy-to-use utils that will come in handy in any Computer Vision project"
license = { text = "MIT" }
version = "0.26.0rc5"
version = "0.26.0rc6"
readme = "README.md"
requires-python = ">=3.8"
authors = [
+2
View File
@@ -9,6 +9,7 @@ from PIL import Image, ImageDraw, ImageFont
from supervision.annotators.base import BaseAnnotator, ImageType
from supervision.annotators.utils import (
PENDING_TRACK_ID,
ColorLookup,
Trace,
resolve_color,
@@ -1739,6 +1740,7 @@ class TraceAnnotator(BaseAnnotator):
"The `tracker_id` field is missing in the provided detections."
" See more: https://supervision.roboflow.com/latest/how_to/track_objects"
)
detections = detections[detections.tracker_id != PENDING_TRACK_ID]
self.trace.put(detections)
for detection_idx in range(len(detections)):