feat(n4): GPU-accelerated N4 bias field correction#109
Open
FIrgolitsch wants to merge 1 commit intochain-mergedfrom
Open
feat(n4): GPU-accelerated N4 bias field correction#109FIrgolitsch wants to merge 1 commit intochain-mergedfrom
FIrgolitsch wants to merge 1 commit intochain-mergedfrom
Conversation
Add N4 bias-field correction with CPU/GPU backends, replacing the
previous z-intensity normalization approach.
Library:
- linumpy/intensity/bias_field.py: high-level API for N4 correction
- linumpy/intensity/normalization.py: extended to support N4 backend
- linumpy/gpu/{bias_field,bspline,n4}.py: GPU kernels (CuPy)
- Removes linumpy/gpu/normalization.py (superseded)
Scripts:
- scripts/linum_correct_bias_field.py: replaces linum_normalize_z_intensity
- scripts/diagnostics/linum_benchmark_n4_gpu.py: CPU vs GPU performance
- scripts/diagnostics/linum_n4_gpu_visual_compare.py: visual comparison
Tests:
- linumpy/tests/test_bias_field*.py
- linumpy/tests/test_gpu_{bspline,n4}.py
- linumpy/tests/test_n4_gpu_{equivalency,perf}.py
- Extended test_intensity_normalization.py
Workflow integration:
- workflows/reconst_3d/soct_3d_reconst.nf: add correct_bias_field process
- workflows/reconst_3d/nextflow.config: N4 parameters
Build:
- pyproject.toml: swap entry-point linum_normalize_z_intensity ->
linum_correct_bias_field, add scipy-stubs/networkx-stubs dev deps,
add lint exemptions for linumpy/gpu/* and N4 diagnostic scripts
Docs:
- docs/N4_GPU.md: GPU acceleration guide
- docs/n4_gpu_benchmark.json + image: performance data
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.
Adds N4 bias-field correction with CPU/GPU backends, replacing the previous z-intensity normalization.
Stacked PR. Base will be retargeted to
mainonce the chain (#95, #97, #98, #99, #100, #101, #108, #106, #107, #87) merges.Library
linumpy/intensity/bias_field.py\u2014 high-level APIlinumpy/intensity/normalization.py\u2014 extended for N4 backendlinumpy/gpu/{bias_field,bspline,n4}.py\u2014 GPU kernels (CuPy)linumpy/gpu/normalization.py(superseded)Scripts
scripts/linum_correct_bias_field.py\u2014 replaceslinum_normalize_z_intensityscripts/diagnostics/linum_benchmark_n4_gpu.pyscripts/diagnostics/linum_n4_gpu_visual_compare.pyTests
linumpy/tests/test_bias_field*.py,test_gpu_{bspline,n4}.pylinumpy/tests/test_n4_gpu_{equivalency,perf}.pytest_intensity_normalization.pyWorkflow integration
workflows/reconst_3d/soct_3d_reconst.nf: addscorrect_bias_fieldprocessworkflows/reconst_3d/nextflow.config: N4 parametersBuild
pyproject.toml: entry-point swap (linum_normalize_z_intensity\u2192linum_correct_bias_field),scipy-stubs/networkx-stubsdev deps, lint exemptions forlinumpy/gpu/*and N4 diagnostic scripts