Closed asifehmad closed 4 years ago
while training for the skin images data set on Google Colab I came across errors in a data preparation section. where this line:
img = np.double(sc.imresize(img, [height, width, channels], interp='bilinear', mode = 'RGB'))
and this line:
img2 = np.double(sc.imresize(img2, [height, width], interp='bilinear'))
showed errors, as scipy.misc.imresize is deprecated in newer versions of scipy. What I did is I used skimage.transform.resize instead of scipy.misc.imresize, that's what is recommended, as:
img = np.double(resize(img, (height, width, channels)))
Here I have imported resize from skimage.transform and
img2 = np.double(resize(img2, (height, width)))
It worked. But the problem is the data reading process has become very slow as compared to the scipy.misc.imresize. I had tested it before on old version of scipy.misc.imresize. Any help in this regard would be very much appreciated. Thanks!
Or any alternate way of reading the images would be helpful. The reading process in this way has taken more than 2 hours.
while training for the skin images data set on Google Colab I came across errors in a data preparation section. where this line:
img = np.double(sc.imresize(img, [height, width, channels], interp='bilinear', mode = 'RGB'))
and this line:
img2 = np.double(sc.imresize(img2, [height, width], interp='bilinear'))
showed errors, as scipy.misc.imresize is deprecated in newer versions of scipy. What I did is I used skimage.transform.resize instead of scipy.misc.imresize, that's what is recommended, as:
img = np.double(resize(img, (height, width, channels)))
Here I have imported resize from skimage.transform and
img2 = np.double(resize(img2, (height, width)))
It worked. But the problem is the data reading process has become very slow as compared to the scipy.misc.imresize. I had tested it before on old version of scipy.misc.imresize. Any help in this regard would be very much appreciated. Thanks!