cucim icon indicating copy to clipboard operation
cucim copied to clipboard

[FEA] support float16 dtype for many functions

Open grlee77 opened this issue 2 years ago • 0 comments

Description

We can easily preserve float16 dtype for many cucim.skimage.filters and cucim.skimage.transform functions because the underlying CuPy-based kernels already support it. This may generally be desirable, but two potential downsides are:

  • it is a deviation from upstream scikit-image behavior which always promotes float16->float32
  • a subset of algorithms/default parameters (e.g. default tolerance on iterative algorithms) may not be suitable for float16. In such cases we could still promote to larger dtypes as needed.

I think as long as we make the deviation from skimage dtype handling clear in the function docstrings it should be okay to allow operations on float16 images.

grlee77 avatar Sep 25 '22 23:09 grlee77