зеркало из https://github.com/microsoft/caffe.git
Merge pull request #3070 from mohomran/resize_nd-image_bug
bug in caffe.io.resize_image when applied to images with 2 or >3 channels
This commit is contained in:
Коммит
71e05876f6
|
@ -329,7 +329,7 @@ def resize_image(im, new_dims, interp_order=1):
|
|||
return ret
|
||||
else:
|
||||
# ndimage interpolates anything but more slowly.
|
||||
scale = tuple(np.array(new_dims) / np.array(im.shape[:2]))
|
||||
scale = tuple(np.array(new_dims, dtype=float) / np.array(im.shape[:2]))
|
||||
resized_im = zoom(im, scale + (1,), order=interp_order)
|
||||
return resized_im.astype(np.float32)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче