ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
625 stars 161 forks source link

GPU Support (How to make registration faster) #441

Closed NirutaDhimal closed 6 months ago

NirutaDhimal commented 1 year ago

Is your feature request related to a problem? Please describe. I am currently using ants SYNRA registration to register a ct image to a template. This registration worked for most of the cases and I would like to use this one. But it takes a lot of time. Is there any possible way which I could use to increase the speed of registration without much affecting the results.

Describe the solution you'd like I would like to know if I can run the registration on GPU.

Describe alternatives you've considered If there is no GPU support, I would to run the registration in parallel on multiple threads. If there is any parameters that I need to edit so that the speed of the registration is faster and the result is not much affected. That would be great

cookpa commented 1 year ago

There isn't currently a GPU implementation, but you can use multiple threads by setting the environment variable ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS. This variable should be set before importing ants.

NirutaDhimal commented 1 year ago

@cookpa Thank you. I have tried that and the registration is faster than before. Will there be any GPU implementation in future?

ncullen93 commented 6 months ago

Hi there - GPU implementation of standard ANTs registration is not on the roadmap. The best bet would be to wait for a deep learning-based implementation of registration to come out, which is something that is being generally worked on by the community.