imgaug

imgaug

★ 4.2 🔖 4000 saves 💰 Free GitHub

imgaug is a widely used Python library for image augmentation in machine learning experiments, turning a set of input images into a much larger set of realistic variations. It has more than 14,700 stars on GitHub and was most recently updated in 2024.

Overview

What made imgaug a staple of computer-vision work is that it augments the annotations together with the image. When an image is rotated, cropped or warped, its keypoints, bounding boxes, polygons, segmentation maps and heatmaps are transformed in exactly the same way, so your labeled training data stays correct. A large catalog of augmenters — geometric transforms, color and contrast changes, noise, blur and weather effects — can be composed into sequences and pipelines, with deterministic modes for reproducible experiments.

Its catalog goes well beyond the basics found in most frameworks. Alongside affine transforms, crops and flips, imgaug ships augmenters for perspective changes, superpixels, edge enhancement, color-space conversions and realistic weather — rain, snow, fog and clouds — plus blending and dropout variants that simulate damaged or occluded inputs. Augmenters can be applied per-image with different random parameters inside one batch, and the library was a fixture of winning Kaggle pipelines for years because it could manufacture the data diversity that small labeled datasets lack. Everything operates on plain NumPy arrays, so it composes with PyTorch, TensorFlow or any custom training loop.

Key Features

  • Augments images together with keypoints, bounding boxes, polygons, segmentation maps and heatmaps
  • Large catalog of augmenters covering geometric, color, contrast, noise and weather effects
  • Compose augmenters into sequences and pipelines with random or fixed ordering
  • Deterministic and stochastic modes for reproducible experiments
  • Works with plain NumPy arrays, independent of any ML framework
  • Extensive documentation with visual examples

💳 Pricing

imgaug is free and open source under the MIT license, installable from PyPI with no paid tiers or usage limits.

Who Is It For

Computer vision engineers, dataset builders and competition practitioners who need more, better-labeled training images without collecting new data.

🚀 Visit imgaug Official Site

🚩 Report an issue