imgaug is a Python library that helps people training image-based machine learning models make their datasets bigger and more varied. The idea, called image augmentation, is to take a set of input pictures and produce many slightly altered copies of each one. Training on those altered copies teaches the model that a cat is still a cat whether the image is rotated, brighter, or noisier, which usually makes the final model more reliable on real-world photos. The library covers a wide range of changes you can apply to a picture. The README lists affine transformations like rotation and shear, perspective warps, contrast and hue and saturation tweaks, Gaussian noise, blur, cropping and padding, dropping out regions of the image, and horizontal flips, among many others. These can be combined into pipelines, applied to only a fraction of the images, or run in random order, so each pass through the training data looks different. A distinguishing feature of imgaug is that the same augmentation can be applied not just to the image itself, but also to several kinds of labels that go with it. These include heatmaps, segmentation maps, masks, keypoints or landmarks, bounding boxes, polygons, and line strings. The library keeps everything in sync, so if it rotates an image by 15 degrees, the bounding boxes around the objects in that image rotate with it. The README notes that label arrays may be a different size than their image and still work without extra code. The random values used inside a pipeline are also aligned automatically. If you tell imgaug to apply the same crop or the same colour shift across a batch of related images, it samples the parameters once and reuses them, which matters for tasks like stereo vision or video frames. The README opens with a large table of example outputs showing what the same change looks like across images, heatmaps, segmentation maps, keypoints, and bounding boxes, and points readers at full documentation, installation notes, code samples, and citation information for academic use.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.