Skip to content
Back to Portfolio
Deep Deface - GPU-accelerated 3D face anonymization

Deep Deface

GPU-accelerated 3D face and ear anonymization for CT and MRI scans

Client: Biospective · Montreal · Canada 🇨🇦
TensorFlowPythonPyDICOMscikit-learnOpenCVCUDA

Highlights

Situation

Biospective needed to share 3D CT/MRI scans securely across sites, while removing facial/ear features and preserving brain anatomy for downstream neuro-analysis.

Task

Design a GPU-accelerated anonymization pipeline capable of real-time processing and ready for clinical deployment in PACS workflows.

Action

Built a two-stage EfficientDet-3D model with CUDA-powered mosaicing to blur facial regions, protecting all intracranial voxels with a 2mm safety margin.

Result

Achieved 96% F1-score on CT and 94% on MRI with sub-second processing per slice; now integrated into PACS for secure multi-site neuroimaging studies.

Core Team

Viacheslav Danilov

Viacheslav Danilov

Senior Data Scientist

Intelerad Medical Systems

Montreal · Canada 🇨🇦

Alexey Kachalov

Alexey Kachalov

Senior Data Scientist

Intelerad Medical Systems

Montreal · Canada 🇨🇦

Efim Furman

Efim Furman

Machine Learning Director

Intelerad Medical Systems

Boston · United States 🇺🇸

Overview

Modern rendering pipelines let anyone reconstruct a patient's full head from standard CT or MRI data, making it possible to re-identify individuals, even when metadata are stripped, via consumer-grade facial recognition software. Conventional DICOM de-identification focuses on tags, leaving pixel data exposed.

Our team designed Deep Deface, a commercial-grade model that detects face and both ears inside full 3D medical volumes and applies either mosaicing or Gaussian blur to those regions only. Crucially, the algorithm preserves 100% of intracranial anatomy, ensuring no loss for downstream neuro-analysis. Deployed on hospital GPUs, it anonymizes an average head scan in under 1 second end-to-end, enabling real-time protection inside PACS or cloud pipelines. Early adopters use it to unlock secure multi-site neuroimaging studies.

Data

To build a detector that generalizes across scanners and pulse sequences, we assembled a deliberately diverse corpus and applied careful, privacy-preserving preparation steps before any model training began.

  • •Imaging Sources and Scale: 551 head CT series and 555 head MRI series (210 T1-weighted, 244 T2-weighted, 101 FLAIR), totaling ~1.1k studies and ~240 GB of voxel data (Figure 1, Figure 2).
  • •Pre-processing Workflow: DICOM files were converted to NIfTI, CT intensities were clipped to [-1000 HU, 3000 HU], and all volumes were resampled to an isotropic 1 mm grid; MRI volumes were z-score normalized.
  • •Annotation Protocol: Three clinicians drew 3D bounding boxes around each face, left ear, and right ear in 3D Slicer (Figure 3); inter-rater agreement reached κ = 0.92 after consensus passes.
  • •Dataset Split: A hold-out set of 83 CT and 84 MRI series, never seen during development, was reserved for final evaluation.
Figure 1. Sample CT head scans from the dataset showing 3D reconstructions of patient facial features.
Figure 2. MRI head scans across different sequences: T1-weighted (left), T2-weighted (center), and FLAIR (right).
Figure 3. 3D bounding box annotations in 3D Slicer for right ear (left), face (center), and left ear (right).

Methods

Once the data were prepared, we designed a two-stage pipeline that balances speed, accuracy, and anatomical safety.

  • Stage 1 (3D Object Detector): EfficientDet-style backbone with depth-wise separable convolutions (~33M parameters). Training used focal loss with class balancing and heavy 3D augmentations (random affine, elastic warps, Poisson noise) to mimic real-world acquisition variability.
  • Stage 2 (Region-selective Anonymizer): For every detected box, CUDA kernels apply either block-wise mosaicing or Gaussian blur with σ = 8. A 2 mm padding rule guarantees that the anonymized mask never crosses into the brain parenchyma, thus preserving all intracranial voxels for downstream neuro-analysis.
  • Latency Engineering: The network runs at 37 ms per slice on an NVIDIA RTX 3090 and 880 ms per slice on a 24-core Threadripper, enabling both real-time GPU workflows and overnight CPU batch jobs.

Results

Rigorous testing on an unseen cohort of 83 CT and 84 MRI series shows that Deep Deface meets both speed and accuracy targets while guaranteeing that no brain voxels are altered.

  • •CT Performance: The model reaches an F1-score of 96.0%, with a mean Average Precision (mAP) of 74.1%. Faces are found most reliably at 81.1% AP; left and right ears follow at 70.3% and 71.0% respectively.
  • •MRI Performance: Performance remains high, yielding 93.9% F1 and 92.6% mAP across T1, T2, and FLAIR sequences. MRI faces show near-perfect localization (97.2% AP), while ears achieve 92.6% and 88.0% AP.
  • •Safety Margin: Zero false negatives on intracranial tissue were observed – every voxel belonging to the brain proper remained unmodified, confirming the 2 mm padding rule effectively protects analytical regions.
  • •Throughput: On an NVIDIA RTX 3090, the end-to-end pipeline processes a slice in 37 milliseconds, implying a typical 300-slice head volume is anonymized in <11 seconds, fast enough for real-time PACS workflows.

Visual evaluation of model predictions shows accurate detection across all views (Figure 4 for CT, Figure 5 for MRI).

Figure 4. Detection results on CT data across axial (left), coronal (center), and sagittal (right) views.
Figure 5. Detection results on MRI data across axial (left), coronal (center), and sagittal (right) views.

Conclusion

Deep Deface proves privacy and data fidelity can coexist: it neutralizes biometric risk while preserving 100% of brain voxels, which is key for downstream AI diagnostics. The solution enables secure data sharing across institutions while maintaining full compliance with privacy regulations.

Next steps include PET/SPECT support, on-device inference for edge scanners, and auditable logs to comply with evolving biometric regulations.

Keep Exploring

Medical Imaging

High-precision 3D organ segmentation via V-net architecture with dense skip connections, achieving up to 96% Dice score across 5 anatomical structures.

July 2020
Image-Guided Surgery

Real-time landmark tracking for safer valve implantation during TAVI procedures using multi-task deep learning with 97% accuracy.

July 2021