From 7137872f8e5904eb4f4705500e5b6f9dbb0d30c2 Mon Sep 17 00:00:00 2001 From: Laughing <61612323+Laughing-q@users.noreply.github.com> Date: Tue, 25 Jul 2023 21:58:21 +0800 Subject: [PATCH] Clip boxes in tracker (#3950) Co-authored-by: Glenn Jocher --- ultralytics/engine/results.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ultralytics/engine/results.py b/ultralytics/engine/results.py index 7978b73..9201e91 100644 --- a/ultralytics/engine/results.py +++ b/ultralytics/engine/results.py @@ -114,6 +114,7 @@ class Results(SimpleClass): def update(self, boxes=None, masks=None, probs=None): """Update the boxes, masks, and probs attributes of the Results object.""" if boxes is not None: + ops.clip_boxes(boxes, self.orig_shape) # clip boxes self.boxes = Boxes(boxes, self.orig_shape) if masks is not None: self.masks = Masks(masks, self.orig_shape)