Fix model re-fuse() in inference loops (#466)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
This commit is contained in:
Glenn Jocher 2023-01-18 20:32:36 +01:00 committed by GitHub
parent cc3c774bde
commit a86218b767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 135 additions and 66 deletions

View file

@ -85,11 +85,11 @@ class Results:
def __repr__(self):
s = f'Ultralytics YOLO {self.__class__} instance\n' # string
if self.boxes:
if self.boxes is not None:
s = s + self.boxes.__repr__() + '\n'
if self.masks:
if self.masks is not None:
s = s + self.masks.__repr__() + '\n'
if self.probs:
if self.probs is not None:
s = s + self.probs.__repr__()
s += f'original size: {self.orig_shape}\n'