MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / area

Method area

PATH/core/models/ops/boxes.py:170–179  ·  view source on GitHub ↗

Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.

(self)

Source from the content-addressed store, hash-verified

168 return Boxes(self.tensor.to(device=device))
169
170 def area(self) -> torch.Tensor:
171 """
172 Computes the area of all the boxes.
173
174 Returns:
175 torch.Tensor: a vector with areas of each box.
176 """
177 box = self.tensor
178 area = (box[:, 2] - box[:, 0]) * (box[:, 3] - box[:, 1])
179 return area
180
181 def clip(self, box_size: Tuple[int, int]) -> None:
182 """

Callers 3

pairwise_iouFunction · 0.45
pairwise_ioaFunction · 0.45
matched_pairwise_iouFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected