--- id: imgaug version: "0.4.0" license: MIT license_treatment: permissive maintenance: dormant --- # imgaug — Image augmentation library for deep neural networks License: permissive · Maintenance: dormant · Downloads: 1.4M/mo ## 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 above — 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 pip install imgaug uv add imgaug 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: 2 ## Tags image augmentation machine learning, data augmentation deep learning, image transformation training, augment images neural networks, image preprocessing computer vision, bounding box keypoint augmentation, segmentation map augmentation, computer-vision, data-augmentation, deep-learning [View on SkillFed](https://skillfed.io/packages/imgaug) · [View on PyPI](https://pypi.org/project/imgaug/)