-
Notifications
You must be signed in to change notification settings - Fork 125
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 on Apple M4 does not run #668
Comments
On first sight, this seems to be an error outside of the FastSurfer toolbox. Maybe @m-reuter has seen something like this before. Also, if you run Can you run Thanks! |
Thanks for the quick response! Maybe installation did not go as well even though I didn't notice any errors..? here is what i get from running python3.10 -m pip list --verbose --no-cache-dir Package Version Location Installer absl-py 2.1.0 /Users/gregor/anaconda3/envs/FastSurfer/lib/python3.10/site-packages pip |
For reference
Ursprünglich gepostet von @ZachNagengast in apple/ml-stable-diffusion#8 (comment) |
Hi, I just checked my system (where it is working). I have not tried yet on macOS 15.3 (only 15.2). Also I have older versions of most dependencies , for example I am running torch 2.4. |
I upgraded requirements (still according to requirements.mac.txt) using
which are now similar to what you have, but still different. Maybe try installing with pip and using the requirements file.
and
but it continues and segments the images (did not try the surface stream yet). |
Thanks again for the input. I tried several things: I got it to run a bit further when using a different T1 (larger voxels, different to my 0.8mm isotropic) and using only a single measurement with the following command: ./run_fastsurfer.sh --t1 $dataDir2/s002_T1.nii --sid s002 --sd $fastSurferDir --3T --device mps It ran part of the recon-surf until I got the following error: ================== Creating orig and rawavg from input ========================= python3.10 -s /Users/gregor/FastSurfer/FastSurferCNN/data_loader/conform.py -i /Users/gregor/Documents/_Projects/2023_Hypothalameth/01_data/testFastSurfer/s001/FastSurfer/s002/mri/orig.mgz --check_only --vox_size min --verbose --log /Users/gregor/Documents/_Projects/2023_Hypothalameth/01_data/testFastSurfer/s001/FastSurfer/s002/scripts/conform.log grep: invalid option -- P USAGE: Here is the log. I tried FastSurfer on a single measurement of my other high-resolution T1, but it exited with the previous error of the leaked semaphore object. I also wanted to note, that my default shell is not bash, but zsh (because Apple). Might that be a problem? |
So basically what you changed is:
The error you get is strange as conform.py is around for a while and the it is unclear why the flag --vox_size does not have an argument. Are you using the current dev branch or did you checkout stable? I will try to run the surface pipeline to see if I can replicate that on my Mac. |
This seems to be an error that is supported in Ubuntu 22.04's grep, but not in macOS's grep (the The error you are getting is then because |
@gregordoerl maybe you can report you grep version |
on my Mac it is |
Hello,
Thanks for the nice tool and good documentation! Unfortunately, I was unable to get FastSurfer to run on my Mac. Here are some details:
MacBook Pro, M4 Pro Chip, 24GB mem, macOS 15.3.1
Native installation ran fine, I created a Conda environment with python3.10 without issues.
When trying to run a subject (here, a longitudinal analysis with two timepoints, one T1 each, 0.8 mm resolution), I soon got an error. My command was:
bash ./long_fastsurfer.sh --tid s001 --t1s $dataDir/m1/s001_T1.nii $dataDir/m2/s001_T1.nii --tpids m1 m2 --sd $dataDir --py "python3.10 -s" --device mps --3T
Here a part of the error:
/AppleInternal/Library/BuildRoots/d187755d-b9a3-11ef-83e5-aabfac210453/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Types/MPSNDArray.mm:829: failed assertion `[MPSNDArray initWithDevice:descriptor:isTextureBacked:] Error: NDArray dimension length > INT_MAX'
/Users/gregor/anaconda3/envs/FastSurfer/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
I'll attach the log file:
long_fastsurfer.log
Environment
When running
run_fastsurfer.sh --version all
I get:Setting ENV variable FASTSURFER_HOME to script directory /Users/gregor/FastSurfer.
Change via environment to location of your choice if this is undesired (export FASTSURFER_HOME=/dir/to/FastSurfer)
2.4.2+7e53343
I appreciate any help, thanks in advance.
Best, gregor
The text was updated successfully, but these errors were encountered: