Cross-domain Detection via Graph-induced Prototype Alignment

Minghao Xu, Hang Wang, Bingbing Ni, Qi Tian, Wenjun Zhang

TL;DR

This paper tackles the challenge of applying object detectors trained on one dataset (source domain) to a different dataset (target domain) where performance often degrades due to domain shift. They introduce a novel "Graph-induced Prototype Alignment" (GPA) framework that leverages graph-based feature aggregation and category-level prototype alignment to bridge this gap, achieving state-of-the-art results on several cross-domain detection tasks.

What Problem Does This Paper Address?

Training deep learning models for computer vision tasks like object detection typically requires large amounts of labeled data. However, collecting and annotating such datasets is expensive and time-consuming. Consequently, models trained on one domain (e.g., clear weather, specific camera) often perform poorly when deployed in a different domain (e.g., foggy weather, different camera) due to domain shift. This paper focuses on Unsupervised Domain Adaptation (UDA) for object detection, specifically addressing the challenges of:

  • Instance-level misalignment: Region proposals, which are the basis for object detection, can be inaccurate and may not fully capture an object's features, especially in the target domain where labels are absent.
  • Multi-modal instance variations: Objects within the same category can exhibit diverse appearances (scale, orientation) across domains, making direct feature alignment difficult.
  • Class imbalance: In multi-class detection, the disparity in sample counts between classes can hinder effective domain adaptation for under-represented categories.

Methods

The core of the proposed solution is the Graph-induced Prototype Alignment (GPA) framework, integrated into a Faster R-CNN architecture. Here's a breakdown of the key components:

  • Graph-based Region Aggregation: Instead of relying solely on individual region proposals, GPA constructs a graph where proposals are nodes. An adjacency matrix is computed based on the spatial proximity and, crucially, the Intersection over Union (IoU) of proposals. This IoU-based approach is highlighted as an improvement over simple Euclidean distance, as it better accounts for proposal size and overlap. Information is then propagated through this graph to obtain more robust and precise instance-level feature representations.
  • Confidence-guided Merging for Prototype Representation: To capture the multi-modal nature of categories, GPA derives category-level prototypes. These prototypes are essentially weighted averages of instance-level features, where the weights are determined by the confidence of each proposal belonging to a specific class. This allows for a more comprehensive representation of each category by integrating information from multiple instances.
  • Category-level Domain Alignment: The alignment process then focuses on these prototypes. The goal is to minimize the distance between source and target prototypes of the same class (intra-class compactness) while maximizing the distance between prototypes of different classes (inter-class separability).
  • Class-imbalance-aware Adaptation Training: To address class imbalance, a Class-reweighted Contrastive Loss is introduced. This loss function assigns higher weights to sample-scarce categories, ensuring they receive adequate attention during the domain adaptation training process. The weights are derived from the maximum confidence of a class across proposals.
  • Two-stage Domain Alignment: The framework leverages the two-stage nature of Faster R-CNN. The first stage performs class-agnostic alignment on foreground and background features, while the second stage refines this alignment on a per-category basis. This progressive approach is found to be more effective.

Datasets

The paper evaluates its approach on several standard cross-domain detection benchmarks:

  • Normal to Foggy: Cityscapes (source) $\rightarrow$ Foggy Cityscapes (target)
  • Synthetic to Real: SIM 10k (source) $\rightarrow$ Cityscapes (target)
  • Cross Camera Adaptation: KITTI (source) $\rightarrow$ Cityscapes (target)

No new datasets were introduced.

Key Insights and Ideas

  • IoU-based graph construction is crucial: Simply using spatial distance for graph edges is insufficient. Incorporating IoU for adjacency matrix calculation significantly improves performance by better capturing proposal relevance.
  • Prototype alignment is more effective than instance-level alignment alone: By aggregating instance features into category prototypes, the method can better handle the multi-modal nature of objects and achieve more robust domain invariance.
  • Parameter-free graph convolution is preferred for domain adaptation: Surprisingly, using a standard graph convolution with learnable parameters led to performance degradation. The authors hypothesize this is due to the lack of explicit supervision for the domain adaptation branch, making it hard to learn optimal transformations.
  • Two-stage alignment offers a significant boost: A progressive alignment strategy, moving from coarse-grained to fine-grained, proves more effective than single-stage alignment.
  • Class-imbalance is a critical issue in cross-domain detection: The proposed class-reweighted loss effectively addresses this, leading to better performance on under-represented categories.

Key Results

The proposed GPA framework, particularly the two-stage alignment configuration, achieves state-of-the-art performance across the evaluated cross-domain detection tasks.

  • Normal to Foggy: Achieved a 3.6% increase in mAP compared to previous methods.
  • Synthetic to Real: The two-stage alignment configuration obtained the highest AP (47.6%) for the "car" category.
  • Cross Camera Adaptation: The approach consistently outperformed others, with the two-stage alignment showing a 4.3% performance gain.
  • Qualitative results: Visualizations show that GPA effectively suppresses false positives and accurately localizes objects, even under severe occlusion or in challenging conditions like fog, outperforming baseline methods like Source-only and DA [5].

Limitations and Future Work

  • Limitations: The paper notes that while the two-stage alignment is effective, its performance is sensitive to the trade-off parameters ($\lambda_1, \lambda_2$) between detection and domain adaptation losses, although a wide range of these parameters yields satisfactory results. The sensitivity analysis also shows that the class-balancing parameter ($\gamma$) has an optimal range for best performance.
  • Future Work: The paper implicitly suggests that further exploration of graph-based methods for domain adaptation in object detection could be fruitful. The success of prototype alignment also opens avenues for research into more sophisticated prototype learning and alignment strategies. The authors' findings on the parameter-free graph convolution also hint at potential research directions for unsupervised graph learning in domain adaptation.

Summary updated

BibTeX
@inproceedings{xu2020cross,
  author = {Minghao Xu and Hang Wang and Bingbing Ni and Qi Tian and Wenjun Zhang},
  title = {{Cross-domain Detection via Graph-induced Prototype Alignment}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01237},
}
Figure