imgaug is a library for image augmentation in machine learning experiments. It supports a wide range of augmentation techniques, allows to easily combine these and to execute them in random order or on multiple CPU cores, has a simple yet powerful stochastic interface and can not only augment images but also key points/landmarks, bounding boxes, heatmaps and segmentation maps. Affine transformations, perspective transformations, contrast changes, gaussian noise, dropout of regions, hue/saturation changes, cropping/padding, blurring, etc. Rotate image and segmentation map on it by the same value sampled. Convert keypoints to distance maps, extract pixels within bounding boxes from images, clip polygon to the image plane, etc. Scale segmentation maps, average/max pool of images/maps, pad images to aspect ratios (e.g. to square them). Draw heatmaps, segmentation maps, keypoints, bounding boxes, etc.
Features
- Many augmentation techniques
- Optimized for high performance
- Easy to apply augmentations only to some images
- Easy to apply augmentations in random order
- Heatmaps (float32), Segmentation Maps (int), Masks (bool)
- Keypoints/Landmarks (int/float coordinates)