Closed londumas closed 8 months ago
Hi, Thanks for raising this. There are different methods that can be used for implementing distance transform. For this FastGeodis library the primary focus has been to improve runtime for Geodesic distance transforms using a specific algorithm that can be parallelized on both CPU and GPU.
This library can also be used for computing Euclidean distance transforms, however since that has not been our focus to optimize (you can already find optimized implementations for it) therefore it does not come as surprise that existing methods are faster.
By the way, if you want to work with Euclidean distance transforms - it is recommended to use PixelQueue or Fast Marching methods as generalised_geodesic** functions may at best produce approximations of the Euclidean distance transform.
I am closing this issue as described above, it is not relevant for this library to optimize Euclidean distance transforms
Thank you for the lib, the GPU acceleration saved my day!
When looking at the time performances of
FastGeodis.generalised_geodesic2d
versus the corresponding Euclideansp.ndimage.distance_transform_cdt
:This might be expected, but is a little bit conterintuitive, specially looking at the plots from the README. However, I totally understand that this latter plot is on Non-Euclidean space