Skip to content

Commit

Permalink
feat: ✨ empty detection check added
Browse files Browse the repository at this point in the history
Signed-off-by: Onuralp SEZER <[email protected]>
  • Loading branch information
onuralpszr committed Dec 5, 2024
1 parent bdcbaa8 commit 082e00b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions supervision/detection/detection_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def scale_detections(
Returns:
Detections: A new Detections object with scaled to target resolution.
"""

if detections.xyxy is None:
return detections

input_w, input_h = resolution_wh
letterbox_w, letterbox_h = letterbox_wh

Expand Down

0 comments on commit 082e00b

Please sign in to comment.