Comments (7)
FYI: wheels for Windows/Mac/Linux are available from PyPI which may make installation/upgrade a little easier
from pygrappa.
@lukasfolle you're welcome - glad you are finding it helpful!
Would it be possible to accelerate this function by making use of mkl or openblas?
It may be -- depends on where the bottleneck is for your particular reconstruction. Will link to #80, I just haven't had a lot of time recently to devote here. What is the size the of the dataset you want to reconstruct? If you happen to know the nominal parameters you'd like to use, those would also be helpful in benchmarking and finding bottlenecks
from pygrappa.
Sure, I am using mdgrappa for a k-space of size 160x92x8 with a autocalibration signal of size 40x16x8 both with 15 channels and 5x5x5 kernel size.
Since I am doing this for multiple hundred k-spaces, this takes a considerable time for me.
As a CPU I am using a AMD Ryzen 7 3700X 8-Core Processor.
This takes about 12 seconds for me.
from pygrappa.
3D volumes will be more challenging. I assume all the reconstructions must be done in isolation (i.e., no way to do a joint estimate/recon between all of them). The calculations are mostly passed through to numpy's BLAS/LAPACK wrappers which are of course single threaded and will take advantage of only 1 of your 8 cores. There is no doubt performance on the table for the existing mdgrappa
implementation, but I wonder if there's a suitable improvement for now if you use multiprocessing
or joblib
to run recons in parallel?
from pygrappa.
Yes, multiprocessing would be an option, thanks!
Can you confirm, that it takes approximately the same time for you? I want to rule out that I have numpy acceleration through some backend set up incorrectly.
from pygrappa.
Yes, multiprocessing would be an option, thanks! Can you confirm, that it takes approximately the same time for you? I want to rule out that I have numpy acceleration through some backend set up incorrectly.
That time doesn't raise any alarm bells for me -- it is a 3D volume relying on a mostly Python implementation with heavy use of generalized array slicing. It makes application of GRAPPA to n-dimensional data sets trivial, but this may be more costly than I originally thought.
I modified the basic_mdgrappa
example to use a synthetic 160x92x8x15 example with the autocalibration region and kernel size you specified with Rx=Ry=2 undersampling. On my machine (Ryzen 7 5800x 8-core) I do even worse:
INFO:find_acs.py:Took 4.02927e-05 sec to find hyper-cube
INFO:find_acs.py:Took 0.000173092 sec to find hyper-rect
INFO:root:Took 0.193907 seconds to find geometries and holes
INFO:root:Took 26.2915 seconds to train weights
INFO:root:Took 1.97092 seconds to apply weights
Took 28.500443935394287 sec
The "train weights" step is predictably the offender here.
from pygrappa.
Alright, thanks for the confirmation!
from pygrappa.
Related Issues (20)
- ndarray is not C-contiguous error, when using grog and switching the coil axis HOT 3
- Build problem on M2 Mac with Meson 1.3.2 HOT 1
- API references missing cgrappa
- cgrappa breaks on 7T real data
- CI error for python 3.5
- ENH: multidimensional data support for cgsense
- ValueError when using complex64 with cgrappa HOT 10
- ENH: revamp cgrappa HOT 1
- ERROR when installing pygrappa in a singularity image HOT 7
- Precision on the kernel size HOT 13
- igrappa doesn't return coil dimension
- Regularly undersampled GRAPPA HOT 1
- Aliasing artifacts HOT 4
- BUG: radialgrappaop should use lamda0, not lamda
- skimage.util.pad not available HOT 2
- Keeping calibration weights for reuse? HOT 5
- Defination of kernel sizes not agree with most papers HOT 2
- Local utils package cannot be imported properly HOT 3
- Memory Allocation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygrappa.