Improve NUFFT Gram for large datasets#989
Conversation
📚 Documentation |
|
Can we think of a better way to select the loop case? Doing the loop for all 3D reconstructions could make many of these reconstructions unneccessarily slow. |
|
I tried it on cpu and a6000 gpu. for 3d non cartesian reconstruction with 128x128x128 voxels, the loop in the forward saturates the gpu and it is not slower, i.e. batching more compute at once dpes not help. The issue is more on the other side, that for some 2D reconstructions it could also make sense to loop (I have not tried that) |
|
mnhm... i reconsidered the loop case. I think i will remove this and instead, one will have to loop outside the operator. |
|
For subpsace compressed reconstruction, one needs PCA^H Fourier^H Fourier PCA Finally, it adds a .toeplitz function on the nufft operator as a .gram with more control about density compensation and subsapce compression. .gram uses it with the default parameters. Gram is a property and cannot take arguments, gram gets chained through, whereas topelitz needs to be called with the options on the nufft operator for more granular control |
For subpsace compressed reconstruction, one needs PCA^H Fourier^H Fourier PCA So for, for example, 500 different trajectories in the Fourier operator and 5 subspace coefficients, we would have to do 500 FFTs and save 500 Toeplitz kernels. This would be to slow for iterative recon inside a neural network. Instead, we can pull the subspace compressin into the kernel. The kernel is not longer a real valued 2D image, but includes off-diagonal mixing; in this example 5x5x(2*recon_y)x(2*recon_x) and we only require 5 FFTs Additionaly, it adds a .toeplitz function on the nufft operator as a .gram with more control about density compensation and subsapce compression. .gram uses it with the default parameters. Gram is a property and cannot take arguments, gram gets chained through, whereas topelitz needs to be called with the options on the nufft operator for more granular control
This makes it possible to do iterative reconstruction on large non cartesian 3D datasets by
Additionally, the optional DCF weighting is now exposed in NonUniformFastFourierOpGramOp. It was already implemented in the backend, but there was no way to use it. Fourier.gram will still not use it, only if created manually with an additional argument
weightFor subpsace compressed reconstruction, one needs PCA^H Fourier^H Fourier PCA
So for, for example, 500 different trajectories in the Fourier operator and 5 subspace coefficients, we would have to do 500 FFTs and save 500 Toeplitz kernels. This would be to slow for iterative recon inside a neural network.
Instead, we can pull the subspace compressin into the kernel. The kernel is not longer a real valued 2D image, but includes off-diagonal mixing; in this example 5x5x(2recon_y)x(2recon_x) and we only require 5 FFTs
Finally, it adds a .toeplitz function on the nufft operator as a .gram with more control about density compensation and subsapce compression. .gram uses it with the default parameters. Gram is a property and cannot take arguments, gram gets chained through, whereas topelitz needs to be called with the options on the nufft operator for more granular control