Fix the docstring of xywhr2xyxyxyxy (#14934)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Zeel B Patel 2024-08-03 23:27:02 +05:30 committed by GitHub
parent 2d0c5cc6b4
commit 6f37eb12eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -528,7 +528,7 @@ def ltwh2xywh(x):
def xyxyxyxy2xywhr(x): def xyxyxyxy2xywhr(x):
""" """
Convert batched Oriented Bounding Boxes (OBB) from [xy1, xy2, xy3, xy4] to [xywh, rotation]. Rotation values are Convert batched Oriented Bounding Boxes (OBB) from [xy1, xy2, xy3, xy4] to [xywh, rotation]. Rotation values are
expected in degrees from 0 to 90. returned in radians from 0 to pi/2.
Args: Args:
x (numpy.ndarray | torch.Tensor): Input box corners [xy1, xy2, xy3, xy4] of shape (n, 8). x (numpy.ndarray | torch.Tensor): Input box corners [xy1, xy2, xy3, xy4] of shape (n, 8).
@ -551,7 +551,7 @@ def xyxyxyxy2xywhr(x):
def xywhr2xyxyxyxy(x): def xywhr2xyxyxyxy(x):
""" """
Convert batched Oriented Bounding Boxes (OBB) from [xywh, rotation] to [xy1, xy2, xy3, xy4]. Rotation values should Convert batched Oriented Bounding Boxes (OBB) from [xywh, rotation] to [xy1, xy2, xy3, xy4]. Rotation values should
be in degrees from 0 to 90. be in radians from 0 to pi/2.
Args: Args:
x (numpy.ndarray | torch.Tensor): Boxes in [cx, cy, w, h, rotation] format of shape (n, 5) or (b, n, 5). x (numpy.ndarray | torch.Tensor): Boxes in [cx, cy, w, h, rotation] format of shape (n, 5) or (b, n, 5).