Deep-MI / FastSurfer

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

recon-only mode requires conformance #155

Closed mishaberegov closed 2 years ago

mishaberegov commented 2 years ago

It checks for the input conformance and doesn't work with the raw T1.nii provided. Therefore it's nearly impossible to use with docker as it's shown in the Docker/README.md.

================== Creating orig and rawavg from input =========================

python3.6 /fastsurfer/recon_surf/../FastSurferCNN/data_loader/conform.py -i /nii/artsibasheva.nii --check_only --verbose
Reading input: /nii/artsibasheva.nii ...
The input image is not conformed.
A conformed image must satisfy the following criteria:
 - Dimensions 256x256x256:        True
 - Voxel size 1x1x1:              True
 - Orientation LIA:               True
 - Dtype uint8:                   False
check_only flag provided. Exiting without conforming input image.

Command exited with non-zero status 1
LeHenschel commented 2 years ago

What is the input command you provide? Are you only running the surface pipeline? The input to recon-surf alone should be the conformed image (which will be generated during the segmentation).

mishaberegov commented 2 years ago

I am only running the surface pipeline. This is the full command. It worked fine a couple of months ago.

!docker run -v D:/Archieve/segmentation/T1:/T1 \
            -v D:/Archieve/segmentation/morphometrics:/morphometrics \
            -v D:/Archieve/segmentation/segmentation:/segmentation \
            -v D:/Archieve/segmentation/fs60:/fs60 \
            --rm fastsurfer_reconsurf:cpu \
            --fs_license /fs60/license.txt \
            --t1 /T1/{name} \
            --seg /segmentation/{name[:-4]}.nii \
            --sid {name[:-4]} --sd /morphometrics \
            --parallel 

I suspect it stops here:

# check for input conformance
cmd="$python ${binpath}../FastSurferCNN/data_loader/conform.py -i $t1 --check_only --verbose"
RunIt "$cmd" $LF

So, the unsegmented anatomical t1 image must be conformed according to the requirements? I mean, it used to not be so.

LeHenschel commented 2 years ago

That is correct. It was recently changed to assure that both the segmentation and intensity image are conformed for recon-all (https://github.com/Deep-MI/FastSurfer/pull/92). You can either provide the already conformed image which fits the segmentation or conform the .nii with the conform.py script.

LeHenschel commented 2 years ago

Closing the issue as this is the expected behaviour and not an error