← all repositories
mdbloice/Augmentor

Augmentor treats image augmentation like a probabilistic assembly line

It exists to automate artificial data generation for machine learning by chaining stochastic image operations into pipelines that keep ground-truth masks perfectly aligned.

5.1k stars Python Data Tooling
Augmentor
Not currently ranked — collecting fresh signals.
star history

What it does

Augmentor is a Python library that constructs image augmentation pipelines for machine learning. You chain operations—rotations, zooms, elastic distortions, perspective shifts—each assigned an independent probability, and then sample or process images through the resulting stochastic sequence. The library writes expanded datasets to disk by default, or can stream batches directly into Keras and PyTorch via generator and transform helpers.

The interesting bit

The library’s real utility surfaces when you have pixel-perfect labels to protect. Augmentor can group ground-truth masks or multiple segmentation layers so that any rotation or skew applies identically to every channel, preventing the subtle misalignment that silently ruins a segmentation model.

Key highlights

  • Framework-agnostic core with optional Keras generators and PyTorch torch_transform() integration
  • Elastic distortions that preserve aspect ratio and avoid black padding artifacts
  • 12 distinct perspective transforms for simulating camera viewpoint changes
  • DataPipeline class for in-memory augmentation of image stacks with arbitrarily many associated masks
  • Multi-threaded execution when saving to disk (since v0.2.1)

Caveats

  • Multi-threading can slow down pipelines if the original images are very small
  • Generator-based and in-memory streaming does not yet use multi-threading, per the README’s note that this is planned for a future release

Verdict

Best suited for developers who want framework-agnostic augmentation with explicit, probabilistic control over each operation. Those already content with their deep-learning framework’s built-in augmentation will find little reason to switch.

Frequently asked

What is mdbloice/Augmentor?
It exists to automate artificial data generation for machine learning by chaining stochastic image operations into pipelines that keep ground-truth masks perfectly aligned.
Is Augmentor open source?
Yes — mdbloice/Augmentor is open source, released under the MIT license.
What language is Augmentor written in?
mdbloice/Augmentor is primarily written in Python.
How popular is Augmentor?
mdbloice/Augmentor has 5.1k stars on GitHub.
Where can I find Augmentor?
mdbloice/Augmentor is on GitHub at https://github.com/mdbloice/Augmentor.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.