ultralytics 8.0.84 results JSON outputs (#2171)

Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Talia Bender <85292283+taliabender@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-04-21 15:25:30 +02:00
committed by GitHub
parent 6c082ebd6f
commit 8f5eeb09f3
34 changed files with 796 additions and 82 deletions

View File

@ -34,7 +34,7 @@ class Bboxes:
"""Now only numpy is supported."""
def __init__(self, bboxes, format='xyxy') -> None:
assert format in _formats
assert format in _formats, f'Invalid bounding box format: {format}, format must be one of {_formats}'
bboxes = bboxes[None, :] if bboxes.ndim == 1 else bboxes
assert bboxes.ndim == 2
assert bboxes.shape[1] == 4
@ -66,7 +66,7 @@ class Bboxes:
def convert(self, format):
"""Converts bounding box format from one type to another."""
assert format in _formats
assert format in _formats, f'Invalid bounding box format: {format}, format must be one of {_formats}'
if self.format == format:
return
elif self.format == 'xyxy':