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
91 stars 14 forks source link

Question about the weighting factor v #38

Closed Zrrr1997 closed 1 year ago

Zrrr1997 commented 1 year ago

Hi,

I am trying to tune the Geodesic Distance for the MSD Spleen dataset and wonder how exactly the v parameter should be fine-tuned.

The documentation states that it is a "weighting factor for establishing relationship between unary and spatial distances". My guess at looking at the code and re-reading the GeoS paper is that it balances the spatial and appearance correlation between the pixels/voxels, similarly to the energy terms in CRFs.

However, I could not really identify in which equation in GeoS I should look for this parameter so that I have a better understanding of how to tune it. Do high values of v enhance spatial or appearance correlation?

I would be grateful if you could shed some light onto this!

Thanks for the wonderful work!

Best, Zdravko

masadcv commented 1 year ago

Hi @Zrrr1997 Thats a very good question. You are right, varying v will vary the tradeoff between spatial gradient and appearance based energy optimisation.

In particular the use of v comes from the Generalised Geodesic Distance description from: Criminisi, Antonio, et al. "Geodesic image and video editing." ACM Trans. Graph. 29.5 (2010): 134-1. (link: https://search.iczhiku.com/paper/yHJzBI5aZkfmrKr4.pdf) - In particular have a look at equation 3 and the description in that section of the paper to get better understanding.

I hope that helps!

Muhammad Asad

masadcv commented 1 year ago

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