UltraLight-VM-UNet icon indicating copy to clipboard operation
UltraLight-VM-UNet copied to clipboard

scipy.misc is deprecated and has no attribute imread.

Open liubaoning111 opened this issue 10 months ago • 8 comments

Hello, this version of the package has been deprecated, what version are you using?

liubaoning111 avatar Apr 05 '24 08:04 liubaoning111

Hi! The version of scipy used is 1.2.1.

wurenkai avatar Apr 05 '24 10:04 wurenkai

This steps here helped me with the data preprocessing:

conda install scipy==1.2.1
pip install pillow

Then python Prepare_ISIC2017.py

heitorrapela avatar Apr 05 '24 22:04 heitorrapela

This steps here helped me with the data preprocessing:

conda install scipy==1.2.1
pip install pillow

Then python Prepare_ISIC2017.py

Did you install the environment according to the author's steps? Why can't I degrade the version of scipy following your method? image with conda install scipy==1.2.1 image with pip install scipy==1.2.1 image

Zong-Liang avatar Apr 11 '24 12:04 Zong-Liang

@Zong-Liang Installation of scipy== version 1.2.1 requires python version 3.7 and below. We have created an environment named tool for pre-processing data as follows:

conda create -n tool python=3.7
conda activate tool
pip install h5py
conda install scipy==1.2.1
pip install pillow

wurenkai avatar Apr 11 '24 13:04 wurenkai

Hi, on my side, I also isolated the env just for the preprocessing. Best regards.

heitorrapela avatar Apr 11 '24 14:04 heitorrapela

@Zong-Liang Installation of scipy== version 1.2.1 requires python version 3.7 and below. We have created an environment named tool for pre-processing data as follows:

conda create -n tool python=3.7
conda activate tool
pip install h5py
conda install scipy==1.2.1
pip install pillow

Thx for your reply. After obtaining the .npy file using your method, I tried training with isic18, but encountered the following error. I reinstalled the environment once again, but the problem persists. image image

Zong-Liang avatar Apr 11 '24 14:04 Zong-Liang

@Zong-Liang You should be able to get help in issue 6.

wurenkai avatar Apr 11 '24 14:04 wurenkai

It works for me. python==3.10

import imageio.v3 as iio
from skimage.transform import resize
img = iio.imread(img_path)
img = np.double(resize(img, [height, width], order=1))

SvetlanaShine avatar Jul 31 '24 03:07 SvetlanaShine