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
commit c5c37e4a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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