feat(edt): add GPU-accelerated exact Euclidean Distance Transform using PBA+ algorithm#66
Open
aymuos15 wants to merge 4 commits intomasadcv:masterfrom
Open
feat(edt): add GPU-accelerated exact Euclidean Distance Transform using PBA+ algorithm#66aymuos15 wants to merge 4 commits intomasadcv:masterfrom
aymuos15 wants to merge 4 commits intomasadcv:masterfrom
Conversation
…ng PBA+ algorithm
Owner
|
Hi @aymuos15 |
There was a problem hiding this comment.
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_CUDAbuild 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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