Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some questions #1

Open
ruti0823 opened this issue May 25, 2024 · 3 comments
Open

some questions #1

ruti0823 opened this issue May 25, 2024 · 3 comments

Comments

@ruti0823
Copy link

您好,我在运行您的代码时遇到了一些问题,还烦请您百忙之中能帮我看一下。
'''
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
Copy link
Owner

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
Copy link
Author

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!

@zs1314
Copy link

zs1314 commented Aug 23, 2024

您好,感谢您出色的工作!不知道您能否通过网盘提供数据集文件,官网上文件太多,我们对处理感到困难。再次谢谢您!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants