Dense Relation Distillation With Context-Aware Aggregation for Few-Shot Object Detection

Hanzhe Hu, Shuai Bai, Aoxue Li, Jinshi Cui, Liwei Wang

Abstract

Conventional deep learning based methods for object detection require a large amount of bounding box annotations for training, which is expensive to obtain such high quality annotated data. Few-shot object detection (FSOD), which learns to adapt to novel classes with only a few annotated examples, is very challenging since the fine-grained features of novel objects can be easily overlooked with only a few data available. In this work, aiming to fully exploit features of annotated novel objects and capture fine-grained features of query objects, we propose Dense Relation Distillation with Context-aware Aggregation (DCNet). Built on a meta-learning based framework, the Dense Relation Distillation module targets fully exploiting support features through dense matching across all spatial locations. Additionally, the Context-aware Aggregation module adaptively harnesses features from different scales for a more comprehensive representation. Extensive experiments illustrate that our proposed approach achieves state-of-the-art results on PASCAL VOC and MS COCO datasets.

Introduction

Standard object detectors are data-hungry, typically requiring thousands of annotated bounding boxes to learn a new category. Few-Shot Object Detection (FSOD) aims to mimic human-like learning by detecting "novel" classes from just a handful of examples, known as support images.

The authors identify two major hurdles in current FSOD methods. First is Information Loss: most meta-learning models use global pooling to compress support images into a single vector, wiping out local details necessary for identifying occluded or uniquely posed objects. Second is Scale Variation: models often fail to recognize objects at different sizes because they lack the data to learn scale-invariance naturally.

Methodology

DCNet introduces two novel modules into a meta-learning framework (building upon Meta R-CNN) to address these challenges:

The architecture of DCNet, featuring the Dense Relation Distillation (DRD) and Context-aware Feature Aggregation (CFA) modules.

Dense Relation Distillation (DRD)

Instead of summarizing a support image into a single vector, DRD performs pixel-wise matching between support and query features. Using a "Key-Value" embedding mechanism similar to Transformers, the "Keys" find similarities across images while the "Values" transfer relevant appearance information. This preserves local context, helping the model "see" parts of an object even if the rest is hidden.

Context-aware Feature Aggregation (CFA)

To handle scale, the model utilizes three parallel pooling resolutions (4x4, 8x8, and 12x12). An internal attention mechanism adaptively weights these scales; for instance, prioritizing high-resolution features for small objects and broader context for larger ones.

The training follows a two-phase approach: "Meta-Training" on abundant base classes, followed by "Meta Fine-tuning" on a balanced set of base and novel classes with only k shots available.

Experiments and Results

DCNet was evaluated on industry-standard benchmarks, setting new state-of-the-art (SOTA) records across the board:

  • PASCAL VOC: In the difficult 1-shot scenario, DCNet achieved 33.9 mAP, outperforming the previous SOTA by nearly 10 points.
  • MS COCO: On the 30-shot benchmark, DCNet reached 18.6 AP, a significant lead over Meta R-CNN (12.4 AP).
Qualitative results of DCNet on PASCAL VOC, showing successful detection of novel classes like 'cat' and 'car' using limited support images.

Qualitative visualizations show that the DRD module successfully "activates" the correct regions in a query image even when the support image shows the object from a completely different angle or in a different color. This proves that pixel-level details matter most when data is scarce.

Conclusion

DCNet demonstrates that dense, pixel-level distillation and multi-scale aggregation are key to solving the information loss and scale sensitivity inherent in few-shot detection. While dense matching introduces some computational overhead, the significant performance gains on standard benchmarks suggest that local feature matching is a superior strategy for learning from sparse data. Future work may explore cross-domain FSOD to test the model's robustness against significant domain shifts.

Summary updated

BibTeX
@inproceedings{hu2021dense,
  author = {Hanzhe Hu and Shuai Bai and Aoxue Li and Jinshi Cui and Liwei Wang},
  title = {{Dense Relation Distillation With Context-Aware Aggregation for Few-Shot Object Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=erfTCLJdD5},
}
Figure