未验证 提交 e860a5d0 编写于 作者: Q qingqing01 提交者: GitHub

Fix flowers dataset in relase/0.15.0 (#13091)

* Fix bug in flowers dataset. (#13024)
上级 cfe611f1
...@@ -203,7 +203,7 @@ def resize_short(im, size): ...@@ -203,7 +203,7 @@ def resize_short(im, size):
h_new = size * h // w h_new = size * h // w
else: else:
w_new = size * w // h w_new = size * w // h
im = cv2.resize(im, (h_new, w_new), interpolation=cv2.INTER_CUBIC) im = cv2.resize(im, (w_new, h_new), interpolation=cv2.INTER_CUBIC)
return im return im
...@@ -345,7 +345,6 @@ def simple_transform(im, ...@@ -345,7 +345,6 @@ def simple_transform(im,
if np.random.randint(2) == 0: if np.random.randint(2) == 0:
im = left_right_flip(im, is_color) im = left_right_flip(im, is_color)
else: else:
im = center_crop(im, crop_size, is_color)
im = center_crop(im, crop_size, is_color=is_color) im = center_crop(im, crop_size, is_color=is_color)
if len(im.shape) == 3: if len(im.shape) == 3:
im = to_chw(im) im = to_chw(im)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册