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

计算ASSD #11

Open
5ummer23 opened this issue Jul 10, 2024 · 9 comments
Open

计算ASSD #11

5ummer23 opened this issue Jul 10, 2024 · 9 comments

Comments

@5ummer23
Copy link

感谢您的工作!我在尝试使用您提供的infer脚本进行测试时,想使用medpy库中的assd与hd95函数计算,但是assd一直报错并无法解决,hd95可以正常使用,请问您是否可以提供计算assd和hd95的方法,十分感谢您!
image
image

@ZAX130
Copy link
Owner

ZAX130 commented Jul 10, 2024 via email

@5ummer23
Copy link
Author

作者你好,想请教您关于Mind101数据集dice值特别低,第一个epoch的dice才只有0.47,请问您清楚是什么原因吗,图片大小为160x192x160
截屏2024-09-11 14 49 38
截屏2024-09-11 14 49 56

@ZAX130
Copy link
Owner

ZAX130 commented Sep 11, 2024 via email

@5ummer23
Copy link
Author

可以说一下更详细的实验设置吗

---原始邮件--- 发件人: @.> 发送时间: 2024年9月11日(周三) 下午2:51 收件人: @.>; 抄送: "Haiqiao @.@.>; 主题: Re: [ZAX130/SmileCode] 计算ASSD (Issue #11) 作者你好,想请教您关于Mind101数据集dice值特别低,第一个epoch的dice才只有0.47,请问您清楚是什么原因吗,图片大小为160x192x160 2024-09-11.14.49.38.png (view on web) 2024-09-11.14.49.56.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

epoch设置为30,其他的一些参数均为您在代码中给出的

@ZAX130
Copy link
Owner

ZAX130 commented Sep 12, 2024 via email

@5ummer23
Copy link
Author

按照您论文中的方式使用了NKI-RS-22 和数据集NKI-TRT-20,然后就简单的裁剪到160x192x160尺寸,其他没有做处理

@ZAX130
Copy link
Owner

ZAX130 commented Sep 12, 2024 via email

@5ummer23
Copy link
Author

老师请问您可以提供一下计算assd和hd95的代码嘛,在您给出的infer.py中没有,之前您说需要一个类一个类去算,我尝试添加但是无法实现该计算 T T

@ZAX130
Copy link
Owner

ZAX130 commented Sep 15, 2024

Here is an example.

from medpy import metric
import numpy as np

def assd_val(y_pred, y_true, C=None,spacing=None):
    C = C or np.unique(y_true).shape[0]
    total = []
    for i in range(1, C+1):
        total.append(metric.assd(y_pred == i, y_true == i, voxelspacing=spacing))
    total.append(np.mean(total))
    return total

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