box_convert {torchvision} | R Documentation |
Box Convert
Description
Converts boxes from given in_fmt to out_fmt.
Usage
box_convert(boxes, in_fmt, out_fmt)
Arguments
boxes |
(Tensor[N, 4]): boxes which will be converted. |
in_fmt |
(str): Input format of given boxes. Supported formats are ['xyxy', 'xywh', 'cxcywh']. |
out_fmt |
(str): Output format of given boxes. Supported formats are ['xyxy', 'xywh', 'cxcywh'] |
Details
Supported in_fmt and out_fmt are:
'xyxy': boxes are represented via corners,
-
x_{min}, y_{min}
being top left and -
x_{max}, y_{max}
being bottom right.
-
'xywh' : boxes are represented via corner, width and height,
-
x_{min}, y_{min}
being top left, w, h being width and height.
-
'cxcywh' : boxes are represented via centre, width and height,
-
c_x, c_y
being center of box, w, h being width and height.
-
Value
boxes (Tensor[N, 4]): Boxes into converted format.
[Package torchvision version 0.7.0 Index]