Skip to content

Commit 3c2d549

Browse files
authored
update caffe.io to remove warnings
1. /u/relauto/.TOOLS_ROOT/ToolsCommon/SynopsysCaffe/S-2021.06-rc1-nocuda/Linux/lib/python3.6/site-packages/skimage/io/_io.py:49: UserWarning: `as_grey` has been deprecated in favor of `as_gray` warn('`as_grey` has been deprecated in favor of `as_gray`') 2. /u/relauto/.TOOLS_ROOT/ToolsCommon/SynopsysCaffe/S-2021.06-rc1-nocuda/Linux/lib/python3.6/site-packages/skimage/transform/_warps.py:110: UserWarning: Anti-aliasing will be enabled by default in skimage 0.15 to avoid aliasing artifacts when down-sampling images. warn("Anti-aliasing will be enabled by default in skimage 0.15 to "
1 parent 47d022a commit 3c2d549

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/caffe/io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def load_image(filename, color=True):
299299
of size (H x W x 3) in RGB or
300300
of size (H x W x 1) in grayscale.
301301
"""
302-
img = skimage.img_as_float(skimage.io.imread(filename, as_grey=not color)).astype(np.float32)
302+
img = skimage.img_as_float(skimage.io.imread(filename, as_gray=not color)).astype(np.float32)
303303
if img.ndim == 2:
304304
img = img[:, :, np.newaxis]
305305
if color:
@@ -329,7 +329,7 @@ def resize_image(im, new_dims, interp_order=1):
329329
# skimage is fast but only understands {1,3} channel images
330330
# in [0, 1].
331331
im_std = (im - im_min) / (im_max - im_min)
332-
resized_std = resize(im_std, new_dims, order=interp_order, mode='constant')
332+
resized_std = resize(im_std, new_dims, order=interp_order, mode='constant', anti_aliasing=None)
333333
resized_im = resized_std * (im_max - im_min) + im_min
334334
else:
335335
# the image is a constant -- avoid divide by 0

0 commit comments

Comments
 (0)