Defacing MRI images

In this post, I’ll describe how to use FaceOff to deface anatomical MRI images.


Is ANTs installed? If not,

Navigate to the directory where you want to download the FaceOff repository (e.g. ~/Code/Sources) and run:

git clone

Set FaceOff to PATH:

echo 'export PATH=~/Code/Sources/faceoff:$PATH' >> ~/.bashrc

Make FaceOff executable:

chmod +x ~/Code/Sources/faceoff/FaceOff

Reload shell or open a new terminal and run:

FaceOff -h

Example use-case:

FaceOff -i sub-01-mp2rage-t1w.nii.gz -n 12

Before a.k.a FACE-ON
After a.k.a FACE-OFF


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with
Get started
%d bloggers like this: