Source-linked AI summary

The Effectiveness of Data Augmentation in Image Classification using Deep Learning

Luis Perez, Jason Wang

arXiv:1712.04621v1cs.CV

TL;DR

Limited data constrains image-classification tasks, so the paper compares traditional transformations, CycleGAN-based augmentation, and learned neural augmentation. Traditional augmentation was very effective alone, while neural augmentation outperformed no augmentation on the dogs-versus-cats task.

  • Problem

    Insufficient reliable data limits specialized image-classification tasks, motivating evaluation of data-augmentation techniques.

  • Method

    The paper compares basic transformations and GAN-based augmentation with a neural network trained to learn augmentations while improving classification.

  • Results

    Traditional augmentation was very effective alone, while neural augmentation achieved 91.5% versus 85.5% without augmentation on dogs-versus-cats classification.

  • Takeaways & Limitations

    Data augmentation, particularly traditional transformations and learned neural augmentation, offers promising support for image classification when available data is limited.

  • Takeaways & Limitations

    GAN-based and neural augmentations did not perform much better than traditional augmentation while consuming roughly three times or more compute time.

Abstract

from arXiv · show

In this paper, we explore and compare multiple solutions to the problem of data augmentation in image classification. Previous work has demonstrated the effectiveness of data augmentation through simple techniques, such as cropping, rotating, and flipping input images. We artificially constrain our access to data to a small subset of the ImageNet dataset, and compare each data augmentation technique in turn. One of the more successful data augmentations strategies is the traditional transformations mentioned above. We also experiment with GANs to generate images of different styles. Finally, we propose a method to allow a neural net to learn augmentations that best improve the classifier, which we call neural augmentation. We discuss the successes and shortcomings of this method on various datasets.

1. Introduction

The paper investigates data augmentation for image and video classification, motivated by data scarcity in specialized and privacy-sensitive settings. It compares conventional transformations, CycleGAN-based style transfer, and learned neural augmentation using validation-set classification performance.

  • Motivation: The paper proposes evaluating different data augmentation techniques for image and video classification, motivated by the broader effectiveness of having more usable data.The introduction notes that models can improve when useful information is extracted even from lower-quality data.
  • Motivation: Data scarcity particularly affects specialized tasks such as medical image classification because privacy protections limit access to data.The introduction specifically identifies cancer-type classification as hindered by insufficient data.
  • Experimental setup: Experiments use Tiny-ImageNet-200 and MNIST, while restricting the available data to two classes for evaluating augmentation effectiveness.Tiny-ImageNet-200 has 100k training, 10k validation, and 10k test images across 200 classes; MNIST has 60k training and 10k test images across 10 classes.
  • Methods: The study trains a small classifier, applies typical augmentation techniques, uses CycleGAN for style transfer, and explores neural augmentation that learns transformations minimizing classification loss.Neural augmentation combines style-transfer and classification networks rather than relying only on standard augmentation tricks.
  • Evaluation: Validation-dataset classification performance is the metric used to compare the augmentation strategies.The same validation-based criterion is applied across the described augmentation approaches.

2. Related Work

Prior work uses data augmentation and related regularization methods to reduce overfitting and improve image-classifier generalization. Existing approaches include geometric and color transformations, layered augmentation, GAN-based image generation, and jointly learned augmentation and classification.

  • Overfitting and Regularization: Small datasets can cause overfitting because models generalize poorly from training data to validation and test data.Prior work also considers weight-norm regularization and dropout as methods for reducing overfitting.
  • Layered Augmentation: Layer-wise augmentation with elastic deformations and affine transformations achieved a 0.35% error rate on digit data.The approach generated new training samples using augmentation techniques at each layer of a deep network.
  • GAN-Based Generation: GANs generate counterfeit images from the original data distribution through a min-max process involving competing generator and discriminator networks.The passage presents GANs as a technique for unsupervised generation of new images for training.
  • Neural Augmentation: Neural augmentation trains a network to augment and classify simultaneously, learning how to generate augmentations that improve the classifier.This extends an earlier approach that learned weights for combining existing augmentation techniques.

3. Methods

The methods compare offline augmentation, using traditional transformations and GAN-based style transfer before classification, with a neural augmentation network trained jointly with the classifier. Experiments use a small augmentation CNN and a compact classifier, while validation and test images pass only through the classification network.

  • Augmentation approaches: The study evaluates two augmentation approaches: generating augmented data before classifier training and learning augmentations with a prepended neural network.For learned augmentation, classification loss is back-propagated through both augmentation and classification layers; validation and test images use only the classifier.
  • Traditional transformations: Traditional transformations create duplicates by shifting, zooming, rotating, flipping, distorting, or hue-shading each input image.Both original and duplicate images train the network, expanding a dataset of size N to 2N.
  • Style transformations via GANs: GAN-based style transfer selects one of 6 styles—Cezanne, Enhance, Monet, Ukiyoe, Van Gogh, or Winter—to generate a styled version of each image.The original and styled images are both fed into training.
  • Neural augmentation: The learned augmentation network receives two same-class images and produces an augmented image layer that is classified alongside the original input.The classification objective is cross entropy on class-score sigmoids, with additional style-loss and no-loss layers specified in the method.
  • Network implementation: The implementation uses a small 5-layer CNN for augmentation and a compact 3-layer classifier with batch normalization, pooling, two fully connected layers, and dropout.The classifier is intentionally smaller than VGG16 to enable faster evaluation rather than maximize classifier performance.

4. Datasets and Features

The study evaluates augmentation methods on three small, two-class image datasets, using held-out test data and an 80:20 training-validation split. The datasets vary in visual complexity, image format, and class similarity across Tiny ImageNet and MNIST.

  • All three datasets contain two classes, reserve a small portion for testing, and split the remaining images 80:20 between training and validation.This common setup supports comparisons across datasets.
  • The first Tiny ImageNet dataset uses 500 dog and 500 cat images, with 400 per class for training and 100 per class for validation.Images are 64x64x3 RGB, with per-color normalization during preprocessing.
  • The second Tiny ImageNet dataset replaces cats with goldfish because goldfish differ more visually from dogs, while cats are harder for CNNs to distinguish from dogs.Goldfish images also tend to have very bright orange styles, unlike the similar styles of cats and dogs.
  • The MNIST dataset contains 2k grayscale 28x28x1 images for distinguishing 0s from 8s, providing a simpler and more structured comparison with centered digits.The images are normalized during preprocessing, and MNIST is used to assess whether patterns from complex images also occur in simpler ones.

5. Experiments

The experiments evaluate 10 augmentation experiments on ImageNet using a fixed 40-epoch Adam training protocol and report the highest test accuracy across epochs. Neural augmentation uses an AugNet to synthesize images for SmallNet classification, with optional content, style, or no augmentation loss.

  • Experimental setup: 10 ImageNet experiments use 40 epochs, a 0.0001 learning rate, Adam optimization, and the highest test accuracy across epochs as the best score.The reported best score is the highest test accuracy observed at any epoch.
  • Classifier: SmallNet classifies augmented images using three convolutional layers with batch normalization and max pooling, followed by two fully connected layers.Its final fully connected layer has output dimension 2.
  • Neural augmentation: AugNet concatenates two same-class images into a six-channel input and generates a three-channel image with the input height and width.For grayscale images, the input has two channels instead of six.
  • Neural augmentation: During training, randomly sampled same-class image pairs pass through AugNet and SmallNet, and both networks’ weights are updated; at test time, SmallNet performs classification.The training batch is first used to improve SmallNet through back-propagated gradients before augmented images are generated.
  • Loss functions: The objective combines SmallNet’s multi-class cross-entropy classification loss with content or style augmentation loss, while β = 0 removes augmentation loss.Content loss is mean squared error between augmented and target images, whereas style loss applies content loss to their Gram matrices.

6. Results

The results examine augmentation effectiveness for dog-versus-cat classification through several experiments, including traditional translation and GAN-based image generation.

  • The first experiments classify dogs versus cats and evaluate the effectiveness of augmentation techniques.Several experiments were conducted for this purpose.
  • Experiments on Traditional Translation: Traditional translation augmentation manually transforms images from each class before training SmallNet on all images.
  • Experiments on GANs: GAN experiments randomly select a style for each image, generate images accordingly, and train SmallNet.

3. EXPERIMENTS ON NEURAL NET AUGMENTATION

Neural augmentation improves classification over no augmentation on dogs-versus-cats and dogs-versus-goldfish, while having no effect on MNIST. Its generated images often combine source-image features, but augmentation losses do not converge consistently and some outputs lack clear visual meaning.

  • Quantitative results: Neural augmentation achieves 91.5% versus 85.5% without augmentation on dogs-versus-cats and 77.0% versus 70.5% on dogs-versus-goldfish.It performs best on dogs versus cats and second best on dogs versus goldfish, while traditional augmentation performs nearly as well at lower time expense.
  • Control experiment: Only the control experiment performs worse than no augmentation, suggesting that simply adding layers does not improve generalization with little data.The control may reflect an unsuitable learning rate, as the network fails to converge on the training data.
  • MNIST: Neural augmentation has no effect on MNIST, possibly because a simple CNN already performs well and digit combinations add little new information.The experiments use MNIST to examine augmentation on structured, centered digits rather than unstructured ImageNet images.
  • Qualitative analysis: Generated images usually combine source-image features, such as merging goldfish bodies or preserving one dog’s characteristics while retaining contours from another.Some outputs preserve defining features including fish bodies, dog noses, legs, and ears, while regularization can fade colors and background noise.
  • Limitations: Some augmented images lack clear visual meaning, and content and style losses decrease little or fail to converge during training.Content loss changes from about 1.6 to 1.3–1.5 after 30 epochs and never converges, while style loss remains around 0.5.
  • Generalization: Accuracy plots indicate that neural augmentation slightly reduces training accuracy during much of the first 20 epochs, consistent with somewhat less overfitting and better generalization.Direct loss comparison is unavailable because the experiments use different loss functions.

7. Conclusion/Future Work

Data augmentation improves classification accuracy, with traditional methods effective on their own and CycleGAN-based and neural augmentation methods showing promise. Future work includes testing augmentation with more complex networks, combining techniques, and applying style transfer or reinforcement learning to broader data settings.

  • Conclusion: Data augmentation offers promising ways to increase classification accuracy, with traditional augmentation effective alone and CycleGAN-based methods showing promise.The paper also experiments with combining training images so a neural network can learn augmentations.
  • Future Work: Future work could test augmentation with VGG16, apply it to classification tasks with insufficient data, and use style transfer for unbalanced datasets.The paper also identifies reinforcement learning as a potentially interesting direction for more generic applications.
  • Limitations and Future Work: GANs and neural augmentations do not perform much better than traditional augmentation while consuming almost 3x the compute time or more.The authors suggest that combining traditional augmentation followed by neural augmentation might further improve classification strength.
Loading 1712.04621v1…