RPN Prototype Alignment for Domain Adaptive Object Detector

Yixin Zhang, Zilei Wang, Yushi MaoCVPR 2021

Abstract

Recent years have witnessed great progress in object detection. However, due to the domain shift problem, applying the knowledge of an object detector learned from one specific domain to another often suffers from severe performance degradation. Most existing methods adopt feature alignment either on the backbone network or instance classifier to increase the transferability of object detectors. Different from existing methods, we propose to perform feature alignment of foreground and background in the Region Proposal Network (RPN) stage such that the foreground and background RPN proposals in the target domain can be effectively separated. Specifically, we first construct a set of learnable RPN prototypes and then enforce the RPN features to align with these prototypes for both source and target domains. This paradigm essentially cooperates the learning of RPN prototypes and features to align the source and target RPN features. To facilitate this, we propose a simple yet effective method for pseudo-label generation in the target domain by using filtered detection results to guide RPN proposals via Intersection over Union (IoU). Furthermore, we adopt Grad-CAM to identify discriminative regions within a proposal, increasing the discriminability of RPN features for alignment through spatial weighting. Extensive experiments on multiple cross-domain detection scenarios demonstrate the effectiveness of our proposed method against previous state-of-the-art methods.

Introduction

Object detection has reached impressive milestones, yet its real-world application is often hindered by the "domain shift" problem. A model trained on clear-weather cityscapes (source domain) often fails when deployed in foggy conditions or different geographic locations (target domain). While traditional Unsupervised Domain Adaptation (UDA) methods focus on aligning features in the backbone or the final classifier, they frequently overlook the RPN.

The RPN acts as a critical gatekeeper in two-stage detectors like Faster R-CNN. If the RPN fails to generate high-quality proposals in the target domain, the subsequent classification and regression stages are fundamentally limited. However, aligning RPN features is challenging because proposals are inherently noisy, containing varying amounts of foreground and background information. This paper addresses this bottleneck by introducing RPN Prototype Alignment (RPA).

Proposed Method

Overview of the proposed RPN Prototype Alignment (RPA) framework integrated with Faster R-CNN.

The RPA framework introduces three key innovations to bridge the domain gap at the proposal level:

  1. RPN Prototype Alignment: We introduce learnable prototypes for foreground and background classes. By employing a contrastive alignment loss, the model forces RPN features from both domains to cluster around these shared prototypes. This ensures that the concept of "objectness" remains consistent across different environments.
  2. High-Quality Pseudo-Labeling: Since target domain labels are unavailable, we generate pseudo-labels for RPN proposals. Unlike methods that rely on raw RPN scores, we use the final, high-confidence detection results. We assign labels to RPN proposals based on their IoU with these detected objects, providing a more stable and accurate supervisory signal for alignment.
  3. Discriminability-aware Alignment: Not all regions within a bounding box are equally informative. To prevent background noise from interfering with the alignment process, we utilize Grad-CAM (Gradient-weighted Class Activation Mapping) to generate spatial weights. These weights emphasize the most discriminative parts of a proposal, ensuring the alignment focuses on the actual object rather than the surrounding context.

Experimental Results and Insights

We evaluated our method on several challenging benchmarks, including Normal-to-Foggy (Cityscapes $\rightarrow$ Foggy Cityscapes), Synthetic-to-Real (Sim10k $\rightarrow$ Cityscapes), and Cross-Camera (Cityscapes $\rightarrow$ KITTI) scenarios.

Visualization of feature alignment via t-SNE (a) and discriminative regions via Grad-CAM (b).

Key Findings:

  • Performance Gains: In the Cityscapes to Foggy Cityscapes task, our method achieved a mean Average Precision (mAP) of 39.0%, a substantial improvement over the 20.8% baseline. Similarly, in the Sim10k to Cityscapes task, we reached a Car AP of 45.7%, outperforming previous state-of-the-art methods.
  • Feature Separation: As shown in the t-SNE visualizations, our method (RPA) achieves much cleaner separation between foreground (FG) and background (BG) features across domains compared to the baseline. The features cluster tightly around the learned prototypes.
  • Spatial Precision: The Grad-CAM visualizations demonstrate that our model successfully focuses on the core regions of objects (like pedestrians and vehicles), even in the presence of significant domain-specific noise like fog.

Conclusion

This work highlights the RPN as a critical yet under-addressed component in domain adaptive object detection. By introducing learnable prototypes and spatial weighting via Grad-CAM, we demonstrate that aligning features at the proposal stage significantly enhances the robustness of object detectors. Our RPN Prototype Alignment (RPA) method consistently outperforms existing state-of-the-art approaches across various domain shift scenarios, providing a more reliable foundation for cross-domain computer vision applications.

Summary updated

BibTeX
@inproceedings{zhang2021rpn,
  author = {Yixin Zhang and Zilei Wang and Yushi Mao},
  title = {{RPN Prototype Alignment for Domain Adaptive Object Detector}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=ApGdeam7Gf},
}
Figure