-
Notifications
You must be signed in to change notification settings - Fork 52
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
Improve robustness of brain extraction pipeline #734
Comments
@jrdalenberg I had similar issues in this post. After rerunning fmriprep, it got better. Maybe this is not related to fmriprep versions, but rather the way ANTs extract the brain mask. Not sure what's the exact reason and how to fix it. |
Hmm weird. I’ll rerun it when my whole data set is done, and see what happens. |
Rerunning the exact same analysis did indeed fix the problem. Pretty weird. |
If it's BET for brain extraction, it is understandable since there might be a random initialization of the center of the brain, but fMRIprep is using ANTs which is templated-based brain extraction. Maybe the developers know much more details and there is something I did not notice and made a mistake. @jrdalenberg what is the approximate portion of cases with such issues in your first run? In my case, I have 37/106 (using 20.0.5). Certainly, this is not any test-retest at all, and my dataset has a long time span from 2007 to 2022 which is hard to expect the absence of special cases after running any pipeline. However, it would be nice to learn the trick :) |
ANTs is template-based, but there are random initializations for the registration of the template. I don't have a strong intuition on why you would get such a significant departure, but it seems like it could stand some work to make it more robust. I will move this issue over to niworkflows, where the brain extraction pipeline is implemented. |
Thanks for the clarification @effigies. Do you think it is possible to run a few brain extractions (e.g., 5) in the pipeline before proceeding and just select, by checking the similarity of these 5 masks, a common initialization or directly a mask or an averaged mask after removing outliers or even more complex like a probability mask? Since a few brain extractions are not that computationally expensive, especially the rest nodes after brain extractions will be wasted if the mask is not good just due to the initialization. |
2 out of 95. |
Just to update this issue. I realized one can specify the brain extraction template in fmriprep. So I tried https://github.com/templateflow/tpl-MNI152NLin2009cAsym, On the other hand, I tried standalone ANTs antsBrainExtraction.sh as follows, 3 runs all provided acceptable brain masks
Maybe I could just extract brain masks before fmriprep for those cases without good brain extraction after the 1st fmriprep run, but it would be nice to have everything done in the same way for the whole data set. Thanks |
What happened?
While inspecting fmriprep 21.0.2 results I ran into this failed tissue segmentation, while it was succesful in 20.2.6. Any idea how I can fix this for the current scan?
21.0.2
20.2.6
What command did you use?
What version of fMRIPrep are you running?
21.0.2
How are you running fMRIPrep?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
No response
Additional information / screenshots
No response
The text was updated successfully, but these errors were encountered: