box_area¶
- torchvision.ops.box_area(boxes: Tensor, fmt: str = 'xyxy') Tensor [source]¶
Computes the area of a set of bounding boxes from a given format.
- Parameters:
boxes (Tensor[..., 4]) – boxes for which the area will be computed.
fmt (str) – Format of the input boxes. Default is “xyxy” to preserve backward compatibility. Supported formats are “xyxy”, “xywh”, and “cxcywh”.
- Returns:
Tensor containing the area for each box.
- Return type:
Tensor[N]