仅胆囊(gallbladder)一项的测试输出一直为零
PsyFalos opened this issue · 2 comments
PsyFalos commented
您好,非常感谢您的佳作!
我根据您论文和代码中提供的数据集和参数进行训练,train.py中仅改为单卡,其余参数均保持不变,loss曲线基本和您在论文中提供的一致。尽管我后续尝试在SAMed_s中训练,但在多次实验中胆囊(gallbladder)一项的测试输出一直为零,请问您之前出现过这样的情况吗?若想继续实验,您对此有什么看法吗?
非常期待您的回复!
[23:37:28.165] Namespace(ckpt='checkpoints/sam_vit_b_01ec64.pth', config=None, dataset='Synapse', deterministic=1, img_size=512, input_size=224, is_savenii=True, list_dir='./lists/lists_Synapse/', lora_ckpt='checkpoints/epoch_159.pth', module='sam_lora_image_encoder', num_classes=8, output_dir='test_result', rank=4, seed=1234, vit_name='vit_b', volume_path='testset/test_vol_h5/')
[23:37:28.166] 12 test iterations per epoch
[23:38:59.852] idx 0 case case0008 mean_dice 0.527295 mean_hd95 21.377443
[23:39:54.194] idx 1 case case0022 mean_dice 0.770806 mean_hd95 4.669949
[23:40:55.758] idx 2 case case0038 mean_dice 0.765159 mean_hd95 25.186192
[23:42:53.797] idx 3 case case0036 mean_dice 0.735632 mean_hd95 21.632849
[23:44:23.750] idx 4 case case0032 mean_dice 0.752035 mean_hd95 21.606121
[23:45:48.850] idx 5 case case0002 mean_dice 0.767692 mean_hd95 3.460294
[23:46:50.981] idx 6 case case0029 mean_dice 0.724986 mean_hd95 10.587287
[23:48:58.910] idx 7 case case0003 mean_dice 0.568946 mean_hd95 71.162210
[23:50:36.973] idx 8 case case0001 mean_dice 0.735387 mean_hd95 29.145813
[23:52:09.987] idx 9 case case0004 mean_dice 0.719998 mean_hd95 14.410526
[23:53:06.392] idx 10 case case0025 mean_dice 0.743892 mean_hd95 14.421771
[23:54:05.707] idx 11 case case0035 mean_dice 0.733201 mean_hd95 6.732160
[23:54:05.821] Mean class 1 name spleen mean_dice 0.851005 mean_hd95 9.935130
[23:54:05.821] Mean class 2 name right kidney mean_dice 0.803415 mean_hd95 35.551708
[23:54:05.821] Mean class 3 name left kidney mean_dice 0.794743 mean_hd95 52.267896
[23:54:05.821] Mean class 4 name gallbladder mean_dice 0.000000 mean_hd95 0.000000
[23:54:05.821] Mean class 5 name liver mean_dice 0.935109 mean_hd95 24.490262
[23:54:05.821] Mean class 6 name stomach mean_dice 0.816656 mean_hd95 18.791718
[23:54:05.822] Mean class 7 name aorta mean_dice 0.864102 mean_hd95 6.200942
[23:54:05.822] Mean class 8 name pancreas mean_dice 0.631656 mean_hd95 15.690751
[23:54:05.822] Testing performance in best val model: mean_dice : 0.712086 mean_hd95 : 20.366051
[23:54:05.822] Testing Finished!
hitachinsk commented
这个问题之前有人发邮件问过我,目前来看可能是CUDA或者是软件库的版本的问题。一个解决方案就是将cudnn.deterministic给关掉(置为False),之后可以得到与论文报告的结果十分接近的结果。
PsyFalos commented
这个问题之前有人发邮件问过我,目前来看可能是CUDA或者是软件库的版本的问题。一个解决方案就是将cudnn.deterministic给关掉(置为False),之后可以得到与论文报告的结果十分接近的结果。
非常感谢您的回复,我已收到您的建议