Learn R Programming

torchvision (version 0.7.0)

box_area: 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)

Value

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

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}\).