Deep-MI / FastSurfer

PyTorch implementation of FastSurferCNN
Apache License 2.0
461 stars 120 forks source link

surf_only not running #615

Open evanlut opened 1 day ago

evanlut commented 1 day ago

IMPORTANT: Please make sure to fill out the information about your environment (see below). This is often critical information we need to help you.

Question/Support Request

A clear and concise description of a question you may have or a problem for which you would like to request support.

Hi, I am getting an error when running the --surf_only portion of fastsurfer. The --seg_only portion works correctly. It also errors when running it all together. It seems to not recognize the freesurfer commands. I do NOT get a FS_LICENSE error. I also double-checked it is not due to neuroanatomy or improper segmentations. As well, as trying several subjects. Thank you very much for you help!

Screenshots / Log files

Please provide error messages (can be a screenshot), stack traces, log files (specifically $SUBJECTS_DIR/$SUBJECT_ID/scripts/deep-seg.log and $SUBJECTS_DIR/$SUBJECT_ID/scripts/recon-surf.log) and any snippets useful in describing your problem here. deep-seg.log recon-surf.log

Error messages:

program versions used 7.4.1 (freesurfer-linux-ubuntu22_x86_64-7.4.1-20230614-7eb8460) 7.4.1

ProgramName: lta_convert ProgramArguments: lta_convert -all-info ProgramVersion: 7.4.1 TimeStamp: 2024/11/26-02:57:47-GMT BuildTime: Jun 14 202 3 03:45:01 BuildStamp: freesurfer-linux-ubuntu22_x86_64-7.4.1-20230614-7eb8460 User: UNKNOWN Machine: 5d1d26f251ee Platform: Linux PlatformVer sion: 5.15.0-92-generic CompilerName: GCC CompilerVersion: 8.4.0 /opt/freesurfer/bin/mri_and not included ...

ProgramName: mri_annotation2label ProgramArguments: mri_annotation2label -all-info ProgramVersion: 7.4.1 TimeStamp: 2024/11/26-02:57:47-GMT Bui ldTime: Jun 14 2023 03:45:01 BuildStamp: freesurfer-linux-ubuntu22_x86_64-7.4.1-20230614-7eb8460 User: UNKNOWN Machine: 5d1d26f251ee Platform: Linux PlatformVersion: 5.15.0-92-generic CompilerName: GCC CompilerVersion: 8.4.0 /opt/freesurfer/bin/mri_aparc2aseg not included ...

ERROR: Executable 'mri_segment -all-info failed! Is it missing from the distribution?'

Environment

...

Execution

Include the command you used to run FastSurfer that cause the problem, e.g.

t1fileshort=sub-23002_ses-baseline_T1w.nii.gz

seg only works

docker run -v /media/nfs/MiniMag_001_main/studies/fastsurfer/input:/data \ -v /media/nfs/MiniMag_001_main/studies/fastsurfer/output:/output \ -v /usr/local/freesurfer:/fs_license \ --rm --user $(id -u):$(id -g) deepmi/fastsurfer:latest \ --fs_license /fs_license/license.txt \ --t1 /data/${t1fileshort} --sid sub-${sub} --sd /output \ --parallel --3T --seg_only

surf only fails

docker run -v /media/nfs/MiniMag_001_main/studies/fastsurfer/output:/output \ -v /usr/local/freesurfer:/lic \ --rm --user $(id -u):$(id -g) deepmi/fastsurfer:latest \ --sid sub-${sub} --sd /output \ --3T --surf_only \ --fs_license /lic/license.txt

m-reuter commented 17 hours ago

Hi, thanks for the report. This seems to be your error (from the recon-surf log file):

mris_extract_main_component /output/sub-23002/surf/lh.orig.nofix.predec /output/sub-23002/surf/lh.orig.nofix.predec
Command terminated by signal 9

So maybe something is wrong with this intermediate surface.

Also, we can see that you run the docker image but we don't know what version of FastSurfer you are running. You only reported the FreeSurfer version. FastSurfer "latest" can mean anything, depending on when you pulled the image from docker hub. You can run run_fastsurfer.sh --version to get that information.

Nevertheless, you did try to run everything in one call, right? Maybe try that again on a new output directory to make sure that that also fails. If it does, is there a way for you to share that specific input image with us, so that we can take a look why the surface block fails here?

dkuegler commented 14 hours ago

Hi @evanlut,

It seems mris_extract_main_component was terminated by a signal 9 (SIGKILL) message.

This is likely a termination of you command due to a kernel or docker kill. It is not clear to us, why a process sent a sigkill signal to mris_extract_main_component. This can range from termination because the binary is requesting too much memory to wall time ran out to many other things.

First step would be to see if this happens again on this case, then if it happens also on a different image. Then, please share the output of docker inspect <container-id> you get the container-id with docker ps but you also have to make sure you run the docker run command without the --rm flag (otherwise this information gets deleted). Finally, you could send us the content of your (failed) subject-directory (i.e. zip your sub-23002 directory).

Both these files can be sent privately here

evanlut commented 1 hour ago

Hi, Thank you so much for your quick replies. I went ahead and ran the command again on the same subject (sub-23002) with one call. Then again with a different subject (sub-23002) with one call. I am getting the same error as before. I uploaded the log files and subject-directories to the link provided as well. Of note, I’m using version: deepmi/fastsurfer:cpu-v2.3.3

Here’s my command:

docker run -v /media/nfs/MiniMag_001_main/studies/fastsurfer/input:/data -v /media/nfs/MiniMag_001_main/studies/fastsurfer/output:/output -v /usr/local/freesurfer:/fs_license --user $(id -u):$(id -g) deepmi/fastsurfer:cpu-v2.3.3 --fs_license /fs_license/license.txt --t1 /data/sub-23005_ses-baseline_T1w.nii.gz --sid sub-23005 --sd /output --parallel --3T

Thank you so much for your help! Evan

On Nov 28, 2024, at 1:59 AM, David Kügler @.***> wrote:

Hi @evanlut https://github.com/evanlut,

It seems mris_extract_main_component was terminated by a signal 9 (SIGKILL) message.

This is likely a termination of you command due to a kernel or docker kill. It is not clear to us, why a process sent a sigkill signal to mris_extract_main_component. This can range from termination because the binary is requesting too much memory to wall time ran out to many other things.

First step would be to see if this happens again on this case, then if it happens also on a different image. Then, please share the output of docker inspect you get the container-id with docker ps but you also have to make sure you run the docker run command without the --rm flag (otherwise this information gets deleted). Finally, you could send us the content of your (failed) subject-directory.

Both these files can be sent privately here https://nextcloud.dzne.de/index.php/s/T3qs8BdiYWQqBjq — Reply to this email directly, view it on GitHub https://github.com/Deep-MI/FastSurfer/issues/615#issuecomment-2505708067, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNJBXMOCS77ZWU6IY3CCRZ32C3SO5AVCNFSM6AAAAABST5QHLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBVG4YDQMBWG4. You are receiving this because you were mentioned.