-
Notifications
You must be signed in to change notification settings - Fork 295
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
FastSurfer #2216
Comments
Hi, thanks for the prod. I did indeed see FastSurfer at OHBM, and had begun to think about how fMRIPrep should work with it. In the short term, I think we should probably permit users to provide pre-run FastSurfer outputs, as they currently can with pre-run FreeSurfer. If FastSurfer produces outputs that FreeSurfer would detect as complete, then this is trivial. To determine this, or get a sense of how much work is going to need to be done, you can try the following: from nipype.interfaces import freesurfer as fs
recon = fs.ReconAll(subjects_dir="...",
subject_id="...")
print(recon.cmdline) |
Thanks for the quick response. I was able to run fastsurfer and executed your little script and I got the following as the output:
It looks like the the files are named differently in the fastsurfer output compared to the freesurfer files. |
Yeah... That's going to make it less drop-in than I'd like. The way the current set-up works is that you can specify a place to put your FreeSurfer outputs. Then, when we try to run FreeSurfer, it automatically checks for what steps need to be (re-)run based on what outputs are present and whether they are older or newer than their inputs. So we don't have any high-level notion of "The user passed it, so it must be fine"; it's always checked. FastSurfer is going to either need some alternative way to identify that it's been successfully run, or we'll need a flag where users can say "This is as done as it needs to be." @mgxd Do you have any thoughts here? |
Yep, unless FastSurfer changes its outputs to follow the same structure of FreeSurfer recon-all (or provides a flag to allow you to do this), this is going to require generating a new One thing we'll have to keep in mind is altering the boilerplate / citations based on which pipeline was used. |
Hi, with most files, FastSurfer follows FreeSurfer, but not all. For example, some segmentations results get a new name to distinguish outputs that are more FreeSurfer-like (which can additionally be provided via flags) and outputs that are obtained faster without those additional steps (and usually preferred). Also some files are missing as they are not needed for the FastSurfer pipeline. |
Hi, I just wanted to ask if there have been any updates in fmriprep to make it compatible with the FastSurfer outputs. Best, |
Yes, it would be great to get this sorted out. If we get a list of the FreeSurfer files needed by fmriprep it would be easy to provide those files or provide a lookup which files should be used instead. Currently for example the first thing that is missing is the T1.mgz. We don't use it in FastSurfer but for some reason it is needed in fmriprep. What is strange is that this file is even not needed by FreeSurfer much (it is a specially normalised image and unclear if it should be used for anything outside of FreeSurfer at all). Someone mentioned that it is used to map data between FreeSurfer space and raw input space, but that can be done with any FS file, as this information is contained in the headers. So it is likely that fmriprep does not actually even need the T1.mgz at all and it was chosen only because of the name? Anyway I am not familiar with fmriprep, but if someone lets us know what we can do to help, would be glad to do that. For example generating the T1.mgz takes only 1-2 minutes longer and could easily be incorporated into FastSurfer or we could just symbolically link to a similar file. |
Yes, this would be absolutely great and speed up amazingly the whole process! |
Just to be clear, there are two questions here:
What does fMRIPrep need/use?
From
@mgxd @oesteban Can you see anything else we use? How does fMRIPrep tell when it has a complete reconstruction?This is more complicated. We break recon-all down into 8 stages:
Each of these comes with a list of expected outputs, and flags are added to skip sub-stages if the outputs already exist. If a stage is fully complete, attempting to run it will just I think to do this, we'll need a reliable way to distinguish a FastSurfer directory from a FreeSurfer directory that won't catch incomplete FreeSurfer directories. If we can do that, it should be fairly straightforward to adapt our workflows. |
Just following up whether there have been any updates with regards to this request since nearly a year has passed; and I landed having the exact same thought of swapping in FastSurfer for FreeSurfer in fMRIPrep. |
@effigies a FastSurfer directory will have /scripts/recon-surf.done in it (if it completed). You can also look for recon-surf.log if it did not complete. |
I have never run fmriprep, but happy to help with information or necessary adjustments. |
@mb3152 I tested the new FastSurfer (cpu version) pulled from Docker via Singularity on a subset of the data here. Its output can be used along with the |
awesome, thanks so much @iabraham ! |
Hello, I was curious about running fastsurfer with fmriprep and I stubbled across this thread. Is this now possible? |
We too are looking to see when fastsurfer will be directly included into fmriprep given it's modern and faster. Hopefully fmriprep developers will directly incorporate into the pipeline and not have to run outside as that seems to break the whole fmriprep single place to do things model. |
There is an effort here: nipreps/smriprep#280 |
Hello! Just curious if you had any plans to potentially incorporate FastSurfer into fmriprep as an alternative to freesurfer. My lab is going to be working with large datasets of fMRI data and using FastSurfer would save us a lot of time and computing resources.
Here is the paper for reference if you haven't heard of it: https://www.sciencedirect.com/science/article/pii/S1053811920304985
The text was updated successfully, but these errors were encountered: