-
Notifications
You must be signed in to change notification settings - Fork 430
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
Comments
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? |
Hello, my apologies for the late reply. |
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 |
I have also found extra single pixel objects in 3d masks with previous version of cellpose. I just made a PR for a bug fix to dynamics.py that fixes a tensor dim mismatch index error that inadvertently might have solved this issue. I suspect it is one of these two source that were the root cause of the issue.
Issue: Cause:
Issue: Cause: |
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

The text was updated successfully, but these errors were encountered: