
Albumentations
Python library that randomly transforms images to create more training data for computer vision models.
- Stars
- 15.3k
- Forks
- 1.7k
- Licence
- MIT
- Language
- Python
- Last update
- 1.4 years ago
- Type
- Library
This repository is archived and no longer maintained.
What it is
Albumentations is a Python library for image augmentation: it creates varied copies of existing images (crops, flips, brightness changes and similar transforms) so deep learning models can train on more examples. It applies the same transforms to masks, bounding boxes and keypoints so labels stay aligned with the image. The project is archived and no longer maintained; its README points users to the successor AlbumentationsX.
- Build a training pipeline that randomly crops, flips and adjusts brightness of images before each training step
- Apply identical geometric transforms to an image and its segmentation mask
- Transform bounding boxes and keypoints together with images for object detection or pose estimation
- Compose several transforms into one pipeline object with per-transform probabilities
Great for
- Machine learning engineers training image classification or segmentation models with limited data
- Computer vision practitioners working on object detection who need boxes transformed along with images
- Developers who want a single consistent API for images, masks, boxes and keypoints
- Students learning image augmentation in a PyTorch or TensorFlow training pipeline
Not ideal for
- Teams that need bug fixes, security updates or support, since the repository is archived and the README says no further updates will be provided; consider AlbumentationsX instead
- Projects that must use a permissive license alongside the AGPL-3.0 variant of the successor, because the README says AGPL is incompatible with MIT, Apache and BSD and commercial licensing is needed
- People who need Python versions or PyTorch versions newer than the library supports, because the README warns it may break with new releases
- Non-programmers looking for a point-and-click image editor
How to get it
- 1
Install with a package manager
You'll need: Python 3.9 or higher
Install latest version from PyPI
pip install -U albumentations - 2
Run it
- Install the package with pip
- Import albumentations as A and opencv (cv2)
- Declare a pipeline with A.Compose and the transforms you want
- Read an image with OpenCV, convert it to RGB, and pass it to the transform
- Use the returned augmented image in your training loop
- 3
Get the most out of it
- Use the probability argument p on each transform to control how often it is applied
- Check the supported-targets reference in the documentation to see which transforms work with masks, boxes and keypoints
- Review the documentation's task-specific guidance for classification, segmentation and detection
- If you need ongoing support, the README points to AlbumentationsX as the maintained successor with a drop-in migration path
Downloads
Strengths
- Unified API covers images, masks, bounding boxes and keypoints
- Large set of transforms, which the README describes as 70+
- Widely used and documented, with a PyPI and conda-forge distribution and an MIT license
Trade-offs
- Archived: the README states no bug fixes, features or compatibility updates will be provided
- Performance claims in the README come from the project's own benchmarks and should be checked for your workload
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| albumentations (this) | 15.3k | Library | beginner | 1.4 years ago | Machine learning engineers training image classification or segmentation models with limited data |
| imgaug | 14.7k | Library | intermediate | 2.3 years ago | Machine learning engineers training image models on a limited dataset |
| supervision | 51.5k | Library | intermediate | 4 days ago | Python developers building apps on top of object detection or segmentation models |
| segmentation_models.pytorch | 11.8k | Library | intermediate | 4 days ago | Python developers building image segmentation models in PyTorch |
| labelImg | 25k | Dev tool | beginner | 2.4 years ago | People who need a simple local tool to draw bounding boxes on a small image set |
| mit-deep-learning | 10.5k | Learning resource | beginner | 2.8 years ago | Students following MIT deep learning courses |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.