Diff-UNet icon indicating copy to clipboard operation
Diff-UNet copied to clipboard

The reason why the author's results cannot be reproduced

Open ZhengChen6 opened this issue 11 months ago • 3 comments

作者您好! 我猜测在issue种很多人无法复现您的结果是因为您在您的代码种用os.listdir获得目录然后再划分训练集和测试集,一旦更换主机,os.listdir得到的文件的顺序是不一样的,所以我们最终划分的数据集和您的数据集是不一样的。我分别尝试在两台主机上打印os.listdir获得的目录顺序,发现其不一致。 image

主机一: image

主机二: image

我建议您对os.listdir后的all_dirs进行排序后再划分数据集!

I guess that many people in the issue cannot reproduce your results because you use os.listdir in your code to obtain the dirs and then divide the training set and test set. Once the host is changed, the order of the files obtained by os.listdir is not the same. The same, so the data set we finally divided is different from your data set. I tried to print the directory order obtained by os.listdir on the two hosts and found that it was inconsistent. @ge-xing

ZhengChen6 avatar Mar 28 '24 10:03 ZhengChen6

Thank you~

ge-xing avatar Mar 28 '24 12:03 ge-xing

作者您好如何编写代码保存模型的预测分割图,我看你是有写到图片保存函数的但是你没有调用

zz973 avatar Jul 13 '24 09:07 zz973

validation_step 里面 得到预测结果以后,调用sitk的函数保存为nii gz文件就行

ge-xing avatar Jul 13 '24 15:07 ge-xing