From 7229409fabfd5cb0c76054a82c77ec177e252d60 Mon Sep 17 00:00:00 2001 From: LinasKo Date: Thu, 31 Oct 2024 19:43:26 +0200 Subject: [PATCH] Revert "feat(ByteTrack): Allow ByteTrack to track detection without class ids" --- supervision/tracker/byte_tracker/core.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/supervision/tracker/byte_tracker/core.py b/supervision/tracker/byte_tracker/core.py index f453e523..d1d567fa 100644 --- a/supervision/tracker/byte_tracker/core.py +++ b/supervision/tracker/byte_tracker/core.py @@ -276,16 +276,11 @@ class ByteTrack: ``` """ - num_rows = detections.xyxy.shape[0] - class_ids = np.full(num_rows, -5) - if detections.class_id is not None: - class_ids = detections.class_id - tensors = np.hstack( ( detections.xyxy, detections.confidence[:, np.newaxis], - class_ids[:, np.newaxis], + detections.class_id[:, np.newaxis], ) ) tracks = self.update_with_tensors(tensors=tensors)