-
Notifications
You must be signed in to change notification settings - Fork 9
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
你好,如何使用ANTs得到下面的这样的分割图? #6
Comments
我们采用了ANTsPyNet (https://github.com/ANTsX/ANTsPyNet) 这个第三方库进行自动分割。具体我们调用了其antspynet.utilities.deep_atropos。关于这个function的说明可以在这里找:https://antsx.github.io/ANTsPyNet/docs/build/html/utilities.html#applications |
我们论文里面的图像是采用itk-snap进行显示的。从你的结果来看,应该是对的。另外关于IOU和dice指标的计算网上有比较多的实现,以下是一个参考代码 import numpy as np
def iou(mask1, mask2):
intersection = np.logical_and(mask1, mask2).sum()
union = np.logical_or(mask1, mask2).sum()
iou_score = intersection / union
return iou_score
def dice_coefficient(mask1, mask2):
intersection = np.logical_and(mask1, mask2).sum()
total = mask1.sum() + mask2.sum()
dice = (2.0 * intersection) / total
return dice |
ok,谢谢,我试一下,感谢!Ma在 2023年6月7日,下午11:59,Qing Wu ***@***.***> 写道:
我们论文里面的图像是采用itk-snap进行显示的。从你的结果来看,应该是对的。另外关于IOU和dice指标的计算网上有比较多的实现,以下是一个参考代码
import numpy as np
def iou(mask1, mask2):
intersection = np.logical_and(mask1, mask2).sum()
union = np.logical_or(mask1, mask2).sum()
iou_score = intersection / union
return iou_score
def dice_coefficient(mask1, mask2):
intersection = np.logical_and(mask1, mask2).sum()
total = mask1.sum() + mask2.sum()
dice = (2.0 * intersection) / total
return dice
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: