MCPcopy Create free account
hub / github.com/HYUNJS/SGT / __init__

Method __init__

projects/Datasets/Transforms/transform.py:58–63  ·  view source on GitHub ↗
(self, new_shape, dst_constant, ratio, padding, interpolation=None, border_type=None, color=(127.5, 127.5, 127.5))

Source from the content-addressed store, hash-verified

56class LetterBoxTransform(Transform):
57
58 def __init__(self, new_shape, dst_constant, ratio, padding, interpolation=None, border_type=None, color=(127.5, 127.5, 127.5)):
59 super().__init__()
60 self._set_attributes(locals())
61 self.interpolation = cv2.INTER_AREA if interpolation is None else interpolation
62 self.border_type = cv2.BORDER_CONSTANT if border_type is None else border_type
63 self.color = color
64
65 def apply_image(self, img, interp=None):
66 top, bottom, left, right = self.dst_constant

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected