cucim icon indicating copy to clipboard operation
cucim copied to clipboard

[QST] cupyx.skimage.registration

Open swelborn opened this issue 4 years ago • 5 comments

Hello, I recently hacked the phase_cross_correlation function in skimage.registration to enable cupy for my particular application.

After that, I found that @grlee77 did something similar but for many of skimage's functions on the cupyimg repo, and that the project had been ported here. Looks like I didn't have to do all that work....

I think it is great what you all are doing here, package looks really nice. Unfortunately, though, for my particular application, I don't want users to have to go through the windows installation process documented here. For the average user, installing cuda is difficult enough.

Are there plans to continue adding cupyx.scipy.ndimage support for the modules not currently on the PR upstream list here?

Thanks again, Sam

swelborn avatar Dec 05 '21 20:12 swelborn

I think it is great what you all are doing here, package looks really nice. Unfortunately, though, for my particular application, I don't want users to have to go through the windows installation process documented here. For the average user, installing cuda is difficult enough.

As far as I know, there are no updates in terms of Windows support aside from what is discussed in that issue.

Are there plans to continue adding cupyx.scipy.ndimage support for the modules not currently on the PR upstream list here?

We will probably continue to slowly add things on a case-by-case basis. Much of these are more work to add as they rely on compiled C code that needs to be rewritten for CUDA. A couple of functions we would like to prioritize are scipy.ndimage.distance_transform_edt and a watershed transform. Are there other specific functions that you are interested in?

We will also at some point update the API of the existing implementations to match the newly released scikit-image 0.19.

grlee77 avatar Dec 14 '21 21:12 grlee77

Thanks for your reply @grlee77. My application uses image registration using phase cross correlation.

For now I have just added a folder into my repo which users would install manually. Other option would be to add my own forked skimage repository with that module altered for the purposes of my application, but would be nicer to not have to do either of these things and have your package as a requirement.

For reference, my docs can be found here. It is version 0.0.1, just getting it off the ground.

swelborn avatar Dec 28 '21 22:12 swelborn

I also need scipy.ndimage.distance_transform_edt to the end of applying watershed segmentation. Just to register my interest.

fakedrake avatar Apr 30 '22 02:04 fakedrake

same here, distance_transform_edt would be very useful! :P

srepmub avatar Sep 05 '22 10:09 srepmub

same here, distance_transform_edt would be very useful! :P

Hi @srepmub and @fakedrake, This is now available in release 22.08 and newer via cucim.core.operations.morphology.distance_transform_edt. I have a couple of PRs ready to submit for the upcoming 22.10 that add support for the sampling kwarg and further improve performance. I can see about also submitting this upstream to CuPy since it is part of the SciPy API.

grlee77 avatar Sep 06 '22 14:09 grlee77