CTAug: cardiac computed tomography specific data augmentations for robust segmentation

Library

Link to Source: GitHub, Preprint

Authors: Pooya Mohammadi Kazaj, Leo Fridolin Weber, Wen Xie, Seyed Amir Ahmad Safavi-Naini, Anselm Stark, Giovanni Baj, Ali Mokhtari, Toshiya Yoshida, Christoph Ryffel, Taishi Okuno, Yoshihiro Akashi, Ronny R. Buechel, Thomas Pilgrim, Waldo Valenzuela, George C. M. Siontis, Xiaowei Xu, Moritz Hundertmark, Stephan Windecker, Christoph Gräni, Isaac Shiri

Summary: An open-source Python library that adds realistic cardiac computed tomography artifacts to training images, including calcifications, wires, metal implants and acquisition motion, improving segmentation accuracy on the imperfect scans encountered in routine clinical practice.

(a) Representative original vs. augmented image pairs for each simulated artifact category; red arrows indicate the introduced artifacts. (b) Dice score across all structures on the five external test datasets for models trained without (gray) vs. with (red) CTAug. Source: Supplementary Figure S1, https://arxiv.org/abs/2607.11287.

Automatic segmentation of the heart on computed tomography images is usually developed on carefully curated datasets, in which the scans are clean and the anatomy is easy to delineate. Scans acquired in daily clinical practice look different: they often contain metallic implants, pacemaker wires, dense calcifications, and motion introduced by the way the scanner acquires the images in slabs. Models trained only on clean data tend to lose accuracy precisely on these cases. CTAug addresses this gap by reproducing such image degradations during training, so that a model sees them before it meets them in the clinic, and it does so without requiring any additional annotated data.

The library covers four categories of artifact. Calcifications are inserted as small, dense deposits; wires are drawn as thin linear or curved dense structures, of the kind produced by pacemaker leads; metal implants are simulated together with the bright and dark streaks that radiate from them across the image; and slab acquisition motion is reproduced as a seam at which the image both jumps in brightness and shifts in space. For the first three, the placement is guided by the existing segmentation labels, so that a simulated implant lands in plausible anatomy rather than in air. Each augmentation is applied with its own probability during training, and every call reports exactly what was drawn, which makes a given augmented image reproducible.

The benefit was measured on five independent external test datasets. Segmentation accuracy, expressed as the Dice similarity coefficient, which ranges from 0 to 100 and describes how closely the predicted structure overlaps the reference one, rose on average from 95.5 to 96.3 when the augmentations were used, a consistent difference across all comparisons. The gain was largest on the dataset containing the most artifacts, where accuracy improved from 92.45 to 94.81. Just as relevant for clinical use, the augmentations lifted the poorest cases and reduced the spread between them, meaning fewer scans on which the model fails badly.

CTAug is released under an open license and installs as a Python package. It can be used with plain PyTorch training code, or dropped directly into pipelines built on the MONAI framework, where the augmentations behave like any other standard transform. The library is one component of a larger openly released framework from the AI-CVM lab team, alongside the model training and evaluation code, the segmentation architectures collected in nnUZoo, and the HolOrama viewer, together with an annotated dataset of 1020 cardiac computed tomography cases. The work was carried out by the team at the University of Bern and Inselspital with its collaborating centers.

Reference

Mohammadi Kazaj P, Weber LF, Xie W, Safavi-Naini SAA, Stark A, Baj G, Mokhtari A, Yoshida T, Ryffel C, Okuno T, Akashi Y, Buechel RR, Pilgrim T, Valenzuela W, Siontis GCM, Xu X, Hundertmark M, Windecker S, Gräni C, Shiri I. A Unified Framework for Comprehensive Cardiac CT Segmentation and Phenotyping: Human-in-the-Loop Data Annotation, Vision Foundation Model Development, Multicenter Evaluation and Clinical Validation. arXiv preprint, 2026. arXiv:2607.11287