CLIJ2 binaryFillHoles speed issue

Hi Robert @haesleinhuepf ,

I’m having a bit of a speed issue with the binaryFillHoles function in CLIJ2.I use it to generate masks of large microscopy samples (image size ~20k x 16k) and noticed that the function becomes excessively slow for input images of that size (~4min) on my GPU (AMD Radeon RX480, 8GB) as compared to the implemented CPU function (~few seconds). You’ll find an example image here, PW: “test”

I’m curios to see whether you can reproduce the problem :slight_smile:

Thanks in advance!

1 Like

Hey Johannes @EL_Pollo_Diablo,

I explored a bit how to improve speed of the fill-holes method in CLIJ. If you like, you can try installing the CLIJx-assistant-extensions as explained here.

After restarting Fiji, there are some more fill-holes implementations available in CLIJx (using code from ImageJ, MorpholibJ and SimpleITK):

If you test them, I would love to learn which work best in your use-case!

Thanks for your feedback and support :slight_smile:

Cheers,
Robert

Hi Robert @haesleinhuepf,

thanks for the tipp. All of the above listed implementations of binary fill holes methods ( ImageJs, MorpholibJ, SimpleITK) work much faster for my usecase than the currently implemented method in clij2.

I played around a bit with the original image and several downsampled versions of it and it seems that the performance starts to drop somewhere around image sizes of 10kx10k - although I don’t know how this relates to the number and complexity of the holes to be filled:
Unbenannt

Hope this helps to trace the issue!

Best,
Johannes

1 Like