Skip to content

Commit

Permalink
Merge pull request #3070 from mohomran/resize_nd-image_bug
Browse files Browse the repository at this point in the history
bug in caffe.io.resize_image when applied to images with 2 or >3 channels
  • Loading branch information
jeffdonahue committed Sep 16, 2015
2 parents e4baef2 + b7f9cba commit 71e0587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/caffe/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 71e0587

Please sign in to comment.