Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] Update API for consistency with upcoming scikit-image 0.19 #98

Closed
grlee77 opened this issue Sep 7, 2021 · 0 comments · Fixed by #190
Closed

[FEA] Update API for consistency with upcoming scikit-image 0.19 #98

grlee77 opened this issue Sep 7, 2021 · 0 comments · Fixed by #190
Labels
feature request New feature or request

Comments

@grlee77
Copy link
Contributor

grlee77 commented Sep 7, 2021

New functions introduced in 0.19 that are easy to port to cuCIM (via CuPy)

scikit-image/scikit-image#5158: Add normalized mutual information metric
scikit-image/scikit-image#5308: New illuminants were added to the color conversions
scikit-image/scikit-image#5382: Added ND butterworth filter
scikit-image/scikit-image#5420: Add no-reference perceptual blur metric.

Other easy functions are skimage.feature.blob_dog and skimage.feature.blob_log. Those two existed in v0.18, but had either bug fixes and/or a new argument added in v0.19.

channel_axis support:

scikit-image 0.19 adds a channel_axis argument that should now be used instead of the multichannel boolean. In scikit-image 1.0, the multichannel argument will likely be removed. We should start supporting channel_axis in cuCIM. Corresponding upstream PRs are:

scikit-image/scikit-image#5228: Decorators for helping with the multichannel->channel_axis transition
scikit-image/scikit-image#5284: multichannel to channel_axis (1 of 6): features and draw
scikit-image/scikit-image#5285: multichannel to channel_axis (2 of 6): transform functions
scikit-image/scikit-image#5286: multichannel to channel_axis (3 of 6): filters
scikit-image/scikit-image#5287: multichannel to channel_axis (4 of 6): metrics and measure
scikit-image/scikit-image#5288: multichannel to channel_axis (5 of 6): restoration
scikit-image/scikit-image#5289: multichannel to channel_axis (6 of 6): segmentation
scikit-image/scikit-image#5462: Add a channel_axis argument to functions in the skimage.color module
scikit-image/scikit-image#5427: residual multichannel->channel_axis fixes
scikit-image/scikit-image#5348: channel_as_last_axis decorator fix

Single-precision support

We did much of this already, but need to review for consistency with upstream now that it has been implemented there. Also, can expand the test cases using parameterization over dtypes as was done upstream.

scikit-image/scikit-image#4880: Richardson-Lucy deconvolution: allow single-precision computation
scikit-image/scikit-image#5200: Add float32 support to moments_hu
scikit-image/scikit-image#5204: single precision support in skimage.registration
scikit-image/scikit-image#5219: single precision support in skimage.restoration
scikit-image/scikit-image#5220: single precision support in skimage.metrics
scikit-image/scikit-image#5344: single precision support in moments functions
scikit-image/scikit-image#5353: single precision support in skimage.features
scikit-image/scikit-image#5354: single precision support in skimage.filters
scikit-image/scikit-image#5372: improved single precision support in skimage.transform
scikit-image/scikit-image#5373: single precision support in skimage.segmentation
scikit-image/scikit-image#5443: support single precision in skimage.color

API/Deprecations

  • The selem argument has been renamed to footprint throughout the library. The footprint argument is now deprecated. (rename selem to footprint everywhere scikit-image/scikit-image#5445)
  • Deprecate in_place in favor of the use of an explicit out argument in skimage.morphology.remove_small_objects, skimage.morphology.remove_small_holes and skimage.segmentation.clear_border
  • The input argument of skimage.measure.label has been renamed label_image. The old name is deprecated.
  • standardize on num_iter for paramters describing the number of iterations and max_num_iter for parameters specifying an iteration limit.
  • The names of several parameters in skimage.measure.regionprops have been updated so that properties are better grouped by the first word(s) of the name. The old names will continue to work for backwards compatibility.
  • In measure.label, the deprecated neighbors parameter has been removed (use connectivity instead).
  • The deprecated skimage.color.rgb2grey and skimage.color.grey2rgb functions have been removed (use skimage.color.rgb2gray and skimage.color.gray2rgb instead).
  • skimage.color.rgb2gray no longer allows grayscale or RGBA inputs.
  • The deprecated alpha parameter of skimage.color.gray2rgb has now been removed. Use skimage.color.gray2rgba for conversion to RGBA.
  • Attempting to warp a boolean image with order > 0 now raises a ValueError.
  • When warping or rescaling boolean images, setting anti-aliasing=True will raise a ValueError.
  • The bg_label parameter of skimage.color.label2rgb is now 0.
  • The deprecated skimage.feature.register_translation function has been removed (use skimage.registration.phase_cross_correlation instead).
  • The deprecated skimage.feature.masked_register_translation function has been removed (use skimage.registration.phase_cross_correlation instead).
  • The default mode in skimage.filters.hessian is now 'reflect'.
  • The default boundary mode in skimage.filters.sato is now 'reflect'.

Bug fixes

@grlee77 grlee77 added the feature request New feature or request label Sep 7, 2021
@rapids-bot rapids-bot bot closed this as completed in #190 Jan 26, 2022
rapids-bot bot pushed a commit that referenced this issue Jan 26, 2022
This PR builds on top of #189 and introduces new deprecations as in scikit-image 0.19.

closes #98

Specifically:
 `selem` -> `footprint`
`grey` -> `gray`
`iterations` -> `num_iter`
`max_iter` -> `max_num_iter`
`min_iter` -> `min_num_iter`

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

Approvers:
  - Jordan Jacobelli (https://github.com/Ethyling)
  - Gigon Bae (https://github.com/gigony)
  - AJ Schmidt (https://github.com/ajschmidt8)
  - https://github.com/jakirkham

URL: #190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant