-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AHEAD template corregistration #86
Comments
Dear Shashank, Just want to clarify: is that the processing time of running the segmentation on the DCCN cluster using 1 core only? The segmentation is based on non-linear registration which is generally computationally intensive. The use of the AHEAD atlas could be even slower due to the high spatial resolution (0.5x0.5x0.5 mm iso) of the atlas. I have some ideas on how to speed up the process but haven't had time to implement them yet. If you are running the analysis on the DCCM cluster, there are a few tricks to speed up the process depending on the size of your cohort and how familiar you are with image registration. Here are some of my suggestions:
How many datasets do you have in your study in total? Best, Kwok |
Dear Kwok,
I have tried using 4 cores for processing without changing any configuration for co-registration to AHEAD template. It is still taking very long and is not finishing running even for one participant so I dont want to run it for all participants without knowing how long it might take to finish.
[cid:e541524f-d53a-4eb4-b013-d8674b7eb1be]
This is where it is becoming very slow. Jose suggested maybe change some settings in the t1w_2_t1w_atlas_template, but i'm not sure if changing the iterations would make the computation less intensive or if it would affect the co-registration a lot. I am unsure on what might be going wrong and would be great to have your input on it!
Many thanks,
Shashank Vijayaprasadh
…________________________________
From: Kwok-Shing Chan ***@***.***>
Sent: Wednesday, April 3, 2024 5:43 PM
To: kschan0214/sepia ***@***.***>
Cc: Vijayaprasadh, S. (Shashank) ***@***.***>; Author ***@***.***>
Subject: Re: [kschan0214/sepia] AHEAD template corregistration (Issue #86)
You don't often get email from ***@***.*** Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Dear Shashank,
Just want to clarify: is that the processing time of running the segmentation on the DCCN cluster using 1 core only? The segmentation is based on non-linear registration which is generally computationally intensive. The use of the AHEAD atlas could be even slower due to the high spatial resolution (0.5x0.5x0.5 mm iso) of the atlas. I have some ideas on how to speed up the process but haven't had time to implement them yet.
If you are running the analysis on the DCCM cluster, there are a few tricks to speed up the process depending on the size of your cohort and how familiar you are with image registration. Here are some of my suggestions:
1. Run the analysis with multiple cores
ANTs supports multithread processing so you can speed up the process by running the script on a multi-core session. You can check https://hpc.dccn.nl/docs/cluster_howto/compute_torque.html#specifying-resource-requirement to see how to request multiple cores in one session.
2. Run multiple subjects in parallel
One thing I usually do is to create a shell script to automatically create Matlab processing scripts for multiple subjects and submit the jobs to the cluster simultaneously so that you don't need to wait for one subject at a time. You might still need to be mindful about the computational resource available though (e.g. CPU and Matlab license availability)
3. Create group templates and use them for segmentation instead
Another strategy I used is to first register all subjects into the same space (e.g. MNI 1mm), and create a T1w, Chimp, GRE magnitude group template by averaging all subjects together. Once the templates are created, you can use them for AHEAD atlas segmentation like what you do on a single subject. The advantage is that you only have one very expensive registration remains (AHEAD-group template registration), which you can speed up using Suggestion#1. The drawback is that there might be some steps you need to perform outside of SEPIA.
How many datasets do you have in your study in total?
Best,
Kwok
—
Reply to this email directly, view it on GitHub<#86 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BGPZFFA77DFOSQZOYD25A23Y3QPTTAVCNFSM6AAAAABFJOQ3U6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUHE3DKOJWGQ>.
You are receiving this because you authored the thread.
|
Hi Shashank Sorry for the late reply. I cannot see the image but I guess the process slow down during SyN, is that the case? Reducing the number of iterations may or may not speed up the process, depending on how many iterations needed for the cost function to converge. In my experience, each step often takes 50-100 iterations to converge (convergence <1e-6). Current maximum allowed iterations are 500 (4x subsampled), 500 (2x subsampled), and 250 (full resolution). Unless these numbers are reduced to, say <50, it won’t speed up the registration process. Another way is to set a larger convergence value (say 1e-5), i.e.,
This might reduce the number of iterations by at least ~20-30 on each step. It might still be ok for your application because the optimisation cost comes mostly from the cortex (difficult to match on volumetric data), and you are only interested in subcortical nuclei of the AHEAD atlas. You can overlay the atlas labels on the registered image to check the registration quality. Alternatively, you can also try using a mask focusing on the registration on the subcortical nuclei (which is my idea to speed up the registration). You can generate a dilated mask based on the AHEAD labels to include all nuclei and some white matter tissue (let’s called this mask_AHEAD.nii.gz). Then you can incorporate this mask to the script as
I think this should speed up the process quite a lot but I haven't had the chance to test this yet. |
Dear Kwok,
After running SEPIA for the participants, now I want to corregister the subject Chimap to AHEAD template. So, I used the SEPIA GUI for this but the problem is, it is very slow. I have used the latest version of SEPIA 1.2.2.5. It has been 10 hours of running it in MATLAB, but it is still not finished. Is there something that should be changed in the option to make it run faster? Would be great to know how to solve this!
PS: I have attached some images of the config I used along with some command line steps that came as it was getting executed
The text was updated successfully, but these errors were encountered: