Hausdorff Distance metric gets 'inf' #2179
Replies: 2 comments 20 replies
-
Hi @hsiangyuzhao , Thanks for your interest here. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Writing this response if somebody finds this in the future, distance metrics are not valid when one of the two surfaces is not present in the prediction. I am pretty sure the BRATS dataset has some cases where the more severe type of tumor is not present, invalidating surface distance. In fact the MONAI warning is explaining this, "UserWarning: the prediction of class 1 is all 0, this may result in nan/inf distance." |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you guys for developing such a good package for medical image computation. I am using MONAI to perform lesion segmentation on BraTS dataset and I use Dice and Hausdorff distance for metrics. But when training I found that for some certain cases the hausdorff distance would be inf (not nan), and I have no idea the cause of it. Would you guys help me to find out the cause?
Relevant code is pasted below:
as BraTS provides labels for enhancing tumor, NET/NCR and peritumoral edema, I need to transform these discrete labels into overrlaping ones (enhancing tumor, tumor core and whole tumor), the relevant code is pasted below:
Beta Was this translation helpful? Give feedback.
All reactions