A list of transforms and their supported targets¶
We can split all transforms into two groups: pixel-level transforms, and spatial-level transforms. Pixel-level transforms will change just an input image and will leave any additional targets such as masks, bounding boxes, and keypoints unchanged. Spatial-level transforms will simultaneously change both an input image as well as additional targets such as masks, bounding boxes, and keypoints. For the additional information, please refer to this section of "Why you need a dedicated library for image augmentation".
Pixel-level transforms¶
Here is a list of all available pixel-level transforms. You can apply a pixel-level transform to any target, and under the hood, the transform will change only the input image and return any other input targets such as masks, bounding boxes, or 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
Spatial-level transforms¶
Here is a table with spatial-level transforms and targets they support. If you try to apply a spatial-level transform to an unsupported target, Albumentations will raise an error.
Transform | Image | Mask | BBoxes | Keypoints | Volume | Mask3D |
---|---|---|---|---|---|---|
Affine | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
AtLeastOneBBoxRandomCrop | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
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 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |