box_xyxy_to_cxcywh: box_xyxy_to_cxcywh

View source: R/ops-box_convert.R

box_xyxy_to_cxcywhR Documentation

box_xyxy_to_cxcywh

Description

Converts bounding boxes from (x_{min}, y_{min}, x_{max}, y_{max}) format to (c_x, c_y, w, h) format. (x1, y1) refer to top left of bounding box (x2, y2) refer to bottom right of bounding box

Usage

box_xyxy_to_cxcywh(boxes)

Arguments

boxes

(Tensor[N, 4]): boxes in (x_{min}, y_{min}, x_{max}, y_{max}) format which will be converted.

Value

boxes (Tensor(N, 4)): boxes in (c_x, c_y, w, h) format.


torchvision documentation built on Aug. 8, 2025, 7:27 p.m.