The data augmentation is proposed in Nature Scientific Reports 2023.
If you use this augmentation please cite the following work:
Kovacs, Balint, et al.
"Addressing image misalignments in multi-parametric prostate MRI
for enhanced computer-aided diagnosis of prostate cancer."
Scientific Reports 13.1 (2023): 19805.
The nnU-Net trainer nnUNetTrainer_Misalign.py
generates possible misalignments/registration errors
between the input image modalities/channels during training to teach the network to become robust
to them thereby increasing their performance. The extension is simple, we just appended the
tr_transforms
with the MisalignTransform
transformation with the following parameters:
im_channels_2_misalign
: on which image channels should the transformation be appliedlabel_channels_2_misalign
: on which segmentation channels should the transformation be applieddo_squeeze
: whether misalignment resulted from squeezing is necessarysq_x
,sq_y
,sq_z
: squeeze per directions, randomly sampled from interval.p_sq_per_sample
: probability of squeezing per samplep_sq_per_dir
: probability of squeezing per directiondo_rotation
: whether misalignment resulted from rotation is necessaryangle_x
,angle_y
,angle_z
: rotation angels per axes, randomly sampled from interval.p_rot_per_sample
: probability of rotation per samplep_rot_per_axis
: probability of rotation per axesdo_transl
: whether misalignment resulted from translation is necessarytr_x
,tr_y
,tr_z
: shift/translation per directions, randomly sampled from interval.p_transl_per_sample
: probability of translation per samplep_transl_per_dir
: probability of translation per direction
Important suggestions for its successful utilization:
The ability of the method to cope with misalignments is limited depending on the initial overlap between the image modalities, and the type and amplitude of the augmentations. Therefore, its parameters have to be adapted to the exact application, consider the following aspects:
- An initial registration might still be needed.
- There might be misalignments from other sources in your dataset, you can extend the augmentation scheme with them.
- Choose the probability and the amplitude of the augmentation wisely.
Misalignment augmentation is originally proposed to enhance diagnostic performance, but you can use it for other multi-modal/multi-channel applications.
The repository is forked from nnU-Net v2, but contains no pretrained network so it can be used as an integrative framework for model development
- Create a new conda environment with the recent version of Python (nnU-Net v2 supports 3.9 or newer version),
as an example:
conda create --name nnUNet_AnatInf python=3.9
- Install pytorch with the most recent CUDA version by following the instructions on the PyTorch Website.
- Clone this repository and install its dependencies:
https://github.com/MIC-DKFZ/misalignment_DA.git
cd misalignment-DA
pip install -e .
You can find more information in the nnU-Net installation instructions.
Copyright German Cancer Research Center (DKFZ) and contributors. Please make sure that your usage of this code is in compliance with its license.