GithubHelp home page GithubHelp logo

Comments (3)

jakirkham avatar jakirkham commented on May 27, 2024 1

cc @grlee77 (who may know more)

from cucim.

jakirkham avatar jakirkham commented on May 27, 2024

Dask-image has an affine_transform, which uses CuPy under-the-hood. So maybe that can be used as-is.

There isn't currently a phase_cross_correlation implementation for multiple GPUs.

If the problem can be solved in smaller chunks, using map_blocks or map_overlap may make sense. This can then be followed by some computation on the aggregate result. For example one might identify shifts needed for smaller chunks of the image and then average these over the whole image or similar. This could give a rough answer that may be good enough.

Alternatively Dask has its own FFTs and Dask-image has fourier_shift. So it might be possible to roll your own registration algorithm using these techniques.

from cucim.

b2jia avatar b2jia commented on May 27, 2024

@gigony (and perhaps @caryr35 ) I'm following up maybe too late. Happy to see phase_cross_correlation with GPU support, and I gave cucim another try. The results of cucim.skimage.registration.phase_cross_correlation often do not match that computed on CPU (skimage.registration.phase_cross_correlation. Is there a reason why?

CUCIM version: 23.02.00
skimage version: 0.18.3

from cucim.skimage.registration import phase_cross_correlation as pcc_gpu
from skimage.registration import phase_cross_correlation as pcc_cpu

drift_gpu = pcc_gpu(cp.asarray(img_stack_v1[:, :512, :512]), 
                    cp.asarray(img_stack_v2[:, :512, :512]),
                    upsample_factor=100)
drift_cpu = pcc_cpu(img_stack_v1[:, :512, :512], 
                    img_stack_v2[:, :512, :512],
                    upsample_factor=100)
print("Drift gpu", drift_gpu[0])
print("Drift cpu", drift_cpu[0])
>>>Drift gpu (0.85, 0.5, -0.11)
>>>Drift cpu [ 0.03  0.21 -0.04]

from cucim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.