Skip to content

Update cuCIM for consistency with scikit-image 0.26 (#1038)#1047

Merged
rapids-bot[bot] merged 1 commit intorapidsai:release/26.04from
gforsyth:python314_fixes_release_2604
Mar 17, 2026
Merged

Update cuCIM for consistency with scikit-image 0.26 (#1038)#1047
rapids-bot[bot] merged 1 commit intorapidsai:release/26.04from
gforsyth:python314_fixes_release_2604

Conversation

@gforsyth
Copy link
Copy Markdown
Contributor

Changes merged into main in 20fec39 that are needed for the 26.04 release if we want Python 3.14 support.

Cherry-picked to avoid the 26.06 tag on the main branch.

This PR ports recent API and implementation changes from scikit-image 0.26.

### Key Changes
- There is one new keyword argument, `boundary_mode` added to `binary_blobs`.
- There was some minor refactoring in `regionprops` and addition of one new property, "intensity_median".
- There are some new deprecations / removals
  - Previously deprecated `shift_x` and `shift_y` arguments to `erosion` and `dilation` are now removed
  - For `remove_small_objects`, the parameter `min_size` is deprecated in favor of `max_size`
  - For `remove_small_holes`, the parameter `area_threshold` is deprecated in favor of `max_size`
- many misc docstring fixes
- large refactor of geometric transforms code to match the scikit-image 0.26 behavior/API
  - most changes to `_shared/utils.py` are additional helpers related to this refactor (also ported from scikit-image 0.26)
- `cucim.skimage.segmentation` also now has a separate `__init__.pyi` for lazy loading 
- some existing test cases now load the local copies of test data from the repository instead of relying on `fetch` (fetch no longer works for these files in scikit-image 0.26).

### Possibly follow-up tasks
- provide batch implementation for `intensity_median` in `_regionprops_gpu.py`
- make decision on deprecating `cucim.skimage.morphology.binary_*` functions
  - These are deprecated now in scikit-image 0.26.
  - For cuCIM, the binary variants are around 2x faster so I kept them for now. A follow-up task would be to update the grayscale variants to automatically dispatch to the faster binary kernel when possible. Then we could remove the separate `binary_*` functions without losing performance.

### Directory layout change in scikit-image 0.26
- scikit-image has switched to separate `src/skimage` and `tests/skimage` folder layout.
- I have currently kept the existing folder layout in cuCIM (`tests` subfolder within each `cucim.skimage` module)

Authors:
  - Gregory Lee (https://github.com/grlee77)

Approvers:
  - Gil Forsyth (https://github.com/gforsyth)
  - Gigon Bae (https://github.com/gigony)

URL: rapidsai#1038
@gforsyth gforsyth added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Mar 17, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Mar 17, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@gforsyth gforsyth changed the base branch from main to release/26.04 March 17, 2026 13:00
@gforsyth gforsyth marked this pull request as ready for review March 17, 2026 13:55
@gforsyth gforsyth requested review from a team as code owners March 17, 2026 13:55
@gforsyth gforsyth requested a review from msarahan March 17, 2026 13:55
Copy link
Copy Markdown
Contributor

@grlee77 grlee77 left a comment

Choose a reason for hiding this comment

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

Thanks @gforsyth

@gforsyth
Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 77ad10a into rapidsai:release/26.04 Mar 17, 2026
61 checks passed
@gforsyth gforsyth deleted the python314_fixes_release_2604 branch March 17, 2026 14:44
@jakirkham jakirkham added this to the v26.04.00 milestone Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants