Augmentations#

The rAI-toolbox provides methods and utilities for generating diverse data augmentations that are not readily available via other existing libraries (e.g., torchvision.tranforms, kornia).

Fourier-Basis Augmentations and Utilities#

Utilities derived from Fourier-Based Augmentations for Improved Robustness and Uncertainty Calibration.

FourierBasis(basis, position, sym_position, ...)

Describes a 2D planewave generated via:

generate_fourier_bases(nrows, ncols[, ...])

Yields each unique, real-valued 2D array with unit norm, such that its Fourier transform is supported at each (i, j) and its symmetric position on a shape-(nrows, ncols) grid in Fourier space, where the lowest frequency component resides at the center of the grid.

create_heatmaps(dataloader, ...[, ...])

AugMix Augmentations and Utilities#

Utilities derived from AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty.

AugMix(process_fn, augmentations, *[, ...])

Augments datum using a mixture of randomly-composed augmentations via a method called "AugMix" [Rd2eef4740ea0-1].

Fork(*forked_transforms)

Forks an input into an arbitrary number of transform-chains.

augment_and_mix(datum, *, process_fn, ...[, ...])

Augments datum using a mixture of randomly-composed augmentations via a method called "AugMix" [R118abdb39488-1].