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

关于使用step3_TestOrInference.py函数对未处理图像进行预测时,无法找到预测图像 #43

Open
apuomline opened this issue Oct 30, 2023 · 1 comment

Comments

@apuomline
Copy link

你好,作者!我今天使用step3_TestOrInference.py函数进行预测时,Image.open(mask_file)函数出错。报错内容如下:
File "f:/liuxiao/TNSCUI2020-Seg-Rank1st-master/step2to4_train_validate_inference/step3_TestOrInference.py", line 202, in
GT = Image.open(mask_file)
File "F:\miniconda\envs\TNSCUI_Rank1\lib\site-packages\PIL\Image.py", line 3218, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'tn3k_dian2\tn3k_point\test-mask\0050'
预测数据集我放在在项目运行主目录下,应该不是由于没有使用绝对路径问题。我在训练模型时,读取图像的路径也使用的是相对路径。我猜想是不是由于Iamge.open函数的问题?

@WAMAWAMA
Copy link
Owner

WAMAWAMA commented Dec 6, 2023

应该是你的路径有问题,建议仔细检查一下

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

2 participants