Skip to content

Commit 082e00b

Browse files
committed
feat: ✨ empty detection check added
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
1 parent bdcbaa8 commit 082e00b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

supervision/detection/detection_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ def scale_detections(
2424
Returns:
2525
Detections: A new Detections object with scaled to target resolution.
2626
"""
27+
28+
if detections.xyxy is None:
29+
return detections
30+
2731
input_w, input_h = resolution_wh
2832
letterbox_w, letterbox_h = letterbox_wh
2933

0 commit comments

Comments
 (0)