-
Notifications
You must be signed in to change notification settings - Fork 47
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
Feature request: allow segmentation to work when axes are reordered, e.g. orthogonal view #805
Comments
I think that makes sense, but it's a bit tricky. We pre-compute the embeddings for 3D segmentation, otherwise the segmentation is not interactive. So when switching the axis order the emebddings also need to be recomputed (which can take quite long on a CPU). I won't have time to do this myself in the near future, but I am happy to provide you with more concrete pointers in case you want to give it a go. |
Oh, I didn't realize the embeddings would need to be recomputed! I sort of assumed they'd be invariant I guess. |
No, the model processes each image slice by slice, with the embedding being computed for each slice. So if you want to do any reslicing of the data, including axis permutations, they need to be re-computed. That being said, for the axis orders we would just need three different versions of the embeddings, so at least on a GPU pre-computing these would not be such a big overhead. |
Thanks for the explanation. |
👍 I will leave this issue open.
It's probably best to remove them once a volume is done. And if the user has a GPU it's probably not necessary to cache them at all. Caching the embeddings to disc is optional, and mostly for users without a GPU to avoid long re-computation times.
Yes, exactly. That would work. |
So right now it always runs on the 0 axis, but it would be cool if it was aware of
viewer.dims.displayed
and used the non-displayed axis, this way you could change the axis order in napari and segment along a different orthogonal view.The text was updated successfully, but these errors were encountered: