Skip to content
YFrischPublic

About

GAUDA uses the class-wise epistemic uncertainty of a Bayesian segmentation model to decide what to generate next. A class-conditional latent diffusion model then synthesizes coherent surgical image–mask pairs for the most uncertain classes and injects them into downstream training online.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GAUDA

Generative Adaptive Uncertainty-guided Diffusion-based Augmentation for Surgical Segmentation

Yannik Frisch · Christina Bornberg · Moritz Fuchs · Anirban Mukhopadhyay

WACV 2025

Paper Python License

TL,DR: GAUDA uses the class-wise epistemic uncertainty of a Bayesian segmentation model to decide what to generate next. A class-conditional latent diffusion model then synthesizes coherent surgical image–mask pairs for the most uncertain classes and injects them into downstream training online.

Overview

Collecting and pixel-wise annotating surgical data is expensive. Fixed offline augmentation cannot react to a model's changing weaknesses. GAUDA turns generative augmentation into an adaptive training loop:

Overview of the GAUDA training workflow

The generative components are pretrained once and kept frozen during downstream training of the segmentation model. At every validation interval, GAUDA refreshes a synthetic batch for the most uncertain classes and randomly replaces real training samples with generated pairs.

Main findings

Across CaDISv2 Setting II and CholecSeg8k, GAUDA improves surgical semantic segmentation over comparable augmentation and adaptive-sampling strategies by an average absolute IoU of 1.6 percentage points and 1.5 percentage points, respectively. The paper reports a medium-to-large average effect size of Cohen's d = 0.714.

Downstream segmentation

The following label-mean IoU values are from PHiSeg runs without additional classic augmentation.

Dataset Default GAUDA Absolute change
CaDISv2 Setting II 0.738 0.786 +4.8%
CholecSeg8k 0.854 0.870 +1.6%

Joint image–mask generation

The LDM results below use 4,096 generated pairs and classifier-free guidance with strength 3.0. RO IoU evaluates a segmenter trained on real data against synthetic pairs. SO IoU evaluates a segmenter trained only on synthetic pairs against the real test set.

Dataset FID ↓ KID ↓ real-only IoU ↑ synthetic-only IoU ↑
CaDISv2 39.44 0.033 ± 0.004 0.755 0.635
CholecSeg8k 56.80 0.041 ± 0.005 0.731 0.742
Qualitative joint image and mask generation results

See the paper for per-class results, comparisons against DatasetGAN, qualitative samples, failure cases, and computational analysis.

What is included

  • image and semantic-mask VQ-GANs;
  • class-conditional latent diffusion for joint image–mask synthesis;
  • PHiSeg training and stochastic uncertainty estimation;
  • default, classic augmentation, adaptive sampling, and GAUDA training strategies;
  • experiment configurations for CaDISv2 Setting II and CholecSeg8k; and
  • generation and segmentation evaluation entry points.

This release currently contains code and configurations only.

Getting started

Python 3.10 or newer is required. The commands below create an environment and install GAUDA in editable mode:

conda create -n gauda python=3.12
conda activate gauda
pip install -e .

# Required because the regular SDS_Playground wheel omits nested dataset modules.
git clone https://github.com/MECLabTUDA/SDS_Playground.git
pip install -e SDS_Playground

Run a standard PHiSeg experiment with:

python -m scripts.train \
  --config configs/experiments/cadisv2/phiseg_default.yaml \
  --data /path/to/CaDISv2 \
  --devices cuda:0

Run GAUDA after training the image VQ-GAN, mask VQ-GAN, and joint LDM:

python -m scripts.train \
  --config configs/experiments/cadisv2/phiseg_gauda.yaml \
  --data /path/to/CaDISv2 \
  --devices cuda:0 \
  --set gauda.ldm_checkpoint=/path/to/joint_ldm/best.pt

The complete staged training workflow, checkpoint layout, configuration overrides, evaluation commands, and paper hyperparameters are documented in Training and evaluation.

Data and reproducibility note

The datasets are loaded through SDS_Playground and are not redistributed here. Pass the dataset root through --data.

Dataset splitting is delegated to the installed SDS_Playground version. The public implementation inspected for this release shuffles individual image–mask pairs with seed 42 and applies a 90/5/5 split. This differs from the video-aware split described in the paper, so verify or adapt the split implementation before making direct paper comparisons. See Training and evaluation — Data for details.

Repository structure

GAUDA/
├── configs/                 # Composable data, model, training, and experiment YAMLs
├── docs/                    # Detailed training and evaluation guide
├── gauda/
│   ├── factories/           # Construction of datasets, models, and trainers
│   ├── models/              # VQ-GAN, latent diffusion, and PHiSeg modules
│   ├── trainers/            # Component and downstream training loops
│   └── utils/               # Sampling, uncertainty, checkpoint, and image utilities
└── scripts/                 # Training and evaluation command-line entry points

Citation

If this work is useful in your research, please cite:

@inproceedings{frisch2025gauda,
  title={GAUDA: generative adaptive uncertainty-guided diffusion-based augmentation for surgical segmentation},
  author={Frisch, Yannik and Bornberg, Christina and Fuchs, Moritz and Mukhopadhyay, Anirban},
  booktitle={2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  pages={3762--3771},
  year={2025},
  organization={IEEE}
}

License

The code is released under the MIT License. Dataset use remains subject to the licenses and terms of the respective dataset providers.

About

GAUDA uses the class-wise epistemic uncertainty of a Bayesian segmentation model to decide what to generate next. A class-conditional latent diffusion model then synthesizes coherent surgical image–mask pairs for the most uncertain classes and injects them into downstream training online.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages