fMRIPrep brain mask and tpm errors

Summary of what happened:

The brain mask is incorrectly estimated for some of my subjects. The TPMs (GM/WM/CSF) are also encroaching well beyond the brain into the skull etc

Command used (and if a helper script was used, a link to the helper script or the command generated):

CMD="apptainer run --cleanenv \
        -B /home/path-to-project:/data \
        ${CONTAINER} \
        /data/Outputs/BIDS \
        /data/Outputs/fmriprep \
        participant \
        --skip_bids_validation \
        --participant-label ${subjID} \
        --session-label 01 \
        --nprocs 4 --omp-nthreads 2 --mem 15000 \
        --fs-license-file /data/Software/license.txt \
        --fs-no-reconall \
        --ignore slicetiming \
        --dummy-scans 4 \
        --output-spaces anat MNI152NLin2009cAsym:res-native MNI152NLin2009cAsym:res-2mm \
        --skull-strip-t1w force \
        --skull-strip-template MNI152NLin2009cAsym \
        --skull-strip-fixed-seed \
        -w /data/Outputs/fmriprep \
        -vvv"
        
    echo "${CMD}"
    eval "${CMD}"

Version:

fMRIPrep 25.2.3

Environment (Docker, Singularity / Apptainer, custom installation):

Apptainer

Screenshots / relevant information:

Hi @nobrain and welcome to neurostars!

Have you tried not disabling FreeSurfer?

Best,
Steven

Hi @Steven , thanks for your quick response!

I am yet to try enabling freesurfer - I understand that the freesurfer parcellations are pulled to refine the masks. I can definitely try and see. However, I’m not sure why I’m seeing holes such as the one above (in functional space) - don’t know how blotched masks can be salvaged through freesurfer…

I assume fMRIPrep just crosses the ants mask with aparc.aseg?