Abstract
Single-domain generalization aims to learn a model from single source domain data to achieve generalized performance on other unseen target domains. Existing works primarily focus on improving the generalization ability of static networks. However, static networks are unable to dynamically adapt to the diverse variations in different image scenes, leading to limited generalization capability. Different scenes exhibit varying levels of complexity, and the complexity of images further varies significantly in cross-domain scenarios. In this paper, we propose a dynamic object-centric perception network based on prompt learning, aiming to adapt to the variations in image complexity. Specifically, we propose an object-centric gating module based on prompt learning to focus attention on the object-centric features guided by the various scene prompts. Then, with the object-centric gating masks, the dynamic selective module dynamically selects highly correlated feature regions in both spatial and channel dimensions enabling the model to adaptively perceive object-centric relevant features, thereby enhancing the generalization capability. Extensive experiments were conducted on single-domain generalization tasks in image classification and object detection. The experimental results demonstrate that our approach outperforms state-of-the-art methods, which validates the effectiveness and generally of our proposed method.
Introduction
Deep learning models are notoriously brittle when they encounter data from a "domain" they haven't seen before—a phenomenon known as domain shift. For example, a model trained to detect cars in sunny weather might fail significantly in a rainy night scene. Single-Domain Generalization (SDG) is the challenging task of training a model on just one source domain so that it performs well on many unseen target domains.
Most existing methods use static networks that try to learn domain-invariant features. However, static networks are often too rigid to adapt to the varying complexity of different scenes. This research proposes that instead of a fixed architecture, a network should change its own internal focus based on the context of the image. By leveraging textual prompts as contextual anchors, the model can bridge the gap between visual styles (e.g., a photo vs. a sketch) using stable linguistic concepts.
Methodology
The proposed framework introduces a dynamic perception network that uses text prompts to guide a model’s attention toward object-centric features. The architecture consists of three primary components designed to enable adaptive feature selection.
1. Prompt-based Object-Centric Gating Module
The system takes textual prompts (e.g., "a sunny day photo") and encodes them using a pre-trained CLIP text encoder. These prompts act as a guide, providing semantic context to the network about the scene it is processing.
2. Slot-Attention Multimodal Fusion
This module fuses visual features with text embeddings using a Slot Attention mechanism. By grouping features into "slots" that represent individual objects or concepts, the model learns to ignore background noise and prioritize essential objects. This object-centricity is robust because global scene statistics often contain domain-specific noise (like canvas texture or lighting tints) that does not generalize well.
3. Dynamic Selective Module
Based on the gating module's output, the network generates spatial and channel masks. These masks dynamically "turn off" irrelevant parts of the neural network and "turn on" features most likely to contain important object information for a specific scene. To ensure the model selects a meaningful amount of information, a Bound Loss function is employed to constrain mask sparsity.
Experimental Results
The researchers evaluated their method on two major benchmarks: PACS (Art painting, Cartoon, Photo, Sketch) and the Diverse-Weather Dataset (Daytime Clear, Night Clear, Dusk Rainy, Night Rainy, Daytime Foggy).
- Image Classification (PACS): The model achieved an average accuracy of 71.12% in the single-domain task, outperforming the previous state-of-the-art (Meta-Casual) by 1.2%. Significant gains were observed in the "Cartoon" domain (+2.5%).
- Object Detection: In the challenging "Night Rainy" scenario, the model achieved 19.2% mAP, a substantial improvement over the Faster R-CNN baseline (12.4%) and specialized methods like S-DGOD (16.6%).
- Ablation Studies: Removing the Slot Attention mechanism or the dynamic gating led to significant performance drops, confirming that multimodal fusion and dynamic selection are critical to the model's success.
Conclusion and Future Work
The proposed method demonstrates that dynamic, object-centric reconfiguration is key to handling the high variance found in out-of-distribution data. While the results are state-of-the-art, future work may address the reliance on manual prompt engineering through automated or "soft" prompt learning. Additionally, further analysis of the computational overhead introduced by multimodal fusion and dynamic gating will be essential for real-time applications.
Summary updated