Skip to main content
QUICK REVIEW

[Paper Review] DeepDefacer: Automatic Removal of Facial Features via U-Net Image Segmentation

Anish Khazane, Julien Hoachuck|arXiv (Cornell University)|May 31, 2022
Radiomics and Machine Learning in Medical ImagingMedicine6 citations
TL;DR

DeepDefacer proposes a lightweight 3D U-Net deep learning model for automatic MRI anonymization that segments and masks facial regions up to 91% faster than Pydeface, with 92% fewer parameters than a standard 3D U-Net, while maintaining high segmentation accuracy and generalizing better to abnormal facial anatomy than traditional co-registration methods.

ABSTRACT

Recent advancements in the field of magnetic resonance imaging (MRI) have enabled large-scale collaboration among clinicians and researchers for neuroimaging tasks. However, researchers are often forced to use outdated and slow software to anonymize MRI images for publication. These programs specifically perform expensive mathematical operations over 3D images that rapidly slow down anonymization speed as an image's volume increases in size. In this paper, we introduce DeepDefacer, an application of deep learning to MRI anonymization that uses a streamlined 3D U-Net network to mask facial regions in MRI images with a significant increase in speed over traditional de-identification software. We train DeepDefacer on MRI images from the Brain Development Organization (IXI) and International Consortium for Brain Mapping (ICBM) and quantitatively evaluate our model against a baseline 3D U-Net model with regards to Dice, recall, and precision scores. We also evaluate DeepDefacer against Pydeface, a traditional defacing application, with regards to speed on a range of CPU and GPU devices and qualitatively evaluate our model's defaced output versus the ground truth images produced by Pydeface. We provide a link to a PyPi program at the end of this manuscript to encourage further research into the application of deep learning to MRI anonymization.

Motivation & Objective

  • Address the inefficiency and computational burden of traditional MRI anonymization tools like Pydeface, which rely on slow co-registration and numerical optimization.
  • Overcome limitations of classical methods that fail on MRI scans with facial abnormalities or low resolution due to reliance on rigid transformation matrices.
  • Develop a deep learning-based solution that generalizes across diverse MRI scans, including those with non-standard facial anatomy.
  • Reduce the barrier to entry for researchers by enabling fast, on-device defacement without requiring cloud infrastructure or complex software stacks.
  • Provide a user-friendly, open-source tool via PyPI and future web integration to support widespread adoption and feedback-driven model improvement.

Proposed method

  • Train a 3D U-Net architecture on paired MRI scans and binary facial masks from IXI and ICBM datasets to learn end-to-end segmentation of facial regions.
  • Apply a fully convolutional, streamlined architecture with reduced filter sizes and parameter count to improve inference speed and reduce memory footprint.
  • Use ground truth masks generated by Pydeface as supervision during training, ensuring alignment with established defacing standards.
  • Apply the predicted binary mask to the original MRI image via element-wise multiplication to produce the final defaced output.
  • Optimize the model for both CPU and GPU inference to support deployment on personal workstations without cloud dependency.
  • Integrate the model into a future web-based interface using TensorFlow.js to enable in-browser inference and preserve data privacy.

Experimental results

Research questions

  • RQ1Can a deep learning-based segmentation model outperform traditional co-registration methods like Pydeface in speed and robustness for MRI defacing?
  • RQ2How does the performance of a lightweight 3D U-Net compare to a standard 3D U-Net in terms of segmentation accuracy and parameter efficiency?
  • RQ3To what extent can a deep learning model generalize to MRI scans with facial abnormalities that challenge classical defacing algorithms?
  • RQ4Can a deep learning model achieve high defacing accuracy while significantly reducing computational and memory overhead compared to existing software?
  • RQ5How can a deep learning-based anonymization tool be made accessible to non-expert users through open-source and web-based deployment?

Key findings

  • DeepDefacer achieves a 91% average speedup over Pydeface across various CPU and GPU devices, enabling real-time defacement on standard hardware.
  • The model uses 92% fewer parameters than the baseline 3D U-Net, resulting in a significantly reduced memory footprint.
  • DeepDefacer outperforms Pydeface in handling MRI scans with facial abnormalities, producing more accurate masks where Pydeface fails due to incorrect affine transformations.
  • Quantitative evaluation shows DeepDefacer achieves high Dice, precision, and recall scores, demonstrating strong segmentation performance on the IXI and ICBM datasets.
  • Qualitative analysis confirms that DeepDefacer produces more consistent and anatomically plausible defacing results, especially in cases with non-standard facial structures.
  • The model’s amorphous mask structure, resulting from smaller filters and end-to-end training, enhances generalization without compromising the primary goal of facial region removal.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.