Source-linked AI summary

Augmentor: An Image Augmentation Library for Machine Learning

Marcus D. Bloice, Christof Stocker, Andreas Holzinger

arXiv:1708.04680v1cs.CVcs.LGstat.ML

TL;DR

Image augmentation can expand limited training data, but flexible control over realistic image transformations is needed. Augmentor addresses this with a stochastic, pipeline-based library for Python and Julia that supports standard and advanced operations. In an MNIST experiment, augmenting 1000 images to 10,000 produced an almost 4% performance improvement on the same test set.

  • Problem

    Data augmentation generates additional labeled training samples from existing observations, which is useful when acquiring new data is difficult or infeasible.

  • Method

    Augmentor provides a stochastic, pipeline-based API that chains configurable image operations while randomising their application and parameters within user-specified ranges.

  • Results

    Almost 4% improvement in performance was obtained on the same 10,000-image MNIST test set after augmenting 1000 training images to 10,000.

  • Takeaways & Limitations

    Augmentor makes artificial image-data generation easier through fine-grained control and functions covering augmentation techniques from the literature.

Abstract

from arXiv · show

The generation of artificial data based on existing observations, known as data augmentation, is a technique used in machine learning to improve model accuracy, generalisation, and to control overfitting. Augmentor is a software package, available in both Python and Julia versions, that provides a high level API for the expansion of image data using a stochastic, pipeline-based approach which effectively allows for images to be sampled from a distribution of augmented images at runtime. Augmentor provides methods for most standard augmentation practices as well as several advanced features such as label-preserving, randomised elastic distortions, and provides many helper functions for typical augmentation tasks used in machine learning.

1. Introduction

Augmentor is designed as a comprehensive, highly customisable image-augmentation library using stochastic pipelines to generate new training data. Its parametric operations provide fine control over how images are created.

  • Augmentor uses a stochastic, pipeline-based approach to generate augmented images by chaining operations and randomising their application and parameters.This allows images to be sampled from a distribution of possible outputs at runtime.
  • Data augmentation perturbs existing observations to create new samples while preserving their labels.It can provide more training data when collecting new samples is difficult or infeasible.
  • The package aims to be comprehensive, highly customisable, platform independent, and independent of any particular machine learning framework.
  • Augmentor’s operations are highly parametric, enabling fine control over the images produced by the pipeline.

2. Documentation and Availability

Augmentor is distributed for both Python and Julia, with source code and documentation available through the project’s online resources. Both versions use the MIT Licence.

  • Augmentor is available in both Python and Julia.
  • The project provides source code on GitHub and comprehensive documentation on Read The Docs.
  • Python installation uses `pip install Augmentor`, while the Julia version can be obtained with `Pkg.clone("https://github.com/Evizero/Augmentor.jl.git")`.

3. Design

Augmentor provides a pipeline-based API covering standard and advanced image transformations, with stochastic control over operation application and parameters. In an MNIST example, augmentation expanded a small training set and improved performance by almost 4%.

  • 3. Design: Augmentor supports standard transformations including rotation, flipping, cropping, scaling, resizing, perspective shifting, shearing, and zooming.It also includes less frequently used operations and preprocessing conveniences.
  • 3. Design: Users construct pipelines by ordering operations, assigning application probabilities, and specifying parameter ranges for each operation.Images can be repeatedly passed through the pipeline to generate the desired amount of new data.
  • 3.1 Main Features: Augmentor’s image-aware transformations crop and resize rotated, sheared, and perspective-transformed images to avoid black or transparent regions.
  • 3.1 Main Features: Random elastic transforms are configurable through grid size and displacement strength, controlling distortion granularity and magnitude.
  • 3.2 Practical Example: 1000 MNIST training images were augmented to produce 10,000 new images using randomised elastic transforms and random rotations.The procedure generated 1000 images per digit and was repeated once for each of the 10 digits.
  • 3.2 Practical Example: Almost 4% improvement in performance was obtained on the same 10,000-image MNIST test set after training with the augmented data.

4. Conclusions

Augmentor simplifies artificial image-data generation through a stochastic, pipeline-based API with fine-grained control and broad augmentation functionality. Its future development is intended to expand support for reference-based and advanced preprocessing methods.

  • Augmentor provides a stochastic, pipeline-based API for fine-grained control over creating augmented data.
  • The library includes many augmentation functions drawn from techniques found in the literature.
  • Future work will add reference-dataset mirroring and advanced preprocessing methods such as specialised contrast manipulation and vignetting.
Loading 1708.04680v1…