Abstract
Deep learning models often suffer from performance degradation in unseen domains, posing a risk for safety-critical applications such as autonomous driving. To tackle this problem, recent studies have leveraged pre-trained Visual Foundation Models (VFMs) to enhance generalization. However, existing works mainly focus on designing intricate networks for VFMs, neglecting their inherent strong generalization potential. Moreover, these methods typically perform inference on low-resolution images. The loss of detail hinders accurate predictions in unseen domains, especially for small objects. In this paper, we argue that simply fine-tuning VFMs and leveraging high-resolution images unleash the power of VFMs for generalizable semantic segmentation. Therefore, we design a VFM-based segmentation network (VFMNet) that adapts VFMs to this task with minimal fine-tuning, preserving their generalizable knowledge. Then, to fully utilize high-resolution images, we train a Mask-guided Refinement Network (MGRNet) to refine VFMNet's predictions combining detailed image features. Furthermore, we adopt a two-stage coarse-to-fine inference approach. MGRNet is used to refine the low-confidence regions predicted by VFMNet to obtain fine-grained results. Extensive experiments demonstrate the effectiveness of our method, outperforming state-of-the-art methods by 3.3% on the average mIoU in synthetic-to-real domain generalization.
Introduction
Deep learning models for semantic segmentation often suffer from severe performance drops when deployed in unseen environments—a challenge known as Domain Generalized Semantic Segmentation (DGSS). For instance, a model trained on synthetic driving data (like GTAV) frequently fails when faced with real-world road conditions.
Recently, researchers have turned to Visual Foundation Models (VFMs) like DINOv2, CLIP, and SAM, which possess strong, generalized visual representations learned from massive datasets. However, adapting VFMs for DGSS introduces two major hurdles:
- Catastrophic Forgetting via Complex Decoders: Slapping a complex segmentation decoder onto a VFM often causes the model to overfit to the training domain, destroying the VFM's inherent generalization capabilities.
- The High-Resolution Bottleneck: VFMs struggle with high-resolution images due to token length extrapolation issues. Downsampling leads to the loss of critical fine-grained details (like small pedestrians in the distance), while high-resolution sliding windows often lose global context.
Methodology
To solve this, the authors introduce a framework that splits the workload between global context and local detail, using two networks that share a single LoRA-finetuned VFM encoder:
- VFMNet (VFM-based Segmentation Network): Trained on low-resolution images using a deliberately simple deconvolution-based decoder. Its job is to capture the global layout and context of the scene without overfitting.
- MGRNet (Mask-Guided Refinement Network): Trained on high-resolution image crops. To ensure it doesn't lose the global context, MGRNet takes the coarse prediction mask from VFMNet as a "class prior." It fuses this coarse mask with high-resolution image features using a novel feature-to-semantics attention mechanism.
- Feature Masking: During training, the authors randomly mask out high-resolution feature tokens. This forces MGRNet to pay attention to the low-res coarse mask rather than over-relying on local high-res textures.
- Coarse-to-Fine Inference: During inference, VFMNet first generates a low-res coarse mask. Then, the system identifies patches with low confidence (e.g., tricky boundaries or small objects). MGRNet uses a high-res sliding window to refine only these uncertain patches, merging them back into a highly detailed final prediction.
Experimental Results
The authors evaluated their method on standard autonomous driving benchmarks, using GTAV as the synthetic source domain and Cityscapes, BDD100K, and Mapillary as target domains.
Key Performance Metrics
Using a DINOv2-L backbone, the method achieved 70.10% average mIoU on the synthetic-to-real task, outperforming the previous state-of-the-art (Rein) by 3.4%. On the Cityscapes $\rightarrow$ BDD + Map setting, the method outperformed existing approaches by 1.1% average mIoU.
Insights and Robustness
- Simple Decoders Preserve Knowledge: The authors found that a simple linear or deconvolutional head actually outperforms complex decoders like Mask2Former in domain generalization. Complex decoders have too much capacity and tend to overfit to the source data's specific distribution.
- Resolution Robustness: Unlike baseline models whose performance degrades when tested on higher resolutions than they were trained on, this method's performance actually improved as inference resolution increased (up to a 4.7% boost).
- Backbone Comparisons: DINOv2 and EVA02 proved to be the most effective VFMs for this architecture. CLIP performed poorly, likely due to its focus on high-level semantics over pixel-level details, and SAM struggled by over-indexing on low-level boundaries without semantic understanding.
Conclusion
This paper demonstrates that unleashing the power of Visual Foundation Models for DGSS requires a balance between preserving pre-trained knowledge and capturing high-resolution details. By employing a dual-network approach and a selective coarse-to-fine inference strategy, the proposed method achieves state-of-the-art performance while maintaining computational efficiency. Future work will explore applying this refinement framework to non-foundation models and optimizing inference speed for real-time applications.
Summary updated