WAMAWAMA / TNSCUI2020-Seg-Rank1st

This is the source code of the 1st place solution for segmentation task in MICCAI 2020 TN-SCUI challenge.
481 stars 78 forks source link

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

Open apuomline opened 12 months ago

apuomline commented 12 months ago

你好,作者!我今天使用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 commented 10 months ago

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