Merge pull request #1639 from roboflow/revert-1618-allow-bytetrack-detection-without-class-ids

Revert "feat(ByteTrack): Allow ByteTrack to track detection without class ids"
This commit is contained in:
LinasKo
2024-10-31 19:45:20 +02:00
committed by GitHub
+1 -6
View File
@@ -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)