Merge pull request #430 from akashpambhar/fix-return-empty-detections

Fix return value when sv.Detections is empty
This commit is contained in:
Piotr Skalski
2023-10-07 00:04:04 +02:00
committed by GitHub
+2
View File
@@ -249,6 +249,8 @@ class ByteTrack:
detections.confidence = np.array(
[t.score for t in tracks], dtype=np.float32
)
else:
detections.tracker_id = np.array([], dtype=int)
return detections