Shortcuts

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]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources