Closed FengMu1995 closed 2 years ago
why did you write the "util.imresize_np" function? Is there a difference between cv2.resize and util.imresize_np?
..... if sf == 4 and random.random() < scale2_prob: # downsample1 if np.random.rand() < 0.5: img = cv2.resize(img, (int(1/2img.shape[1]), int(1/2img.shape[0])), interpolation=random.choice([1,2,3])) else: img = util.imresize_np(img, 1/2, True) img = np.clip(img, 0.0, 1.0) sf = 2 ......
util.imresize_np is similar to matlab's bicubic imresize function. It is different from bicubic imresize by cv2.resize.
thanks
why did you write the "util.imresize_np" function? Is there a difference between cv2.resize and util.imresize_np?
..... if sf == 4 and random.random() < scale2_prob: # downsample1 if np.random.rand() < 0.5: img = cv2.resize(img, (int(1/2img.shape[1]), int(1/2img.shape[0])), interpolation=random.choice([1,2,3])) else: img = util.imresize_np(img, 1/2, True) img = np.clip(img, 0.0, 1.0) sf = 2 ......