Deep-MI / FastSurfer

PyTorch implementation of FastSurferCNN
Apache License 2.0
456 stars 119 forks source link

FastSufer for multiple subjects #526

Closed farah-naz01 closed 3 months ago

farah-naz01 commented 3 months ago

Question/Support Request

I am new to both freesurfer and FastSurfer. Currently, I am running FastSurfer for multiple subjects, but I am encountering an issue that I cannot decide whether it is related to the ‘--entrypoint’ flag or Docker itself. Below, I have provided the entire command I am using along with the error. I would appreciate any suggestions. Thanks!

Screenshots / Log files

INFO: run_fastsurfer not explicitly specified, using $FASTSURFER_HOME/run_fastsurfer.sh. ERROR: Flag unrecognized.

Environment

...

Execution

(base) user1nrx@srv-imgrm-04:~/software_research/my_fastsurfer_analysis/DATA$ sudo docker run --gpus all -v /home/user1nrx/software_research/my_fastsurfer_analysis/DATA:/data -v /home/user1nrx/software_research/my_fastsurfer_analysis/OUTPUT:/output -v /home/user1nrx/software_research/my_fastsurfer_analysis/freesurfer_license:/fs_license --entrypoint "/fastsurfer/brun_fastsurfer.sh" --rm --user $(id -u):$(id -g) deepmi/fastsurfer:latest --fs_license /fs_license/license.txt --sd /output --subject_list /data/subjects_list.txt --parallel --3T

m-reuter commented 3 months ago

Maybe this did not copy correctly, but after the user flag you should put: --user $(id -u):$(id -g) also, because of the latest tag, we cannot see from this which version you are really running. It will not download the latest version if that tag already exists locally. It is safer to use (currently): deepmi/fastsurfer:gpu-v2.2.0 although probably that is the same version.

And can you post the full output? Is the only ERROR "Flag unrecognised"?

farah-naz01 commented 3 months ago

(base) user1nrx@srv-imgrm-04:~/software_research/my_fastsurfer_analysis$ sudo docker run --gpus all -v /home/user1nrx/software_research/my_fastsurfer_analysis/data:/data -v /home/user1nrx/software_research/my_fastsurfer_analysis/output:/output -v /home/user1nrx/software_research/my_fastsurfer_analysis/freesurfer_license:/fs_license --entrypoint "/fastsurfer/brun_fastsurfer.sh" --rm --user $(id -u):$(id -g) deepmi/fastsurfer:latest --fs_license /fs_license/license.txt --sd /output --subject_list /data/subject_list.txt --parallel –threads 16 --3T --debug /fastsurfer/brun_fastsurfer.sh --fs_license /fs_license/license.txt --sd /output --subject_list /data/subject_list.txt --parallel –threads 16 --3T --debug Fri, 14 Jun 2024 09:21:20 +0000

---START DEBUG--- Debug parameters to script brun_fastsurfer:

subjects: subject1=/data/sub-01/sub-01_T1w.nii subject2=/data/sub-02/sub-02_T1w.nii subject3=/data/sub-03/sub-03_T1w.nii subject4=/data/sub-04/sub-04_T1w.nii

task_id/task_count: / running default

FastSurfer parameters:

--fs_license /fs_license/license.txt --sd /output --parallel –threads 16 --3T Running in /usr/bin/bash

---END DEBUG --- INFO: run_fastsurfer not explicitly specified, using $FASTSURFER_HOME/run_fastsurfer.sh. DEBUG: subject 1: subject1=/data/sub-01/sub-01_T1w.nii DEBUG: /fastsurfer/run_fastsurfer.sh --sid subject1 --t1 /data/sub-01/sub-01_T1w.nii --fs_license /fs_license/license.txt --sd /output --parallel –threads 16 --3T [&] ERROR: Flag unrecognized.

m-reuter commented 3 months ago

Does threads have only one "-" ? should be --threads 16

farah-naz01 commented 3 months ago

No, its a copy paste problem. I used --threads. But, I saw the same problem in issue #438, created by some else here, and I followed the solution that you suggested "using --seg_only and --surf_only". It is working now.