multimodallearning / DG-TTA

DG-TTA
https://pypi.org/project/dg-tta/
MIT License
11 stars 0 forks source link

DG-TTA: Out-of-domain medical image segmentation through Domain Generalization and Test-Time Adaptation

Installation

We have a package available on pypi. Just run:

pip3 install dg-tta

Optionally, you can install wandb to log results to your dashboard.

nnUNet dependency

The nnUNet framework will be installed automatically alongside DG-TTA. Please refer to https://github.com/MIC-DKFZ/nnUNet to prepare your datasets. DG-TTA needs datasets to be prepared according to the v2 version of nnUNet.

Isensee, F., Jaeger, P. F., Kohl, S. A., Petersen, J., & Maier-Hein, K. H. (2021). nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nature methods, 18(2), 203-211.

Usage

Run dgtta -h from your commandline interface to get started. There are four basic commands available: 1) dgtta inject_trainers: This will copy our specialized trainers with DG techniques and make them available in the nnUNet framework. Available trainers are:

Examples

Prepare a paths.sh file which exports the following variables:

#!/usr/bin/bash
export nnUNet_raw="/path/to/dir"
export nnUNet_preprocessed="/path/to/dir"
export nnUNet_results="/path/to/dir"
export DG_TTA_ROOT="/path/to/dir"

1) Use case: Get to know the tool

2) Use case: Pre-train a GIN_MIND model on dataset 802 in nnUNet

3) Use case: Run TTA on dataset 678 for the pre-trained model of step 2)

4) Use case: Run TTA on dataset 678 with our pre-trained GIN_MIND model:

5) All of our pre-trained models (use in case 4):

Please refer to our work

If you used DG-TTA, please cite:

Weihsbach, C., Kruse, C. N., Bigalke, A., & Heinrich, M. P. (2023). DG-TTA: Out-of-domain medical image segmentation through Domain Generalization and Test-Time Adaptation. arXiv preprint arXiv:2312.06275.

https://arxiv.org/abs/2312.06275