External Email - Use Caution
Hi Eugenio,
Thanks for getting back to me – I had the newest version installed and still get the same error (pasted below).
mri_WMHsynthseg --i flair_ax.nii.gz --o flair_ax_WML.nii.gz --threads -1
Arguments seem correct; loading Python packages...
Traceback (most recent call last):
File "/usr/local/apps/freesurfer/dev-2024-04-19/python/packages/WMHSynthSeg/inference.py", line 284, in <module>
main()
File "/usr/local/apps/freesurfer/dev-2024-04-19/python/packages/WMHSynthSeg/inference.py", line 76, in main
import torch
ModuleNotFoundError: No module named 'torch'
I also installed FreeSurfer 7.4.1. Would you be able to expand on what you mean by “a way around this is installing FreeSurfer 7.4.1, and using its fspython to run the WMh-SynthSeg code”?
I loaded FreeSurfer 7.4.1, and then changed the location of the model in inference.py and tried using FreeSurfer 7.4.1 fspython but now its missing the
'unet3d' module:
[donnayca@cn4270 anat]$ module load freesurfer
[-] Unloading freesurfer 7.4.1 on cn4270
[+] Loading freesurfer 7.4.1 on cn4270
[donnayca@cn4270 anat]$ fspython ../inference_cd.py --i flair_ax.nii.gz --o flair_ax_WML.nii.gz
Arguments seem correct; loading Python packages...
Traceback (most recent call last):
File "../inference_cd.py", line 285, in <module>
main()
File "../inference_cd.py", line 79, in main
from unet3d.model import UNet3D
ModuleNotFoundError: No module named 'unet3d'
[donnayca@cn4270 anat]$ fspython
Python 3.8.13 (default, Apr 21 2022, 14:55:37)
[GCC 8.3.1 20190311 (Red Hat 8.3.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
Thank you!
Corinne
From:
<freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of "Iglesias Gonzalez, Juan E." <JIGLESIASGONZALEZ@mgh.harvard.edu>
Reply-To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Date: Saturday, April 6, 2024 at 1:04 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] WMH-SynthSeg - Torch module not found
Wrong answer: apparently this has been fixed in the latest dev; maybe try that?
Cheers,
/Eugenio
--
Juan Eugenio Iglesias
http://www.jeiglesias.com