SynthStrip: Skull-Stripping for Any Brain Image

Andrew Hoopes, Jocelyn S. Mora, Adrian V. Dalca, Bruce Fischl, Malte Hoffmann

Code/Weights Video Dataset Tool arXiv Paper Cite
SynthStrip brain extraction examples


SynthStrip is a skull-stripping tool that extracts brain voxels from a landscape of image types, ranging across imaging modalities, resolutions, and subject populations. It leverages a deep learning strategy to synthesize arbitrary training images from segmentation maps, yielding a robust model agnostic to acquisition specifics.

If you use the tool or dataset, please cite SynthStrip (BibTeX):

SynthStrip: Skull-Stripping for Any Brain Image

Andrew Hoopes, Jocelyn S. Mora, Adrian V. Dalca, Bruce Fischl*, Malte Hoffmann* (*equal contribution)

NeuroImage 260, 2022, 119474

SynthStrip dataset with full-head images, binary brain masks, and label maps

SynthStrip Dataset

The SynthStrip data are a collection of full-head images with corresponding ground-truth brain masks from 622 MRI, CT, and PET scans. We include label maps for 131 adult MPRAGE scans, with standard FreeSurfer brain labels and additional non-brain labels. The images span various MRI contrasts, resolutions, and populations ranging from infants to glioblastoma patients. While we cannot redistribute the CT and PET data, we provide information on how to obtain these. The 2D subset consists of sagittal slices extracted from each file in the 3D dataset.

See README for dataset information and license

Download the 3D SynthStrip dataset (v1.4, 6.9 GB)

Download the 2D SynthStrip dataset (v1.4, 39 MB)

Verify download integrity with SHA-256 checksums

Download, verify, and extract the data with:

curl -O
curl -O
curl -O
shasum -c SHA256
tar -xf synthstrip_data_v1.4.tar
tar -xf synthstrip_data_v1.4_2d.tar

If you use these data, please cite SynthStrip (BibTeX).

SynthStrip Tool

We ship SynthStrip as a command-line tool with FreeSurfer and as a standalone utility using Docker or Singularity containers. Both versions are functionally identical and use the same command-line syntax.

Within FreeSurfer: The mri_synthstrip utility has been included in FreeSurfer since the v7.3.0 release. For the most up-to-date version of SynthStrip, please download a build of the FreeSurfer development branch.

Containerized version: If you do not want to install FreeSurfer, you can run SynthStrip in a container. We provide a script that wraps the container, so you do not need to worry about mounting input and output directories. For those interested, the underlying build image is available on the Docker Hub.

Singularity: Download the Singularity-based wrapper script with:

curl -O && chmod +x synthstrip-singularity

Docker: Download the Docker-based wrapper script with:

curl -O && chmod +x synthstrip-docker

Please read the brief instructions at the top of the downloaded script. Singularity requires one-time configuration.


Once installed, you can run SynthStrip with the following syntax, where "stripped.nii.gz" is a skull-stripped version of the input image "input.nii.gz".

mri_synthstrip -i input.nii.gz -o stripped.nii.gz

Note: For the container version, replace mri_synthstrip with the wrapper script name (e.g. synthstrip-singularity).

Use the -m flag to save a binary brain mask:

mri_synthstrip -i input.mgz -o stripped.mgz -m mask.mgz

If you would like to compute the immediate boundary of the brain excluding surrounding CSF, use the --no-csf flag. You may also want to explore the -b option, which controls the boundary distance from the brain.

mri_synthstrip -i input.nii -o stripped.nii --no-csf

Display additional options with the --help flag. SynthStrip should take less than 1 minute on the CPU for most images with voxel sizes near 1 mm3. As image size or resolution increases, the runtime might increase as well.

Video (5 minutes)

Code and Weights

Should you wish to set up a custom Python environment, you can access the SynthStrip scripts in the FreeSurfer repository on GitHub and download the weight files independently:

We also export the Python requirements used to build the latest SynthStrip container.

Solved Issues

Previous versions may have shifted NIfTI outputs during visualization (issue 1025), generated an error indicating that "ITK only supports orthonormal direction cosines" (issue 1015), or introduced floating-point errors in output voxel sizes (issue 1060). These problems were related to improper qform and sform handling by the surfa library and have been fixed in FreeSurfer releases after 2023-02-14 and in SynthStrip container v1.4. Make sure to update the wrapper script headers!


The authors thank Douglas Greve, Lilla Zöllei, and David Salat for sharing data. This research project benefitted from computational hardware generously provided by the Massachusetts Life Sciences Center.