MIR.data_augmentationΒΆ

Data augmentation utilities for MIR training and preprocessing.

Functions

affine_aug(im[, im_label, seed, ...])

Apply a random 3D affine transformation to an image and optional label.

fcm_soft_masks(brain_vox[, n_clusters, m, ...])

Fuzzy C-Means clustering of 1-D intensities.

fill_holes_torch(mask[, closing_size])

Remove small gaps and fill internal holes in a 3D mask.

flip_aug(im_1, im_2[, im_label_1, im_label_2])

Flip paired images along randomly selected spatial axes.

gmm_soft_masks(brain_vox[, iters])

Estimate three soft tissue masks with a 1D Gaussian mixture model.

mask_edge(mask[, kernel_size])

Compute the inner edge of a 3D binary mask.

random_contrast_lut(img[, num_bins, ...])

Apply a smooth random LUT to a 2D or 3D image tensor in [0, 1].

Classes

RandomMultiContrastRemap(*args, **kwargs)

Augment a skull-stripped T1-w brain MRI so that the same anatomy can resemble T2, FLAIR, T2*, PD or CT.

SimulatedWidthThickness(*args, **kwargs)

Simulate coarse resolution along the width (last) dimension.