NifTK / NiftyNet

[unmaintained] An open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy
http://niftynet.io
Apache License 2.0
1.36k stars 403 forks source link

Segmentation evaluation creates accumulative n_pos_ref across all labels. #433

Closed carlpe closed 5 years ago

carlpe commented 5 years ago

I have successfully trained and inferred using densevnet, but I have an issue concerning the evaluation.

After I run evaluation and get the .csv file, I see that the numbers for n_pos_ref (Ground truth voxels) are not divided into separate labels, but seems to be an accumulative number of all three labels. The n_pos_seg (inferred voxels) work properly and are seperated into each specific label.

Why does this happen? I have tried changing evaluation_units to label, cc and foreground. I have checked that the histogram_ref_file is correct. I have tried changing label_normalisation to false. But no matter what I do, the n_pos_ref adds up all voxels from all my labels, I would like it to be in the same manner that n_pos_seg is presented.

Without dividing the labels into the correct label voxel volume I can not evaluate properly.

Screenshot 2019-08-22 at 20 58 06
carlpe commented 5 years ago

It is working now - turns out that is was a bug in segmentation_evaluations.py

https://github.com/NifTK/NiftyNet/issues/245?fbclid=IwAR3SypbLm7gyyizQuGU6LWieHnlDD4wctGXPzHeLAweAm9A1MhLzohkgTBI#event-2375796140

The solution suggested in #245 solved the issue.