|
|
@ -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). |
|
|
|