LTS4 / universal

239 stars 94 forks source link

scipy.misc.imread/imresize has been depreciated #8

Open gracequeen opened 5 years ago

gracequeen commented 5 years ago

Hi. Please be aware that imread/imresize under scipy.misc has been removed from 1.2.0/1.3.0. .https://docs.scipy.org/doc/scipy-1.2.1/reference/generated/scipy.misc.imread.html Thank you for the work!

DhruvAthaide commented 1 year ago

Yeah, I think you can fix this issue by changing a few lines in prepare_imagenet_data.py

First change: from scipy.misc import imread, imresize To: import imageio

Second change: img = imread(im_path, mode='RGB') To: img = imageio.imread(im_path, mode='RGB')

Third change: img = imresize(img,img_size) To: img = imageio.imresize(img,img_size)

This should fix the Scipy.misc Deprecation problem. Screenshot 2023-07-22 120357