Data augmentation

Transforms wrapper


source

CustomDictTransform

 CustomDictTransform (aug)

A class that serves as a wrapper to perform an identical transformation on both the image and the target (if it’s a mask).

Vanilla transforms


source

do_pad_or_crop

 do_pad_or_crop (o, target_shape, padding_mode, mask_name, dtype=<class
                 'torch.Tensor'>)

source

PadOrCrop

 PadOrCrop (size, padding_mode=0, mask_name=None)

Resize image using TorchIO CropOrPad.


source

ZNormalization

 ZNormalization (masking_method=None, channel_wise=True)

Apply TorchIO ZNormalization.


source

BraTSMaskConverter

 BraTSMaskConverter (enc=None, dec=None, split_idx=None, order=None)

Convert BraTS masks.


source

BinaryConverter

 BinaryConverter (enc=None, dec=None, split_idx=None, order=None)

Convert to binary mask.


source

RandomGhosting

 RandomGhosting (intensity=(0.5, 1), p=0.5)

Apply TorchIO RandomGhosting.


source

RandomSpike

 RandomSpike (num_spikes=1, intensity=(1, 3), p=0.5)

Apply TorchIO RandomSpike.


source

RandomNoise

 RandomNoise (mean=0, std=(0, 0.25), p=0.5)

Apply TorchIO RandomNoise.


source

RandomBiasField

 RandomBiasField (coefficients=0.5, order=3, p=0.5)

Apply TorchIO RandomBiasField.


source

RandomBlur

 RandomBlur (std=(0, 2), p=0.5)

Apply TorchIO RandomBiasField.


source

RandomGamma

 RandomGamma (log_gamma=(-0.3, 0.3), p=0.5)

Apply TorchIO RandomGamma.


source

RandomMotion

 RandomMotion (degrees=10, translation=10, num_transforms=2,
               image_interpolation='linear', p=0.5)

Apply TorchIO RandomMotion.

Dictionary transforms


source

RandomElasticDeformation

 RandomElasticDeformation (num_control_points=7, max_displacement=7.5,
                           image_interpolation='linear', p=0.5)

Apply TorchIO RandomElasticDeformation.


source

RandomAffine

 RandomAffine (scales=0, degrees=10, translation=0, isotropic=False,
               image_interpolation='linear', default_pad_value=0.0, p=0.5)

Apply TorchIO RandomAffine.


source

RandomFlip

 RandomFlip (axes='LR', p=0.5)

Apply TorchIO RandomFlip.


source

OneOf

 OneOf (transform_dict, p=1)

Apply only one of the given transforms using TorchIO OneOf.