Skip to content

Commit fba9648

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Document semantics of bounding box formats (#9141)
Summary: Co-authored-by: Nicolas Hug <[email protected]> Reviewed By: AntoineSimoulin Differential Revision: D79175036 fbshipit-source-id: 8352fca52e70187a1b81d987450a6960dd8a651b
1 parent eae63a0 commit fba9648

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

torchvision/tv_tensors/_bounding_boxes.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ class BoundingBoxFormat(Enum):
1616
1717
Available formats are:
1818
19-
* ``XYXY``
20-
* ``XYWH``
21-
* ``CXCYWH``
22-
* ``XYWHR``: rotated boxes represented via corner, width and height, x1, y1
23-
being top left, w, h being width and height. r is rotation angle in
19+
* ``XYXY``: bounding box represented via corners; x1, y1 being top left;
20+
x2, y2 being bottom right.
21+
* ``XYWH``: bounding box represented via corner, width and height; x1, y1
22+
being top left; w, h being width and height.
23+
* ``CXCYWH``: bounding box represented via centre, width and height; cx,
24+
cy being center of box; w, h being width and height.
25+
* ``XYWHR``: rotated boxes represented via corner, width and height; x1, y1
26+
being top left; w, h being width and height. r is rotation angle in
2427
degrees.
25-
* ``CXCYWHR``: rotated boxes represented via centre, width and height, cx,
26-
cy being center of box, w, h being width and height. r is rotation angle
28+
* ``CXCYWHR``: rotated boxes represented via center, width and height; cx,
29+
cy being center of box; w, h being width and height. r is rotation angle
2730
in degrees.
28-
* ``XYXYXYXY``: rotated boxes represented via corners, x1, y1 being top
29-
left, x2, y2 being top right, x3, y3 being bottom right, x4, y4 being
31+
* ``XYXYXYXY``: rotated boxes represented via corners; x1, y1 being top
32+
left; x2, y2 being top right; x3, y3 being bottom right; x4, y4 being
3033
bottom left.
3134
"""
3235

0 commit comments

Comments
 (0)