Closed brudfors closed 3 years ago
Cool! I'll have a look later today, or tomorrow.
dexpm
is at nitorch.core.linalg._expm
. It's almost the same signature, so you could switch and profile if you want. But it's also based on JA's implementation so I doubt there'll be a gain.setup.py
for the time being?nitorch.spatial.affine_basis
. The difference (I think) is that their shape is (K, D, D)
instead of (D, D, K)
.I changed to using yours (nitorch.core.linalg.expm, not nitorch.core.linalg._expm). Works well, but no speed up, as expected.
They were already there.
Using yours now, and have adapted the code slightly as well.
A module for doing affine image registration -- works on either tensors or nibabel paths. This is the signature for the entry point:
What do you think of the structure @balbasty ? Maybe you can test the demo in the demo folder? Maybe some of your code could be used:
A future todo is to use Bayesian optimisation instead of scipy.powell. Then everything can stay in torch instead of doing a cast to numpy array when calling _compute_cost. And it could also be better with local minimas perhaps?