Abstract
Recent object detection models require large amounts of annotated data for training a new classes of objects. Few-shot object detection (FSOD) aims to address this problem by learning novel classes given only a few samples. While competitive results have been achieved using two-stage FSOD detectors, typically one-stage FSODs underperform compared to them. We make the observation that the large gap in performance between two-stage and one-stage FSODs are mainly due to their weak discriminability, which is explained by a small post-fusion receptive field and a small number of foreground samples in the loss function. To address these limitations, we propose the Few-shot RetinaNet (FSRN) that consists of: a multi-way support training strategy to augment the number of foreground samples for dense meta-detectors, an early multi-level feature fusion providing a wide receptive field that covers the whole anchor area and two augmentation techniques on query and source images to enhance transferability. Extensive experiments show that the proposed approach addresses the limitations and boosts both discriminability and transferability. FSRN is almost two times faster than two-stage FSODs while remaining competitive in accuracy, and it outperforms the state-of-the-art of one-stage meta-detectors and also some two-stage FSODs on the MS-COCO and PASCAL VOC benchmarks.
Introduction
Few-Shot Object Detection (FSOD) is the challenge of teaching a model to detect new objects using only a handful of examples (e.g., 1 to 30 images). While two-stage detectors (like Faster R-CNN) have dominated this field, they are computationally heavy and slow. One-stage detectors (like YOLO or RetinaNet) are faster and more "embedded-friendly," but they historically perform much worse in few-shot scenarios.
The authors identify two primary causes for this performance gap:
- Weak Discriminability: One-stage models often have a tiny "post-fusion" receptive field. After the model combines information from the "query" (the image being searched) and the "support" (the few-shot examples), the remaining layers cannot "see" enough of the image to distinguish objects effectively.
- Weak Learning Signal: Standard training strategies for these models often look at only one class at a time, leading to a scarcity of foreground samples and a "vanishing gradient" problem during training.
Methodology: Few-shot RetinaNet (FSRN)
To address these limitations, the authors propose Few-shot RetinaNet (FSRN), which introduces several key innovations.
Early Multi-Scale Feature Fusion (MSF)
The most striking insight is that one-stage FSOD models were essentially "blind" to the context of the objects they were trying to detect because the fusion happened too late in the pipeline. Instead of fusing query and support features at the very end of the network, FSRN fuses them early, right after the Feature Pyramid Network (FPN). This gives the subsequent detection "heads" a much wider receptive field (11x11 vs. the typical 3x3), allowing the model to cover the entire area of an object anchor.
Multi-Way Support Training Strategy (MWST)
Rather than training on one class per episode, MWST allows the model to see multiple positive and negative classes simultaneously. This significantly increases the number of foreground samples in the loss function, providing a more robust learning signal. Their MWST strategy uses a "random class dropout" on annotations, which effectively simulates the randomness of few-shot tasks during the heavy training phase, making the model more resilient.
Transferability Boosters
FSRN incorporates two additional techniques to improve generalization to novel classes:
- Gaussian Prototyping (GP): This models class features as a distribution rather than a single average point.
- Multi-Scale Data Augmentation (MSDA): This enhances the diversity of the training data.
Experimental Results
The model was evaluated on two industry-standard benchmarks: MS-COCO (60 base classes, 20 novel) and PASCAL VOC (across three different splits).
Performance and Efficiency
- Speed: FSRN is nearly 2x faster than the two-stage FSOD-RPN (0.49s vs 0.92s per image on a GTX 1080).
- Accuracy: On MS-COCO (10-shot), FSRN achieved a novel Average Precision (nAP) of 15.8, significantly outperforming other one-stage meta-detectors like MetaYOLO (5.6) and even beating some established two-stage models.
- Efficiency: FSRN uses fewer parameters (36.4M vs 55.2M) and fewer GFLOPS (100.4 vs 178.8) than the two-stage baseline, making it better suited for edge computing.
Conclusion
FSRN bridges the performance gap between fast one-stage and accurate two-stage few-shot object detectors. By optimizing the receptive field and enriching the training signal, it achieves state-of-the-art results for dense detectors while remaining twice as fast as its two-stage counterparts.
While effective, the MWST strategy increases training time due to processing more support images per iteration. Future work could focus on improving training stability and reducing the memory footprint of data augmentation during meta-testing for extremely low-power devices.
Summary updated