box_area: Box Area

View source: R/ops-boxes.R

box_areaR Documentation

Box Area

Description

Computes the area of a set of bounding boxes, which are specified by its (x_{min}, y_{min}, x_{max}, y_{max}) coordinates.

Usage

box_area(boxes)

Arguments

boxes

(Tensor[N, 4]): boxes for which the area will be computed. They are expected to be in (x_{min}, y_{min}, x_{max}, y_{max}) format with

  • 0 \leq x_{min} < x_{max} and

  • 0 \leq y_{min} < y_{max}.

Value

area (Tensor[N]): area for each box


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