Library

CTAug

Cardiac Computed Tomography Specific Data Augmentations for Robust Segmentation

An open-source Python library that adds realistic cardiac CT artifacts to training images, including calcifications, wires, metal implants and acquisition motion, so segmentation models stay accurate on the imperfect scans of routine clinical practice.

Open-source Python package Works with PyTorch and MONAI
Original and augmented cardiac CT images for four artifact types, and Dice scores on five external test datasets with and without CTAug
(a) Original vs. augmented images for each artifact type (red arrows). (b) Dice across all structures on five external test datasets, without (grey) vs. with (red) CTAug. Source: preprint, Supplementary Figure S1.
4artifact types
simulated during training
0extra annotations
needed
5external test datasets
for evaluation
95.4 → 95.7mean Dice
across all external datasets
92.6 → 93.9Dice on the dataset
with the most artifacts

Why CTAug

Heart segmentation models are usually trained on clean, curated scans and lose accuracy on exactly the scans that matter in the clinic. CTAug lets a model see those imperfections during training, before it meets them in practice.

Curated training data

Clean scans in which the anatomy is easy to delineate.

Routine clinical scans

Metal implants, pacemaker wires, dense calcifications and motion from slab-wise acquisition.

Four Artifact Types

Each augmentation is applied with its own probability during training: 15% for calcifications, wires and metal implants, 10% for slab motion.

CalcificationsSmall, dense deposits inserted into the anatomy.
WiresThin linear or curved dense structures, like pacemaker leads.
Metal implantsImplants with the bright and dark streaks that radiate across the image.
Slab motionA step artifact: a seam where the image jumps in brightness and shifts in space by 5–20%.
Anatomy-aware placement. Calcifications, wires and implants are placed using the existing segmentation labels, so they land in plausible anatomy rather than in air.
Reproducible. Every call reports exactly what was drawn, so any augmented image can be recreated.

Results

Measured on five independent external test datasets with the Dice similarity coefficient (0–100; higher means the predicted structure overlaps the reference more closely).

Mean Dice, all external datasets

95.495.7

A statistically significant improvement (Wilcoxon signed-rank test, p < 0.01).

Dataset with the most artifacts

92.693.9

The largest gain is in the artifact-rich cohort, where baseline accuracy was lowest and most variable.

Fewer failures

The poorest cases improve and the spread between cases narrows, so fewer scans where the model fails badly.

Get Started

CTAug installs as a Python package and needs no additional annotated data.

Plain PyTorch

Use the augmentations in your own PyTorch training code.

MONAI pipelines

Drop them into MONAI pipelines, where they behave like any other standard transform.

Open license

Released under an open license. Installation, examples and license details are on GitHub.

Open on GitHub

Authors & Citation

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
Developed by
The AI in Cardiovascular Medicine Laboratory (AI-CVM), Bern University Hospital, University of Bern, Switzerland, with collaborating centers

How to cite

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