MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / random_scale_with_length

Function random_scale_with_length

utils/transforms.py:126–133  ·  view source on GitHub ↗
(img, gt, length)

Source from the content-addressed store, hash-verified

124
125
126def random_scale_with_length(img, gt, length):
127 size = random.choice(length)
128 sh = size
129 sw = size
130 img = cv2.resize(img, (sw, sh), interpolation=cv2.INTER_LINEAR)
131 gt = cv2.resize(gt, (sw, sh), interpolation=cv2.INTER_NEAREST)
132
133 return img, gt, size
134
135
136def random_mirror(img, gt):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected