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

推理过程中,flod_flag设为False时预测结果为0。 #44

Open apuomline opened 12 months ago

apuomline commented 12 months ago

作者,你好!我在运行推理函数step3_TestOrInference.py时,将fold_flag设为False后模型预测结果直接输出为0。但是当我将flod_flag设为True时,模型可以输出结果。会有预测结果图像生成。 image

下面是我更改的代码部分: img_path = r'tn3k_dian2\tn3k_point\test-image' mask_path = r'tn3k_dian2\tn3k_point\test-mask' csv_file = r'tn3k_dian2\output.csv' save_path = r'inference'

# 是否使用设定好的分折信息
fold_flag =False  # 预测测试集则设置为False直接读取img_path中PNG文件进行测试,True则使用分折信息

使用的模型权重文件也存在: weight_c1=r'result\TNSCUI\dpv3plus_stage1_5_1\models\epoch400_Testdice0.0000.pkl' weight_c2=r'result\TNSCUI\dpv3plus_stage2_5_1\models\epoch400_Testdice0.0000.pkl'

请问问题出在哪里?

HolicAnn commented 10 months ago

@apuomline 老哥,想请教一下,为啥我一直调不起来GPU,怎么设置都是CPU在跑