Shortcuts

box_area

torchvision.ops.box_area(boxes: Tensor) Tensor[source]

Computes the area of a set of bounding boxes, which are specified by their (x1, y1, x2, y2) coordinates.

Parameters:

boxes (Tensor[N, 4]) – boxes for which the area will be computed. They are expected to be in (x1, y1, x2, y2) format with 0 <= x1 < x2 and 0 <= y1 < y2.

Returns:

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