tta

The tta config group manages test time augmentation during inference. Note that this feature is still in beta phase. By default (tta=none) no tta is performed. If activated the model performs multiple predictions on the same sample via using different augmentations - after the prediction any geometrical distortion is reversed and the produced predictions are merged. The augmentations are loaded through the KorniaAugmentationModule that can deal with any (unnested) list of kornia augmentations. Note that tta is only active during testing and predicting with models - not during training nor validation. The following examples give a good overview on the configuration options:

rotate

mode
default: mean
  • sets the mode of the PredictionMerger

  • currently only “mean” is supported

variations
identity
default: {name: RandomHorizontalFlip, p: 0.0}
  • perform no augmentation

rot90
default: {name: RandomRotation, p: 1.0, degrees: [ 90, 90 ]}
  • rotate by 90 degrees

rot270
default: {name: RandomRotation, p: 1.0, degrees: [ 270, 270 ]}
  • rotate by 270 degrees

hflip
default: {name: RandomHorizontalFlip, p: 1.0}
  • flip the image horizontally

crop

mode
default: mean
  • sets the mode of the PredictionMerger

  • currently only “mean” is supported

size
default: ???
  • central parameter to specify output size

  • expects two ints

variations
identity
default: {name: RandomHorizontalFlip, p: 0.0}
  • perform no augmentation

crop1
default: {name: RandomResizedCrop, p: 1.0, size: ${tta.size}}
  • crop a part of the image

crop2
default: {name: RandomResizedCrop, p: 1.0, size: ${tta.size}}
  • crop a part of the image

crop3
default: {name: RandomResizedCrop, p: 1.0, size: ${tta.size}}
  • crop a part of the image