ANN: Augmentor.jl - Image Augmentation for Deep Learning

Hello everyone!

I am happy to finally announce the latest machine learning package I have been working on for quite a while: Augmentor.jl


Augmentor is a real-time image augmentation library designed to render the process of artificial dataset enlargement more convenient, less error prone, and easier to reproduce. It offers the user the ability to build a stochastic image-processing pipeline (or simply augmentation pipeline) using image operations as building blocks. In other words, an augmentation pipeline is little more but a sequence of operations for which the parameters can (but need not) be random variables, as the following code snippet demonstrates.

julia> pl = ElasticDistortion(6, scale=0.3, border=true) |>
            Rotate([10, -5, -3, 0, 3, 5, 10]) |>
            ShearX(-10:10) * ShearY(-10:10) |>
            CropSize(28, 28) |>
5-step Augmentor.ImmutablePipeline:
 1.) Distort using a smoothed and normalized 6×6 grid
 2.) Rotate by θ ∈ [10, -5, -3, 0, 3, 5, 10] degree
 3.) Either: (50%) ShearX by ϕ ∈ -10:10 degree. (50%) ShearY by ψ ∈ -10:10 degree.
 4.) Crop a 28×28 window around the center
 5.) Zoom by I ∈ {0.9×0.9, 1.0×1.0, 1.1×1.1, 1.2×1.2}

The package was designed specifically for high performance. It makes use of multiple heuristics to generate efficient tailor-made code for the concrete user-specified augmentation pipeline. In particular Augmentor tries to avoid the need for any intermediate images, but instead aims to compute the output image directly from the input in one single pass.


To start with, we provide two “getting started” tutorials. Both are available as normal script files in the examples/ folder of the package, as part of the online documentation, and also as Jupyter notebooks.

MNIST: Elastic distortions

Link to Tutorial

A small hands on tutorial on how to interactively explore the parameter space for the dataset of interest.


MNIST: TensorFlow CNN

Link to Tutorial

A tutorial on how Augmentor can be added to an existing experiment. Here we use the TensorFlow.jl/examples/mnist_full.jl example network as a starting point and see how augmentation can influence the performance.

(please forgive my unlabeled axis for now. I had to deal with a bunch of segfaults for over an hour and forgot to add them)


This package makes heavy use of the following packages in order to provide it’s main functionality.
For a full list see REQUIRE.

Augmentor.jl is the Julia implementation for Augmentor. The Python version of the same name is available here.