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

Method scale

detectron2/structures/boxes.py:273–278  ·  view source on GitHub ↗

Scale the box with horizontal and vertical scaling factors

(self, scale_x: float, scale_y: float)

Source from the content-addressed store, hash-verified

271 return (self.tensor[:, :2] + self.tensor[:, 2:]) / 2
272
273 def scale(self, scale_x: float, scale_y: float) -> None:
274 """
275 Scale the box with horizontal and vertical scaling factors
276 """
277 self.tensor[:, 0::2] *= scale_x
278 self.tensor[:, 1::2] *= scale_y
279
280 @classmethod
281 def cat(cls, boxes_list: List["Boxes"]) -> "Boxes":

Callers 2

detector_postprocessFunction · 0.45
run_stepMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected