cs.CVSep 5, 2026

Hierarchical Prompt Injector for Domain Generalization Segmentation

Authors: Xin Kun Lin, Ruoyu Guo, Jiaqi Guo, Maurice Pagnucco, Yang Song

Organizations: School of Computer Science and Engineering, University of New South Wales, Sydney, Australia

Abstract

Domain Generalized Semantic Segmentation (DGSS) is a challenging task, as vision models often rely on low-level appearance cues that change across domains. In contrast, structural attributes exhibit cross-domain stability, motivating the use of structural priors for DGSS. Existing methods use prompt learning to transfer such priors into DGSS models, but typically encode each class as a single holistic prompt. Moreover, these methods apply prompts uniformly to all pixels, offering no mechanism to adapt when only a subset of object regions is visible due to viewpoint changes, occlusion, and environmental variation. We address this with Spatial Hierarchical Prompts (SHP) that enrich each class with region-level geometric anchors capturing structural appearance from distinct viewing angles, ensuring complementary coverage under arbitrary viewpoints. Additionally, we propose the Hierarchical Prompt Injector (HPI), which enables spatially adaptive prompt injection in foundation models. HPI spatially grounds prompts by modeling their semantic relevance and spatial influence with visual features. Considering the difficulty of learning spatially and semantically aware prompt injection, we further introduce auxiliary supervision to align hierarchical prompts with their corresponding object regions. We achieve 70.62% and 72.74% mIoU on synthetic-to-real and real-to-real benchmarks, respectively. Code and checkpoints are released at https://github.com/MosukFate/HPI

Figures & tables

Explore similar work

CardsList
  1. From Adaptation to Generalization: Adaptive Visual Prompting for Medical Image Segmentation

    Apr 19, 2026Evren Çetinkaya, Sangmin Lee, Jung Uk Kim +2Domain GeneralizationMedical Image Segmentation

  2. Prompting Diffusion Models for Zero-Shot Instance Segmentation

    Jun 21, 2026Irem Zeynep Alagöz, Nils Morbitzer, Andrea Ramazzina +3Interactive Image SegmentationInstance Segmentation

  3. SegRAG: Retrieval Augmented Spatial Prompting for Open Vocabulary Semantic Segmentation

    May 17, 2026Abderrahmene Boudiaf, Irfan Hussain, Sajid JavedImage SegmentationPromptable Image Segmentation