MCPcopy
hub / github.com/aleju/imgaug

github.com/aleju/imgaug @0.4.0 sqlite

repository ↗ · DeepWiki ↗ · release 0.4.0 ↗
8,894 symbols 23,588 edges 146 files 1,135 documented · 13%
README

imgaug

This python library helps you with augmenting images for your machine learning projects. It converts a set of input images into a new, much larger set of slightly altered images.

Build Status codecov Codacy Badge

  Image Heatmaps Seg. Maps Keypoints Bounding Boxes, Polygons
Original Input input images input heatmaps input segmentation maps input keypoints input bounding boxes
Gauss. Noise + Contrast + Sharpen non geometric augmentations, applied to images non geometric augmentations, applied to heatmaps non geometric augmentations, applied to segmentation maps non geometric augmentations, applied to keypoints non geometric augmentations, applied to bounding boxes
Affine affine augmentations, applied to images affine augmentations, applied to heatmaps affine augmentations, applied to segmentation maps affine augmentations, applied to keypoints affine augmentations, applied to bounding boxes
Crop + Pad crop and pad augmentations, applied to images crop and pad augmentations, applied to heatmaps crop and pad augmentations, applied to segmentation maps crop and pad augmentations, applied to keypoints crop and pad augmentations, applied to bounding boxes
Fliplr + Perspective Horizontal flip and perspective transform augmentations, applied to images Horizontal flip and perspective transform augmentations, applied to heatmaps Horizontal flip and perspective transform augmentations, applied to segmentation maps Horizontal flip and perspective transform augmentations, applied to keypoints Horizontal flip and perspective transform augmentations, applied to bounding boxes

More (strong) example augmentations of one input image:

64 quokkas

Table of Contents

  1. Features
  2. Installation
  3. Documentation
  4. Recent Changes
  5. Example Images
  6. Code Examples
  7. Citation

Features

Installation

The library supports python 2.7 and 3.4+.

Installation: Anaconda

To install the library in anaconda, perform the following commands:

conda config --add channels conda-forge
conda install imgaug

You can deinstall the library again via conda remove imgaug.

Installation: pip

Then install imgaug either via pypi (can lag behind the github version):

pip install imgaug

or install the latest version directly from github:

pip install git+https://github.com/aleju/imgaug.git

For more details, see the install guide

To deinstall the library, just execute pip uninstall imgaug.

Documentation

Example jupyter notebooks: * Load and Augment an Image * Multicore Augmentation * Augment and work with: Keypoints/Landmarks, Bounding Boxes, Polygons, Line Strings, Heatmaps, Segmentation Maps

More notebooks: imgaug-doc/notebooks.

Example ReadTheDocs pages: * Quick example code on how to use the library * Overview of all Augmenters * API

More RTD documentation: imgaug.readthedocs.io.

All documentation related files of this project are hosted in the repository imgaug-doc.

Recent Changes

  • 0.4.0: Added new augmenters, changed backend to batchwise augmentation, support for numpy 1.18 and python 3.8.
  • 0.3.0: Reworked segmentation map augmentation, adapted to numpy 1.17+ random number sampling API, several new augmenters.
  • 0.2.9: Added polygon augmentation, added line string augmentation, simplified augmentation interface.
  • 0.2.8: Improved performance, dtype support and multicore augmentation.

See changelogs/ for more details.

Example Images

The images below show examples for most augmentation techniques.

Values written in the form (a, b) denote a uniform distribution, i.e. the value is randomly picked from the interval [a, b]. Line strings are supported by (almost) all augmenters, but are not explicitly visualized here.

meta
Identity ChannelShuffle      
Identity ChannelShuffle      
See also: Sequential, SomeOf, OneOf, Sometimes, WithChannels, Lambda, AssertLambda, AssertShap

Core symbols most depended-on inside this repo

augment_image
called by 763
imgaug/augmenters/meta.py
copy
called by 293
imgaug/random.py
to_deterministic
called by 266
imgaug/augmenters/meta.py
get_arr
called by 213
imgaug/augmentables/heatmaps.py
draw_samples
called by 206
imgaug/parameters.py
augment_keypoints
called by 169
imgaug/augmenters/meta.py
coords_almost_equals
called by 156
imgaug/augmentables/kps.py
augment_heatmaps
called by 140
imgaug/augmenters/meta.py

Shape

Method 7,294
Class 880
Function 618
Route 102

Languages

Python100%

Modules by API surface

test/augmenters/test_meta.py872 symbols
test/augmenters/test_geometric.py768 symbols
test/augmenters/test_size.py525 symbols
test/augmentables/test_polys.py434 symbols
test/test_parameters.py399 symbols
test/augmenters/test_arithmetic.py352 symbols
test/augmenters/test_blend.py332 symbols
test/augmentables/test_lines.py299 symbols
test/augmenters/test_color.py263 symbols
test/augmentables/test_bbs.py255 symbols
test/augmenters/test_pillike.py236 symbols
test/test_random.py226 symbols

Dependencies from manifests, versioned

numpy1.15 · 1×
pytest3.0.5 · 1×
scikit-image0.14.2 · 1×
xdoctest0.7.2 · 1×

For agents

$ claude mcp add imgaug \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact