wurenkai / MHorUNet

[BSPC] The official code for "MHorUNet: High-order spatial interaction UNet for skin lesion segmentation".
MIT License
10 stars 0 forks source link

some questions #1

Open ruti0823 opened 1 month ago

ruti0823 commented 1 month ago

您好,我在运行您的代码时遇到了一些问题,还烦请您百忙之中能帮我看一下。 ''' img = sc.imread(Tr_list[idx]) img = np.double(sc.imresize(img, [height, width, channels], interp='bilinear', mode = 'RGB')) '''

img = Image.open(Tr_list[idx]).convert('RGB')
img = img.resize((height, width), resample=Image.BILINEAR)
img = np.array(img)

Data_train[idx, :, :, :] = img

在使用您的上面这段代码时,因为报错sc操作有问题,因此我换成了下面的代码。但是在训练时,它生成的混淆矩阵是这样的confusion_matrix: [[1309771 949] [ 0 0]],这看起来不太对。烦请您帮忙看一下

wurenkai commented 1 month ago

Hi, according to your description, you are using sc in preparing the dataset and are having problems is that right. This is because of the library version. I suggest you to create a new environment for data preparation. Do the following and it will work fine:

Data preprocessing environment installation (python=3.7):

conda create -n tool python=3.7
conda activate tool
pip install h5py
conda install scipy==1.2.1  # scipy1.2.1 only supports python 3.7 and below.
pip install pillow
ruti0823 commented 1 month ago

Thank you very much for your help. My problem has been solved. The code you write is very clear and provides a good help to beginners!