Skip to content

Instantly share code, notes, and snippets.

@GenevieveBuckley
Created April 19, 2023 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GenevieveBuckley/41f49c56640c155f68c346b82c04e803 to your computer and use it in GitHub Desktop.
Save GenevieveBuckley/41f49c56640c155f68c346b82c04e803 to your computer and use it in GitHub Desktop.
Image analysis demos for Coiled benchmarking
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GenevieveBuckley
Copy link
Author

Here we go, perhaps this will be the fix for the dask problem

https://forum.image.sc/t/doing-watershed-with-large-image/77283/2

use dask.array.map_overlap 2 with scikit-image watershed using watershed_lines=True. This makes sure that each segment is separated from its neighbors by black/background pixels. Where the overlaps end, your segments will be cut by a vertical line, but not by the background.
then, use dask_image.ndmeasure.label 1 to label the connected components. This should unify the segments at the window boundary, but not the ones that are separated by the watershed line.

I don't like having to use watershed_lines=True on the red flour beetle data (the nuclei are packed pretty tightly and they're not that big). But if it's the easiest way to get a result, we might just go with it.

@GenevieveBuckley
Copy link
Author

Link to issue discussion: coiled/benchmarks#751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment