MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / area

Method area

detectron2/structures/boxes.py:175–184  ·  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

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

Callers 10

funcMethod · 0.95
assign_boxes_to_levelsFunction · 0.45
convert_to_coco_dictFunction · 0.45
convert_to_coco_dictFunction · 0.45
convert_to_coco_dictFunction · 0.45
pairwise_iouFunction · 0.45
pairwise_ioaFunction · 0.45
matched_boxlist_iouFunction · 0.45
prepare_targetsMethod · 0.45

Calls

no outgoing calls

Tested by 2

funcMethod · 0.76