Project Description
Accurate segmentation of complex medical images, such as blood vessels or membranes, is vital for tasks like fluid flow simulation. Even small errors can distort topology and compromise downstream analysis. This project tackles these issues by integrating algebraic topology—specifically persistent homology—into deep learning-based segmentation.
Our method introduces a novel topological loss function that compares persistence diagrams of predicted and ground truth segmentations, enforcing topological consistency during training. Unlike prior approaches that rely solely on lifespan-based feature matching, we use topologically induced matchings, which better preserve geometric relationships by considering both lifespan and spatial context.
By leveraging the algebraic structure of persistent homology and its homomorphisms, our approach aligns learned segmentations more closely with anatomical ground truths, significantly improving topology-preserving segmentation in medical imaging.
Results

- Efficient Topological Feature Computation: Developed an algorithm using filtered cubical complexes to compute persistence diagrams and match features between image pairs.
- Five-Diagram Framework: Matching involves five diagrams—two from input images, one comparison complex, and two capturing geometric relationships.
- Optimized Homology: Used Union-Find for fast computation in dimension 0 and Alexander duality to simplify calculations in dimension 1.
- Improved Accuracy: Topologically induced matchings outperform lifespan-based methods in preserving geometric structure.
- Visual Interpretability: Created a tool to visualize matched and unmatched topological features directly on images.
- Quantitative Evaluation: On the CREMI dataset, our method significantly reduced Betti error compared to standard CNNs.
- New Evaluation Metric: Proposed using topological loss as a more comprehensive metric than Betti error alone.
- Code for download from GitHub.
Follow-up
A major challenge is the computational cost of computing five persistence diagrams per match. While our Python implementation is efficient for 2D, training remains slow. To address this, we developed a high-performance C++ version and extended the method to 3D data (see SegMatch3D). Future applications include cell nucleus counting and vascular flow reconstruction, where preserving topology is critical for clinical relevance.
Bauer, U., Schmahl, M. Efficient Computation of Image Persistence. Discrete Comput Geom (2025). https://doi.org/10.1007/s00454-025-00769-8
Stucki, N., Paetzold, J. C., Shit, S., Menze, B. H., & Bauer, U. (2023). Topologically Faithful Image Segmentation via Induced Matching of Persistence Barcodes. In 40th International Conference on Machine Learning, ICML 2023 (Vol. 202, pp. 32698-32727). (Proceedings of Machine Learning Research).
Björn Menze, Biomedical Image Analysis and Machine Learning, Department of Quantitative Biomedicine, Universität Zürich
Johannes Paetzold, Artificial Intelligence in Radiology, Radiology , Weill Cornell Medical College
Suprosanna Shit, Biomedical Image Analysis and Machine Learning, Department of Quantitative Biomedicine, Universität Zürich
Maximilian Schmahl, Research Station Geometry + Dynamics, University of Heidelberg


