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

[BUG]: Outliers in cell segmentation points (both for ['mask'] and ['outlines']) #887

Open
postnubilaphoebus opened this issue Mar 6, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@postnubilaphoebus
Copy link

postnubilaphoebus commented Mar 6, 2024

Describe the bug
The outlines as given by Cellpose vary in density, sometimes producing outliers.
This becomes problematic when approximating the shape of the cell using the outlines.
Is this behaviour intended, and what could it signify when outliers are present in the segmentation?
For now, I assume rejecting these outliers is best practice.

Screenshots
Screenshot from 2024-03-06 16-26-51

@postnubilaphoebus postnubilaphoebus added the bug Something isn't working label Mar 6, 2024
@carsen-stringer
Copy link
Member

sorry I'm not sure I understand, we use cv2 to make the outlines but they might not be perfect. but there are also mask outliers? this is with do_3D=True or with stitching?

@postnubilaphoebus
Copy link
Author

Hello, my apologies for the late reply.
I used python -m cellpose --Zstack to run a fine-tuned 3d model.
So I assume it has to do with 3D=True. But I can investigate this further if you like. I did not question this observation, because my thinking was that it is inherently difficult to model boundary conditions with heat diffusion (especially in 3d, or by combining 2d heat diffusion outputs in 3d like cellpose does). If you have a different intuition, please let me know.

@carsen-stringer
Copy link
Member

for the outlier mask points you could run connected components and use that to create the mesh: https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.label.html, we can also add this as an optional post-processing step

@carsen-stringer carsen-stringer added enhancement New feature or request and removed bug Something isn't working labels Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants