Conversation
| images = da.from_zarr( | ||
| "s3://coiled-datasets/BBBC039", storage_options={"anon": True} | ||
| ) |
There was a problem hiding this comment.
I converted the original .tif dataset to Zarr format and uploaded them to a public S3 bucket. This had the side-effect of bypassing dask/dask-image#84.
| label_images, num_features = ndmeasure.label(binary_images) | ||
| index = np.arange(num_features) | ||
| # FIXME: Only selecting the first few images due to cluster idle timeout. | ||
| # Maybe sending large graph? Need to investigate a bit. |
There was a problem hiding this comment.
I have no useful suggestions, but it's great* that this has possibly already identified some kind of problem your users might occasionally run into.
*You know, great for your users, but admittedly not so great for the person who now needs to investigate it 😆 Have fun with that, James!
| from dask_image import ndfilters, ndmeasure, ndmorph | ||
|
|
||
|
|
||
| def test_BBBC039(small_client): |
There was a problem hiding this comment.
Suggest adding a link to those talk slides and/or the repo. That way if anyone needs to work on this benchmark later, they can look there for context/answers there before quizzing James about it.
| smoothed = ndfilters.gaussian_filter(images, sigma=[0, 1, 1]) | ||
| thresh = ndfilters.threshold_local(smoothed, block_size=images.chunksize) | ||
| threshold_images = smoothed > thresh | ||
| structuring_element = np.array( |
There was a problem hiding this comment.
Suggest adding a short comment: to this line about why we're not using the default structuring element. Eg:
# Since this image stack appears to be 3-dimensional,
# we sandwich a 2d structuring element in between zeros
# so that each 2d image slice has the binary closing applied independentlyApparently I only ever said that verbally during the talk, may as well write it down.
This is an initial pass at the example outlined here #751 (comment). Could still use some finishing steps, but this contains (I think) the bulk of the logic. Pushing up now for any early feedback.
cc @GenevieveBuckley @mrocklin for visibility