MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / _apply_scale

Method _apply_scale

data/transforms.py:72–77  ·  view source on GitHub ↗
(self, width, height, scale)

Source from the content-addressed store, hash-verified

70 return max(stride, int(round(value / stride) * stride))
71
72 def _apply_scale(self, width, height, scale):
73 new_width = round(width * scale)
74 new_height = round(height * scale)
75 new_width = self._make_divisible(new_width, self.stride)
76 new_height = self._make_divisible(new_height, self.stride)
77 return new_width, new_height
78
79 def forward(self, img, img_num=1):
80 """

Callers 1

forwardMethod · 0.95

Calls 1

_make_divisibleMethod · 0.95

Tested by

no test coverage detected