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
and0 <= y1 < y2
.- Returns:
the area for each box
- Return type:
Tensor[N]