You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added support for >2^16 masks with np.uint32, if there are <2^16 masks then the masks are returned as np.uint16 still
This makes it extremely hard to use in a distributed setting like dask where they data types must be known in advance and should be the same for every chunk (you are effectively indicating that data chunks with fewer masks may be a different data type).
If you are internally using a bigger data type and changing it when #masks<2**16, then this is a pre-optimization that people may not need -- you can just leave that optimization to the user anyway.
It would be nice to use that same standard as scikit-image, and always return the same data type (preferable signed). This allows a user to "drop in" cellpose to their code without having to potentially rework around the API.
The text was updated successfully, but these errors were encountered:
chrisroat
changed the title
Always return the same size
Always return the same data type
Jan 19, 2022
I noticed this in the recent release:
This makes it extremely hard to use in a distributed setting like dask where they data types must be known in advance and should be the same for every chunk (you are effectively indicating that data chunks with fewer masks may be a different data type).
If you are internally using a bigger data type and changing it when #masks<2**16, then this is a pre-optimization that people may not need -- you can just leave that optimization to the user anyway.
It would be nice to use that same standard as scikit-image, and always return the same data type (preferable signed). This allows a user to "drop in" cellpose to their code without having to potentially rework around the API.
The text was updated successfully, but these errors were encountered: