MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / resizeAug

Function resizeAug

dataload/dataAug.py:138–144  ·  view source on GitHub ↗
(img, HThresh=25)

Source from the content-addressed store, hash-verified

136
137
138def resizeAug(img, HThresh=25):
139 if img.shape[0] > HThresh:
140 h, w = img.shape[:2]
141 ratio = np.random.randint(4, 8) / 10.
142 img = cv2.resize(img, None, fx=ratio, fy=ratio)
143 img = cv2.resize(img, (w, h))
144 return img
145
146
147def random_dilute(image, sele_value=50, set_value=20, num_ratio=[0.1, 0.2]):

Callers 1

warpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected