Merge pull request #430 from akashpambhar/fix-return-empty-detections
Fix return value when sv.Detections is empty
This commit is contained in:
commit
c5c37e4a6c
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue