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.
- AdditiveNoise
- AdvancedBlur
- AutoContrast
- Blur
- CLAHE
- ChannelDropout
- ChannelShuffle
- ChromaticAberration
- ColorJitter
- Defocus
- Downscale
- Emboss
- Equalize
- FDA
- FancyPCA
- FromFloat
- GaussNoise
- GaussianBlur
- GlassBlur
- HistogramMatching
- HueSaturationValue
- ISONoise
- Illumination
- ImageCompression
- InvertImg
- MedianBlur
- MotionBlur
- MultiplicativeNoise
- Normalize
- PixelDistributionAdaptation
- PlanckianJitter
- PlasmaBrightnessContrast
- PlasmaShadow
- Posterize
- RGBShift
- RandomBrightnessContrast
- RandomFog
- RandomGamma
- RandomGravel
- RandomRain
- RandomShadow
- RandomSnow
- RandomSunFlare
- RandomToneCurve
- RingingOvershoot
- SaltAndPepper
- Sharpen
- ShotNoise
- Solarize
- Spatter
- Superpixels
- TemplateTransform
- TextImage
- ToFloat
- ToGray
- ToRGB
- ToSepia
- UnsharpMask
- ZoomBlur
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 | ✓ | ✓ |