◆SkillVision & ImageFree
Albumentations
Fast and flexible image augmentation library with 70+ transforms for computer vision model training.
Installs560k
Rating★ 4.8
Reviews187
Albumentations
Albumentations is the most widely used image augmentation library in computer vision. It provides a composable, framework-agnostic API for 70+ pixel-level and spatial transforms, all implemented in highly optimised C++/SIMD under the hood for maximum throughput during training.
Key Features
- 70+ transforms: flips, rotations, crops, colour jitter, blur, noise, elastic distortions, perspective, and domain-specific weather/medical effects
- Multi-target: augment images, masks, bounding boxes, and keypoints in sync with a single pipeline call
- Framework agnostic: integrates with PyTorch, Keras/TF, JAX, FastAI, and plain NumPy
- Blazing fast: built on OpenCV C++ backend; 40-50× faster than torchvision for many transforms
- Serialisable: save and load augmentation pipelines as JSON/YAML for reproducibility
- AutoAugment & RandAugment: policy-based augmentation search strategies included
Quick Start
pip install albumentations
import albumentations as A
import cv2
transform = A.Compose([
A.HorizontalFlip(p=0.5),
A.RandomBrightnessContrast(p=0.2),
A.ShiftScaleRotate(shift_limit=0.05, scale_limit=0.1, rotate_limit=15, p=0.5),
A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
])
image = cv2.imread("image.jpg")
augmented = transform(image=image)["image"]
npx ai-supply add albumentations-image-augmentation
Curated mirror of the open-source Albumentations (MIT). Get it from the source.