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

plantseg boundaries #89

Open
tischi opened this issue Feb 28, 2024 · 3 comments
Open

plantseg boundaries #89

tischi opened this issue Feb 28, 2024 · 3 comments

Comments

@tischi
Copy link

tischi commented Feb 28, 2024

Hi,

We are having quite nice plantseg boundaries, but it seems that ultrack sometimes produces a "funny" segmentation:

image

Do you have a suspicion why the cell in the center could only be segmented half?

@JoOkuma
Copy link
Member

JoOkuma commented Feb 28, 2024

This is a hierarchical watershed artifact. Regions' "flat" intensities create arbitrary partitions that are, most of the time, a straight line.

You have three options to fix this:

  • increase min_area parameter, so these regions get removed. However, if you have objects with varying areas, this might be challenging and lead to undersegmentation.
  • increase min_frontier; this is my preferred option when you have a high accuracy network as plants. This merges regions whose average intensity between them is below min_frontier. In this case, assuming your boundary is between 0 and 1, min_frontier=0.1 or even 0.05 should work. I'm a bit careful to not increase this too much because it could merge regions where cells are shared by a "weak" boundary.
  • another option is to blur the boundary map so you avoid creating regions with "flat" intensities. This follows the same reasoning for using EDT to run watersheds. This works better for convex objects. And remember to renormalize the intensity values if using this with min_frontier.

@tischi
Copy link
Author

tischi commented Feb 29, 2024

Awesome! min_frontier sounds super useful!

@JoOkuma
Copy link
Member

JoOkuma commented Feb 29, 2024

I'll leave this open until we add into the FAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants