Skip to content

feat(edt): add GPU-accelerated exact Euclidean Distance Transform using PBA+ algorithm#66

Open
aymuos15 wants to merge 4 commits intomasadcv:masterfrom
aymuos15:feat/Accurate_EuclidDistT_PBA+
Open

feat(edt): add GPU-accelerated exact Euclidean Distance Transform using PBA+ algorithm#66
aymuos15 wants to merge 4 commits intomasadcv:masterfrom
aymuos15:feat/Accurate_EuclidDistT_PBA+

Conversation

@aymuos15
Copy link
Copy Markdown

@aymuos15 aymuos15 commented Nov 26, 2025

I am working on a project where I would really benefit from this. Would it be possible to give this a review @tvercaut @masadcv

I do not have much experience in this space, so relying on AI a tiny bit for this one. I verified everything personally to the best of my abilities. Please do let me know if I missed anything.

Should close #49

@masadcv
Copy link
Copy Markdown
Owner

masadcv commented Mar 6, 2026

Hi @aymuos15
Many thanks for this, apologies for long delay.
I will review this soon and get back to you

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GPU implementation of an (intended) exact Euclidean Distance Transform (EDT) to FastGeodis using the PBA+ algorithm, along with Python bindings, tests, and docs/benchmarks to support the new API.

Changes:

  • Add CUDA/C++ implementation for exact (and signed) EDT in 2D/3D and expose it via pybind + Python API.
  • Add unit tests for the new EDT functions (including SciPy comparisons) and utility helpers for selecting the new functions.
  • Update README and add benchmark script + benchmark artifacts; add DISABLE_CUDA build flag.

Reviewed changes

Copilot reviewed 12 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
FastGeodis/geodis_pba.cu CUDA implementation of PBA+ EDT (2D + 3D) and signed EDT helpers
FastGeodis/geodis_pba.h CUDA function declarations for PBA+ EDT
FastGeodis/fastgeodis.h Public C++ API declarations for exact/signed exact EDT
FastGeodis/fastgeodis.cpp C++ entrypoints + pybind registrations for exact/signed exact EDT
FastGeodis/__init__.py Python-facing API + docstrings for exact/signed exact EDT
tests/test_pba.py New test suite for exact/signed exact EDT (incl. SciPy comparison)
tests/utils.py Adds function selectors/wrappers for the new EDT APIs
setup.py Adds DISABLE_CUDA env flag to force CPU-only builds
samples/test_speed_benchmark_pba.py Benchmark script comparing SciPy vs raster vs PBA+
README.md Documents new PBA+ exact EDT APIs + adds reference [12]
figures/*pba* Benchmark outputs (plots + JSON timings/errors)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

masadcv and others added 3 commits March 14, 2026 14:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] GPU implementation of accurate Euclidean Distance Transforms

3 participants