Frustratingly Simple Few-Shot Object Detection

Xin Wang, Thomas E. Huang, Joseph Gonzalez, Trevor Darrell, Fisher Yu

TL;DR

This paper introduces a surprisingly simple yet highly effective "two-stage fine-tuning" (TFA) approach for few-shot object detection, outperforming complex meta-learning methods by a significant margin. By carefully analyzing evaluation protocols and proposing new benchmarks, the authors demonstrate that fine-tuning only the last layers of a pre-trained detector is crucial for adapting to new object classes with very limited data.

What Problem Does This Paper Address?

The core challenge this paper tackles is few-shot object detection: how to train a model to detect objects from new categories when you only have a handful of labeled examples (e.g., 1-10 images per class). This is a critical problem because real-world scenarios often involve rare objects for which large datasets are unavailable. While meta-learning has been the dominant paradigm for few-shot learning, this paper argues that its complexity might be unnecessary, and existing fine-tuning techniques have been overlooked and under-evaluated. The authors also highlight issues with current benchmarks, such as statistical unreliability and a focus solely on novel class performance, which can obscure the true generalization capabilities of a model.

Methods

The paper's main contribution is a Two-Stage Fine-Tuning Approach (TFA). This method involves two distinct stages:

  1. Base Model Training: A standard object detector (Faster R-CNN is used as the base) is fully trained on a large dataset of "base classes" that have abundant data. This stage learns general visual features and object detection capabilities.
  2. Few-Shot Fine-Tuning: Crucially, only the last layers of the detector (specifically, the box predictor for classification and regression) are fine-tuned on a small, balanced dataset containing a few examples of both the base classes and the new "novel classes." The feature extractor (backbone, RPN, etc.) is kept frozen.

To further enhance performance, they incorporate instance-level feature normalization into the box classifier, inspired by prior work in few-shot classification. This helps reduce intra-class variance and improve robustness, especially in low-shot scenarios.

The authors also propose revised evaluation protocols that include evaluating performance on both base and novel classes (generalized few-shot learning) and using multiple random sampling runs to ensure statistical stability and reduce variance. They introduce new benchmarks based on PASCAL VOC, COCO, and LVIS datasets using these improved protocols.

Datasets

The paper uses the following datasets:

  • PASCAL VOC: Used for creating synthetic few-shot splits (15 base classes, 5 novel classes with K=1, 2, 3, 5, 10 shots) and for the generalized few-shot benchmark.
  • COCO: Used for creating synthetic few-shot splits (60 base classes, 20 novel classes with K=10, 30 shots) and for the generalized few-shot benchmark.
  • LVIS: A dataset with a natural long-tail distribution, used for evaluating performance on rare classes. Frequent and common classes are treated as base classes, and rare classes as novel classes.

Key Insights and Ideas

  • Simplicity Trumps Complexity: The most striking insight is that a simple fine-tuning approach, specifically targeting only the final layers of a pre-trained detector, can significantly outperform complex meta-learning methods in few-shot object detection. This suggests that the feature representations learned from abundant base classes are highly transferable.
  • The Power of Fine-Tuning the Last Layer: The paper strongly advocates for fine-tuning only the box predictor. This strategy prevents catastrophic forgetting of valuable base-class knowledge while allowing adaptation to novel classes.
  • Evaluation Matters: The authors demonstrate that existing few-shot object detection benchmarks suffer from high variance and an incomplete view of performance (only novel classes). Their revised protocols, including multiple runs and evaluation on base classes, provide a more reliable and comprehensive assessment.
  • Instance-Level Normalization is Key for Low-Shot: The use of cosine similarity with instance-level feature normalization proves particularly beneficial when only one or two examples per novel class are available.

Key Results

  • State-of-the-Art Performance: The proposed TFA method consistently outperforms existing meta-learning based methods by a significant margin, often achieving 2-20 points higher average precision (AP) on PASCAL VOC and COCO benchmarks. In some one-shot scenarios, it nearly doubles the accuracy of prior methods.
  • Improved Performance on Rare Classes: On the LVIS dataset, TFA improves AP for rare classes by ~1-1.5 points and for common classes by ~2-4 points, while showing negligible performance loss on frequent classes.
  • Robustness to Data Imbalance: TFA effectively handles the data imbalance inherent in datasets like LVIS without requiring specialized sampling schemes.
  • Reliable Benchmarks: The revised evaluation protocols, using multiple runs, show that performance stabilizes after about 30 runs for PASCAL VOC and 8 runs for COCO, providing more trustworthy comparisons.
  • Cosine Similarity Advantage: The cosine similarity classifier with instance-level normalization shows a clear advantage over a standard FC classifier, especially in low-shot settings (1-shot).

Limitations and Future Work

  • Computational Cost of Multiple Runs: While multiple runs improve reliability, they increase computational cost. The paper suggests that around 30 runs for PASCAL VOC and 10 for COCO are sufficient for stable results.
  • Dataset Specificity of Initialization: The paper notes that random initialization for novel classifier weights works well for PASCAL VOC, while novel initialization is better for COCO and LVIS, suggesting that dataset complexity might influence optimal initialization strategies.
  • Future Work: The authors implicitly suggest that further exploration of fine-tuning strategies and more robust evaluation methodologies could lead to even greater advancements in few-shot object detection. The success of TFA also opens avenues for applying similar simple fine-tuning principles to other few-shot learning tasks.

Summary updated

BibTeX
@inproceedings{wang2020frustratingly,
  author = {Xin Wang and Thomas E. Huang and Joseph Gonzalez and Trevor Darrell and Fisher Yu},
  title = {{Frustratingly Simple Few-Shot Object Detection}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure