Visceral-Project / EvaluateSegmentation

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

Wrong values for background segmentation #13

Open brosscle opened 3 years ago

brosscle commented 3 years ago

Hello,

I want to evaluate a multiclass segmentation and I used your tool (which is efficient and easy to use, thanks!), but I guess I found an error when computing the metrics between the background of my ground truth segmentation and the background of my test segmentation. I created a nifti file containing 1 for the background and 0 for the other classes. Then since I evaluate small classes, this segmentation (background) fills nearly all the field of view of my nifti file.

But when I compute the metrics between these two segmentations (ground truth background and test background), I get an xml file with wrong values, for instance a DICE of 0.5, which is clearly underestimate, or a number of False Positive voxels way too high.

It seems that the 2 segmentations files are seen as shifted in relation to each other. Of course I checked their volume, resolution, and transform matrix but all these properties are identical for the two images. I opened the 2 files with FSL and ITKSnap, to ensure their overlap and they are definitely not shifted.

So I don't really know where does this error come from, and I am afraid that this error could have occur when comparing the other classes of my multiclass experiment. Do you have an idea about how to fix this issue ?

Thanks a lot for your help !

PS : In order to reproduce this issue, I attach the 2 nifti files containing the segmentations and a txt file containing the resulting metrics (I just converted the output xml file in txt since github doesn't support xml files). GroundThruth_Seg.nii.gz Test_Seg.nii.gz Metric_computed.txt