-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
Segmentation Masks #269
Comments
We've used this model in skimage before, see |
@jni curious how you think this might fit in with the idea to make The thing that is most challenging for me to imagine with this layer is how do we render overlapping regions? Do we blend the respective colors of the labels, do we just show the "largest" color, do we show something else? Blending probably makes the most sense, but I'm slightly nervous about it |
@sofroniewn I don't have an answer to your questions. Glad this is in 0.2.0 because I think there's a reason overlapping segmentations are generally poorly if at all supported in the libraries I've worked with: it's messy so no one wants to do it. I also think there's various workarounds, such as using multiple Labels layers. |
Following discussion in zulip around blending with @bethac07 and @0x00b1
|
Hi, I started working on this today. |
Awesome, not sure if you've been following this thread ome/ngff#19, but would be great to make sure that whatever support we have in napari naturally pairs well with whatever the ngff folks decide around overlapping labels (and vice versa) cc @joshmoore Feel free to ping in zulip if you have any questions/ run into any stumbling blocks |
# References and relevant issues First noted here: #6384 (comment) # Description There is an orphan `:orphan:` tag at the top of NAP-8. Pretty sure it's not doing anything--the other naps don't have it. This deletes it.
🚀 Feature
Add support for displaying segmentation instance masks.
Motivation
Many projects, including
starfish
and the 2018 kaggle data science bowl use segmentation masks to represent labeled regions in an image.As of writing this, napari represents labeled regions in a "label image," a singular integer array where each positive integer marks a region. While it is trivial and non-lossy to convert a label image to a list of segmentation masks, it is lossy to convert a list of segmentation masks to a label image due to the potential of overlaps.
Pitch
Instead of representing the data contained in
Labels
layers with an MxN label image of P integers, represent it with a PxMxN boolean array of segmentation masks.Alternatives
To save on memory, the segmentation masks could be represented with xarrays so as to only allocate memory for the bounding box of each mask, or use a sparse array.
Additional context
This feature request was spurred from a conversation with @sofroniewn and @ambrosejcarr
The text was updated successfully, but these errors were encountered: