Skip to content

Full API Reference on a single page

Transform Types

1. Pixel-level transforms

Transforms that modify pixel values without changing spatial relationships. These can be safely applied to any target as they only affect the input image, leaving other targets (masks, bounding boxes, keypoints) unchanged.

2. Spatial-level transforms

Transforms that modify the spatial arrangement of pixels/features. Different targets have different spatial transform support - see the compatibility table below:

Transform Image Mask BBoxes Keypoints Volume Mask3D
Affine
BBoxSafeRandomCrop
CenterCrop
CoarseDropout
Crop
CropAndPad
CropNonEmptyMaskIfExists
D4
ElasticTransform
Erasing
FrequencyMasking
GridDistortion
GridDropout
GridElasticDeform
HorizontalFlip
Lambda
LongestMaxSize
MaskDropout
Morphological
NoOp
OpticalDistortion
OverlayElements
Pad
PadIfNeeded
Perspective
PiecewiseAffine
PixelDropout
RandomCrop
RandomCropFromBorders
RandomCropNearBBox
RandomGridShuffle
RandomResizedCrop
RandomRotate90
RandomScale
RandomSizedBBoxSafeCrop
RandomSizedCrop
Resize
Rotate
SafeRotate
ShiftScaleRotate
SmallestMaxSize
ThinPlateSpline
TimeMasking
TimeReverse
Transpose
VerticalFlip
XYMasking

3. Volumetric (3D) transforms

Transforms designed for three-dimensional data (D, H, W). These operate on volumes and their corresponding 3D masks, supporting both single-channel and multi-channel data.

Transform Image Mask BBoxes Keypoints Volume Mask3D
CenterCrop3D
CoarseDropout3D
CubicSymmetry
Pad3D
PadIfNeeded3D
RandomCrop3D