masadcv / FastGeodis

Fast Implementation of Generalised Geodesic Distance Transform for CPU (OpenMP) and GPU (CUDA)
https://fastgeodis.readthedocs.io
BSD 3-Clause "New" or "Revised" License
90 stars 14 forks source link

[General Question] Threshold for Geodesic Distance #37

Closed Zrrr1997 closed 1 year ago

Zrrr1997 commented 1 year ago

Hi there! First of all, this is a wonderful implementation and I have had a very pleasant experience so far.

I have a general question of understanding regarding Geodesic Distances as a whole. I have applied your method to the MSD Spleen dataset and got good results when training the MONAI Label DeepEdit model (instead of using Gaussian Heatmaps as guidance, I replaced it with GeoDis maps).

However, it required a lot of manual tuning of the threshold for the Geodesic Distance. I struggled to find a systematic and consistent way to justify my choice for such a threshold. It seems that MIDeepSeg tackles this exact problem and the authors state that other methods simply empirically find the optimal threshold value (i.e. you have to do a grid search and train multiple models).

My question would be: Is there a systematic way to find this threshold or is it problem-specific and requires a grid search?

Here are some more images which describe my problem:

masadcv commented 1 year ago

Hi @Zrrr1997

Interesting question and very encouraging initial results. I am unsure what you mean by thresholding here. I believe this may be related to your other question about v.

If you are referring to one of the parameters (I dont remember particularly if I used a thresholding in here) then the parameters do need fine-tunning and any such tunning might be problem specific. Of course there are ways to get around this, for example if you use exponential geodesic distances as proposed in MIDeepSeg, you may have much more stable distance maps which you can use for training DeepEdit.

I am happy to discuss this in more details offline, please feel free to reach out on my kcl email and we can arrange to have a more detailed discussion around this.

masadcv commented 1 year ago

Closing this as I already had one-to-one discussion with you regarding the questions you have.