A novel method for data augmentation: Nine Dot Moving Least Square (ND-MLS)

Wen Yang, Rui Wang, Yanchao ZhangarXiv 2022 · DOI

Abstract

Deep neural networks typically require vast amounts of labeled data to achieve high performance in computer vision tasks. This paper introduces Nine-Dot Moving Least Squares (ND-MLS), a novel data augmentation technique that leverages rigid image deformation to mitigate the challenges of extreme data scarcity. By manipulating a grid of nine control points, ND-MLS can generate thousands of realistic variations from a single image. Our experiments demonstrate that deep learning models can achieve state-of-the-art results in classification, detection, and segmentation tasks using as few as 10 labeled images per category.

Introduction

The "data-hungry" nature of deep learning remains a significant barrier to its application in domains where labeled data is scarce or expensive to obtain. While techniques like fine-tuning and few-shot learning offer some relief, they often rely on massive pre-training or suffer from overfitting in extremely low-data regimes. ND-MLS aims to bridge this gap by providing a mechanism to "hallucinate" realistic, deformed variations of training samples, thereby satisfying the data requirements of complex models without an exhaustive manual labeling process.

Methodology: The ND-MLS Algorithm

The core of the proposed method is the ND-MLS algorithm, which builds upon the concept of Moving Least Squares (MLS) for image deformation. The process involves three primary steps:

  1. Control Point Selection ($p$): For classification tasks, a 3x3 grid of nine "handle" points is placed over the image. For segmentation, these points are strategically positioned along the object's contour.
  2. Deformation ($q$): These points are displaced to new positions ($q$) governed by several parameters: $k_p$ (position relative to object edges), $k_l$ (deformation intensity), $k_s$ (number of generated steps), and $\phi$ (the angle of movement).
  3. Rigid Transformation: The algorithm computes a smooth deformation field that minimizes local scaling and shear. This ensures that the generated images appear as realistic physical deformations—such as a handwritten digit being slightly stretched—rather than arbitrary distortions.
Figure 1: (a) 3x3 control point grid for classification. (b) Parameterization of control point movement using length L and angle φ.

The efficiency of ND-MLS allows for the generation of over 2,000 augmented images from a single original sample in a very short timeframe.

Experimental Evaluation

The effectiveness of ND-MLS was evaluated across multiple benchmarks:

  • Classification: MNIST (digits) and Omniglot (100 character categories).
  • Segmentation & Detection: Bombay Cat (Oxford-IIIT Pet), Horse (public dataset), and custom Bottle and Grass datasets.
  • Testing: Models were trained on augmented data but tested on original, non-augmented sets to verify real-world generalization.

Key Insights

Texture vs. Shape Bias

A significant finding is that Convolutional Neural Networks (CNNs) often exhibit a bias toward local textures rather than global shapes. ND-MLS exploits this by providing geometric variety while maintaining consistent local textures. Even when deformations appear extreme to human eyes, they provide a robust training signal that helps the model become invariant to shape variations.

Contour-Based Augmentation for Segmentation

For tasks requiring precise boundaries, such as semantic segmentation, the authors found that a generic grid was less effective than placing control points directly on the object's contour. This approach teaches the model to handle complex boundary deformations more effectively.

Figure 2: Evolution of control point placement from a bounding box (a) to object contours (b), resulting in realistic boundary deformations (c).

Stability in Few-Shot Scenarios

Unlike many few-shot learning methods that degrade as the number of categories increases, ND-MLS maintained a stable 96.5% accuracy on the Omniglot dataset across 100 different character tasks.

Results

The results indicate that ND-MLS significantly enhances model performance in low-data scenarios:

  • Classification: VGGNet achieved 92% accuracy on MNIST with only 10 images per class. ResNet reached 96.5% on Omniglot.
  • Object Detection: YOLO v4 achieved 100% AP75 on bottle detection and 97.2% on horse detection using only 10 original images.
  • Semantic Segmentation: DeepLab obtained 93.5% mIOU on the bottle dataset and 85% on horses with the same minimal starting data.

Limitations and Future Work

While ND-MLS shows great promise for single-object tasks, its application to complex scenes with multiple overlapping objects requires further investigation. Additionally, while the method helps train task-specific models, scaling this approach to train massive, generalized foundation models remains a challenge. Future work will explore the limits of distortion and the integration of ND-MLS into broader multi-target detection frameworks.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
MNIST · datasetND-MLS augmentation + VGGNettop-1 test error0.08split: test · original-images-per-class=10
Source quote
L463: 0.08
Omniglot · datasetND-MLS augmentation + ResNettop-1 error0.035split: test · classes=100 · original-images-per-class=10
Source quote
L507: 0.035
BottleND-MLS augmentation + DeepLabm_Iou(10)0.935split: test · original-images=10
Source quote
L579: 0.935
bombay cat test setND-MLS augmentation + SegNetm_Iou(10)0.867split: test · original-images=10
Source quote
L609: 0.867
BottleND-MLS augmentation + YOLOv4AP75(10)1.000split: test · original-images=10
Source quote
L687: 1.000 a b c d e f g
CATND-MLS augmentation + YOLOv3AP75(10)0.936split: test · original-images=10
Source quote
L712: 0.936
BibTeX
@misc{yang2022novel,
  author = {Wen Yang and Rui Wang and Yanchao Zhang},
  title = {{A novel method for data augmentation: Nine Dot Moving Least Square (ND-MLS)}},
  year = {2022},
  eprint = {2208.11532},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.11532},
}
Figure