Fix keypoint crash with no detections
This commit is contained in:
1 parent
80e5413402
commit
4b89bece4f
1 file changed
+1
-1
@@ -135,7 +135,7 @@ class KeyPoints:
|
||||
keypoints = sv.KeyPoints.from_ultralytics(result)
|
||||
```
|
||||
"""
|
||||
if len(ultralytics_results.keypoints.xy) == 0:
|
||||
if ultralytics_results.keypoints.xy.numel() == 0:
|
||||
return cls.empty()
|
||||
|
||||
xy = ultralytics_results.keypoints.xy.cpu().numpy()
|
||||
|
||||
Reference in new issue
Block a user