Clip boxes in tracker (#3950)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
single_channel
Laughing 1 year ago committed by GitHub
parent 4329269c4e
commit 7137872f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -114,6 +114,7 @@ class Results(SimpleClass):
def update(self, boxes=None, masks=None, probs=None): def update(self, boxes=None, masks=None, probs=None):
"""Update the boxes, masks, and probs attributes of the Results object.""" """Update the boxes, masks, and probs attributes of the Results object."""
if boxes is not None: if boxes is not None:
ops.clip_boxes(boxes, self.orig_shape) # clip boxes
self.boxes = Boxes(boxes, self.orig_shape) self.boxes = Boxes(boxes, self.orig_shape)
if masks is not None: if masks is not None:
self.masks = Masks(masks, self.orig_shape) self.masks = Masks(masks, self.orig_shape)

Loading…
Cancel
Save