skillfed

imgaug

Image augmentation library for deep neural networks

imgaug v0.4.0 1.4M downloads/30d#4,015 on PyPI14,739
Permissive license MIT DORMANT released

What it is and what it does

imgaug is a Python library that generates augmented versions of input images by applying randomized transformations. It converts a single image into many slightly altered variants—rotated, cropped, with noise added, colors shifted, or perspective changed—to artificially expand training datasets and reduce overfitting in machine learning models.

The library handles not just raw images but also associated annotations: heatmaps, segmentation maps, keypoints, bounding boxes, polygons, and line strings. Transformations automatically align across all these data types (e.g., rotating an image and its bounding boxes by the same angle with zero extra code). It supports probability distributions as parameters, multicore augmentation, and a large collection of augmentation techniques including affine transforms, blurring, color shifts, dropout, and artistic effects.

Use it for:

  • Expand a small labeled image dataset for training computer vision models by generating variations that reduce overfitting.
  • Augment bounding boxes and keypoints alongside images for object detection or pose estimation tasks.
  • Apply consistent transformations to segmentation maps and their corresponding images during training.
  • Generate synthetic training data by applying random augmentations in parallel across multiple CPU cores.
  • Combine multiple augmentation techniques in a sequence with random selection and probability control.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Augments images and related data (heatmaps, segmentation maps, keypoints, bounding boxes, polygons) by applying transformations like rotations, noise, cropping, and color shifts to expand training datasets for machine learning.

Yes, with caution about maintenance. imgaug is widely used (top 5000 on PyPI, 1351638 monthly downloads) and solves a real problem in machine learning workflows. Install friction is low and the MIT license is unrestrictive. However, the package is dormant—last release was 2020-02-05, and two security vulnerabilities are recorded. For new projects, verify that the vulnerabilities do not affect your use case and that dependencies remain compatible with your Python version. For existing projects already using it, the risk of upgrading may outweigh the benefit.

Install

imgaug on PyPI

pip

pip install imgaug

uv

uv add imgaug

poetry

poetry add imgaug

Installing imgaug

Before you install

Low install friction with a pure-Python wheel. Depends on nine common scientific libraries (numpy, scipy, Pillow, scikit-image, opencv-python, matplotlib, imageio, Shapely, six). Maintenance is dormant—last release was 2020-02-05, though the repository remains active with a recent commit on 2024-07-30.

License in practice

MIT license (permissive) allows commercial and private use with minimal restrictions, typical for research and production machine learning projects.

Quickstart

pip install imgaug

import imgaug.augmenters as iaa
import numpy as np

seq = iaa.Sequential([iaa.Fliplr(0.5), iaa.Affine(rotate=(-10, 45))])
image = numpy.zeros((32, 32, 3), dtype=numpy.uint8)
augmented = seq(image=image)

Verify before relying

  • Current compatibility with Python versions beyond 3.8 (classifiers list 3.8 as latest)
  • Compatibility status with numpy 1.18+ and scipy versions released after 2020
  • Whether the two known security vulnerabilities (GHSA-g82g-j283-hj97, PYSEC-2026-356) affect typical augmentation workflows

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 9 — six, numpy, scipy, Pillow, matplotlib, scikit-image, opencv-python, imageio, Shapely
Maintenance dormant — 2,382 days since the last release
Last repo commit
First released
Downloads 1,351,638/month — #4,015 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities 2 — GHSA-g82g-j283-hj97, PYSEC-2026-356

Evidence: imgaug-0.4.0-py2.py3-none-any.whl

Keywords: augmentation, image, deep learning, neural network, CNN, machine learning, computer vision, overfitting

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Image RecognitionTopic :: Software Development :: Libraries :: Python Modules

Tags

image augmentation machine learningdata augmentation deep learningimage transformation trainingaugment images neural networksimage preprocessing computer visionbounding box keypoint augmentationsegmentation map augmentation
computer-visiondata-augmentationdeep-learning

More Python Modules packages