A self-supervised learning strategy for postoperative brain cavity segmentation simulating resections

Fernando Pérez-García, Reuben Dorent, Michele Rizzi, Francesco Cardinale, Valerio Frazzini, Vincent Navarro, Caroline Essert, Irène Ollivier, Tom Vercauteren, Rachel Sparks, John S. Duncan, Sébastien Ourselin · DOI

Abstract

Accurate segmentation of resection cavities (RC) in postoperative MRIs is essential for quantifying tissue removal and planning adjuvant therapies. However, manual segmentation is labor-intensive and prone to high inter-rater variability. This paper introduces a self-supervised learning approach that leverages a resection simulation algorithm to generate synthetic training data from unlabeled preoperative scans. By modeling realistic cavity shapes, textures, and partial-volume effects, the proposed 3D U-Net achieves expert-level performance across multiple clinical datasets, demonstrating robustness to different pathologies and imaging protocols without requiring large-scale manual labeling.

Introduction

In neurosurgery for epilepsy and oncology, the resection cavity (RC) provides vital information for clinical decision-making, including radiotherapy planning and monitoring for recurrence. Despite its importance, the lack of large, annotated 3D datasets hinders the development of robust automated segmentation tools. Manual annotation is a significant bottleneck and suffers from disagreement between specialists. To address this "data hunger," we propose a self-supervised framework that "hallucinates" surgical resections on healthy preoperative brain images, enabling the training of deep learning models on synthetic but realistic data.

Methods: Resection Simulation

The core innovation is a simulation pipeline that transforms preoperative MRIs into realistic synthetic postoperative images through four key stages.

Shape and Texture Simulation

Rather than using simple geometric primitives, the algorithm generates geodesic polyhedrons and perturbs their surfaces using Simplex noise. This creates the irregular, "organic" boundaries characteristic of real surgical paths. The simulated cavity is filled with intensities sampled from the patient's own cerebrospinal fluid (CSF) in the ventricles, augmented with noise to mimic MRI artifacts.

Anatomical Constraints

To maintain biological plausibility, the algorithm ensures the simulated cavity is constrained within a single hemisphere and does not intersect with the skull or scalp. The ground-truth label is derived from the intersection of the simulated volume and the brain mask, ensuring the model learns to ignore non-brain tissue.

Simulation of the ground-truth cavity label showing anatomical constraints and intersection logic.

Blending and Model Architecture

To simulate partial-volume effects (the blurring at the edges found in real scans), we use a Gaussian-smoothed alpha channel to blend the synthetic cavity into the original brain tissue. The training utilizes a lightweight 3D U-Net with dilated convolutions, featuring roughly 77 times fewer parameters than standard architectures to reduce the risk of overfitting on synthetic features.

The end-to-end simulation pipeline: (a) Pre-op MRI, (b) noise texture, (c) cavity mask, (d) synthetic post-op, (e) blending mask, and (f) final blended image.

Datasets

The study utilized 1,813 preoperative MRIs from public repositories (IXI, ADNI, OASIS) for simulation. We also introduced EPISURG, a new benchmark dataset containing 430 surgery patients with 133 manually annotated postoperative images. Validation was performed across four independent institutional datasets (Milan, Paris, Strasbourg, and the BITE tumor dataset) to ensure generalizability.

Key Results and Insights

  • Expert-Level Performance: After fine-tuning on small real-world datasets, the model achieved median Dice Score Coefficients (DSC) between 80.2 and 89.2. This exceeds the measured human inter-rater agreement of 84.0.
  • Zero-Shot Capability: Even without seeing a single real human-annotated image, the model trained only on simulations achieved a DSC of ~80, suggesting the simulation captures the fundamental essence of resection cavities.
  • Complexity Matters: Researchers found that the shape of the simulated cavity is critical; models trained on simple cuboids performed significantly worse than those using noise-perturbed ellipsoids.
  • Robustness: The model successfully generalized to brain tumor resections and intraoperative MRIs, despite being primarily trained on epilepsy-related simulations.

Discussion and Conclusion

Our self-supervised strategy effectively mitigates the data scarcity problem in medical imaging. While the model currently does not account for postoperative "brain shift" (physical deformation after tissue removal), it provides a highly consistent and accurate tool for clinical use. The simulation algorithm's efficiency—generating training instances in under a second—allows for massive-scale data augmentation on the fly. Future work will focus on integrating biomechanical models to simulate brain shift and improving performance on small, narrow cavities that mimic natural sulci.

Source code and the EPISURG dataset are available at github.com/fepegar/resseg-ijcars.

Summary updated

BibTeX
@article{perezgarcia2021self,
  author = {Fernando Pérez-García and Reuben Dorent and Michele Rizzi and Francesco Cardinale and Valerio Frazzini and Vincent Navarro and Caroline Essert and Irène Ollivier and Tom Vercauteren and Rachel Sparks and John S. Duncan and Sébastien Ourselin},
  title = {{A self-supervised learning strategy for postoperative brain cavity segmentation simulating resections}},
  journal = {Int. J. Comput. Assist. Radiol. Surg.},
  year = {2021},
  doi = {10.1007/s11548-021-02420-2},
}
Figure