Visceral-Project / EvaluateSegmentation

A program to evaluate the quality of image segmentations.
Apache License 2.0
313 stars 87 forks source link

Hausdorff Percentile #18

Open kpayette opened 2 years ago

kpayette commented 2 years ago

I have been using the 95th percentile Hausdorff distance function in this tool, and have seen that while it calculates the max HD correctly, it seems to have problems with calculating percentile distances, drastically over-reporting the actual value. For example,

$ EvaluateSegmentation label1.nii.gz label2.nii.gz -use HDRFDST@0.95@ this command will give me an HD95 of 12.845233 (units: voxel). The average HD of these two labels (-use AVGDIST) is 0.159714 voxels. Looking at a different HD95 implementation (https://github.com/deepmind/surface-distance) for the same example, it gives the same max HD as this tool, but a much lower 95th percentile HD of 2.23 voxels (which seems to be correct, as this implementation also outputs the raw distance values generated and I could calculate the percentile myself). Could you please look into this issue?