# Albumentations: fast and flexible image augmentations

Albumentations packs many fast image augmentations into one flexible library

Alexander Buslaev, Alex Parinov, Eugene Khvedchenya, Vladimir I. Iglovikov, Alexandr A. Kalinin · arXiv · 2018-9-18

- **Problem** Most deep learning frameworks ship only a short list of basic transforms like flips and crops. Existing augmentation tools also differ widely in speed, so the GPU can sit idle while the CPU prepares batches.
- **Method** Albumentations is a library that implements many transform operations quickly and also wraps other augmentation libraries behind one interface. Spatial transforms also move segmentation masks and bounding boxes with the image.
- **Results** Albumentations was faster than other common augmentation tools on most listed transforms. For example, Rotate took 3.8538 seconds per image compared to 50.8632 for Keras.

## Why existing augmentation tools fall short

Most deep learning frameworks ship only a short list of basic transforms, mostly flips, rotations, scaling and crops. That gap matters because different domains and tasks benefit from very different combinations of transforms. Medical imaging leans on heavy augmentation because its datasets are small and its annotations are sparse. Even on benchmarks, one transform can help on one dataset and hurt on another, as rotation does for digits 6 and 9 on MNIST while it helps on CIFAR-10.

Speed is a second problem, because augmentation usually runs on the CPU while the GPU handles the heavy matrix work. If augmentation is slow, the GPU sits idle while the CPU prepares the next mini-batch. So the authors treat per-image transform speed as a design target rather than a side issue.

## One library with many transforms and wrappers

The core idea is a single library that implements many transform operations quickly and also wraps other augmentation libraries behind one interface. Because the interface is shared, the same code can serve image classification, segmentation and detection. The library is meant as a fast base for those tasks rather than a set of separate tools for each one.

The main extension beyond plain images is that spatial transforms also act on segmentation masks and bounding boxes. This matters for detection and tracking, because each annotation has to move with the pixels it describes. In the street-view example, a horizontal flip and a random sized crop are applied to the image, its bounding boxes and its instance masks together.

In satellite imagery, shape-preserving transforms such as cropping, rotations, reflections and scaling are preferred, because buildings are rigid objects that should not be distorted. A top-3 solution in the DSTL challenge combined random cropping with a random transform from the dihedral group Dih4. The same binary building masks are transformed in step with the image, so labels stay aligned.

## Transforms for medical and non-rigid data

In medical video, colour transforms have been shown to help networks generalise, for example in surgical and endoscopic analysis. Medical images also contain non-rigid structures with shape variation, which pushes the authors toward grid distortion and elastic transform. So these deformation operations are offered alongside the colour and geometry transforms, and the paper's figure of a grid-distorted medical image illustrates them.

## Timing results against other tools

The authors timed each transform operation per image in Albumentations, imgaug, torchvision with Pillow and Pillow-SIMD backends, and Keras. Lower time means faster processing, so the comparison is read column by column for each operation.

Rotate took 3.8538 seconds per image in Albumentations, compared to 50.8632 for Keras. ShiftScaleRotate showed the same pattern, at 2.0605 seconds in Albumentations compared to 47.0568 for Keras. So for geometric operations, the gap to Keras is large in this table, and the speed advantage is most visible there.

The lead does not hold on every operation. HorizontalFlip took 0.7765 seconds per image in Albumentations, compared to 0.3031 for torchvision with the Pillow backend. Gamma took 1.4832 seconds in Albumentations, compared to 1.1397 for torchvision with the Pillow backend. So on these two operations the torchvision Pillow path is faster, and the broad claim has to be read as covering most operations.

## Limits of the evidence

The table reports only the time per image, so it shows speed and says nothing about how augmentation affects model accuracy. The paper does not measure end-to-end training throughput, which is the quantity that decides whether the GPU stays busy. The authors chose the example parameters so the transformed images clearly differ from the originals, and they note this may not suit practical use.

The benchmark names only the backends listed in the table, and it gives no hardware or setup details. Whether the speed lead holds for the operations left out of Table I was not tested.

## Paper info

- **Authors**: Alexander Buslaev, Alex Parinov, Eugene Khvedchenya, Vladimir I. Iglovikov, Alexandr A. Kalinin
- **Venue**: arXiv · Preprint
- **First published**: 2018-9-18
- **Added**: 2026-11-12
- **Updated**: 2018-9-18
- **Version**: v1
- **arXiv**: 1809.06839
- **DOI**: 10.3390/info11020125
- **Category**: cs.CV
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1809.06839v1) · [PDF ↗](https://arxiv.org/pdf/1809.06839v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Alexander Buslaev, Alex Parinov, Eugene Khvedchenya, Vladimir I. Iglovikov, Alexandr A. Kalinin (2018). Albumentations: fast and flexible image augmentations. arXiv:1809.06839v1. https://doi.org/10.3390/info11020125

**BibTeX**

```
@article{buslaev2018albumentations,
  title = {{Albumentations: fast and flexible image augmentations}},
  author = {Alexander Buslaev and Alex Parinov and Eugene Khvedchenya and Vladimir I. Iglovikov and Alexandr A. Kalinin},
  year = {2018},
  eprint = {1809.06839},
  archivePrefix = {arXiv},
  doi = {10.3390/info11020125},
  url = {https://arxiv.org/abs/1809.06839v1}
}
```

## Related papers

- [Image Segmentation Using Deep Learning: A Survey](https://refivu.com/en/papers/c5b4071c-1e13-4bda-97cd-37556fea547e-image-segmentation-using-deep-learning-a-survey.md)
- [You Only Look Once: Unified, Real-Time Object Detection](https://refivu.com/en/papers/ebbb8246-c3dc-41ac-9ac3-7ad9511c944d-you-only-look-once-unified-real-time-object.md)
- [Empirical Evaluation of Rectified Activations in Convolutional Network](https://refivu.com/en/papers/05562fa8-4d7f-4a6f-abed-8f1989035781-empirical-evaluation-of-rectified-activations-in.md)
- [Recent Advances in Convolutional Neural Networks](https://refivu.com/en/papers/7bfaa2e2-6e96-45b8-b038-2820fa693e61-recent-advances-in-convolutional-neural-networks.md)
- [On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima](https://refivu.com/en/papers/9954c18e-def9-48fe-bfea-2f52f4ed7acb-on-large-batch-training-for-deep-learning-generalization.md)
- [Random Erasing Data Augmentation](https://refivu.com/en/papers/4dd86d04-2086-4796-aa90-74b9d083d0ee-random-erasing-data-augmentation.md)

## Other paper commentary

- [Semantic Image Synthesis with Spatially-Adaptive Normalization](https://refivu.com/en/papers/7c8cce40-a7a4-49f2-a589-a9b074c36caa-semantic-image-synthesis-with-spatially-adaptive.md)
- [ByteTrack: Multi-Object Tracking by Associating Every Detection Box](https://refivu.com/en/papers/6d6f3415-7480-483d-afac-4b47286d13c9-bytetrack-multi-object-tracking-by-associating-every.md)
- [ViViT: A Video Vision Transformer](https://refivu.com/en/papers/4375a36b-0a1c-403c-8454-737a027ff973-vivit-a-video-vision-transformer.md)
- [Learning Important Features Through Propagating Activation Differences](https://refivu.com/en/papers/a23d41a4-f8c4-41eb-ac72-f85328d3740c-learning-important-features-through-propagating-activation.md)
- [RAFT: Recurrent All-Pairs Field Transforms for Optical Flow](https://refivu.com/en/papers/14ee65d7-abd3-40c2-af3a-dcf58b84facf-raft-recurrent-all-pairs-field-transforms-for-optical.md)
- [Adversarial Machine Learning at Scale](https://refivu.com/en/papers/fcc0e603-ae52-4f86-b341-4b1f8ee7d840-adversarial-machine-learning-at-scale.md)
- [Network In Network](https://refivu.com/en/papers/27c629ee-aa61-4496-8fca-b1dbef86d705-network-in-network.md)
- [TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension](https://refivu.com/en/papers/34db6f08-4b90-47eb-a2d8-fd0c5a90bf6e-triviaqa-a-large-scale-distantly-supervised-challenge.md)
- [An Introduction to Deep Learning for the Physical Layer](https://refivu.com/en/papers/f1790a96-c7b5-4b05-9672-d9d222404a87-an-introduction-to-deep-learning-for-the-physical.md)
- [Convolutional Sequence to Sequence Learning](https://refivu.com/en/papers/48e91a54-308d-4269-9616-28e683053df1-convolutional-sequence-to-sequence-learning.md)

## Terms in this paper

- [Data Augmentation](https://refivu.com/en/terms/cc5618231f4a-data-augmentation)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/b1ebb278-fa95-4faa-a782-1d7360e37984-albumentations-fast-and-flexible-image-augmentations)
