Customize Segment Anything Model for Multi-Modal Semantic Segmentation with Mixture of LoRA Experts

Chenyang Zhu, Bin Xiao, Lin Shi, Shoukun Xu, Xu Zheng · DOI

Abstract

The recent Segment Anything Model (SAM) represents a significant breakthrough in scaling segmentation models, delivering strong performance across various downstream applications in the RGB modality. However, directly applying SAM to emerging visual modalities, such as depth and event data results in suboptimal performance in multi-modal segmentation tasks. In this paper, we make the first attempt to adapt SAM for multi-modal semantic segmentation by proposing a Mixture of Low-Rank Adaptation Experts (MoE-LoRA) tailored for different input visual modalities. By training only the MoE-LoRA layers while keeping SAM's weights frozen, SAM's strong generalization and segmentation capabilities can be preserved for downstream tasks. Specifically, to address cross-modal inconsistencies, we propose a novel MoE routing strategy that adaptively generates weighted features across modalities, enhancing multi-modal feature integration. Additionally, we incorporate multi-scale feature extraction and fusion by adapting SAM's segmentation head and introducing an auxiliary segmentation head to combine multi-scale features for improved segmentation performance effectively. Extensive experiments were conducted on three multi-modal benchmarks: DELIVER, MUSES, and MCubeS. The results consistently demonstrate that the proposed method significantly outperforms state-of-the-art approaches across diverse scenarios. Notably, under the particularly challenging condition of missing modalities, our approach exhibits a substantial performance gain, achieving an improvement of 32.15% compared to existing methods.

Introduction

The Segment Anything Model (SAM) and its successor, SAM2, have set new benchmarks for image segmentation, demonstrating remarkable zero-shot generalization. However, these models are primarily optimized for RGB data. In fields like autonomous driving and robotics, sensors such as Depth, LiDAR, and Event cameras are essential for navigating adverse conditions like night, fog, or high-speed motion.

Directly applying SAM to these non-RGB modalities often leads to poor performance due to domain gaps and the difficulty of fusing disparate data types. A major hurdle is "cross-modal inconsistency," where one sensor might be compromised (e.g., a camera blinded by glare) while another remains reliable. MLE-SAM addresses this by introducing a framework that intelligently adapts SAM for robust, multi-modal semantic segmentation.

Methodology: The MLE-SAM Framework

The MLE-SAM architecture enhances the SAM2 foundation model through three primary innovations designed for multi-modal flexibility:

1. Mixture of LoRA Experts (MLE)

To adapt the massive SAM2 model without the prohibitive cost of full retraining, the researchers utilize Low-Rank Adaptation (LoRA). They introduce a Mixture of Experts (MoE) approach, where specific LoRA layers are dedicated to different input modalities (RGB, Depth, LiDAR, Event). By freezing the core SAM2 weights and training only these lightweight experts, the model preserves its foundational visual logic while learning to interpret specialized sensor data.

2. Dynamic Cross-Modal Routing

Recognizing that sensor reliability varies by environment, MLE-SAM employs a dynamic routing strategy. This router analyzes incoming data in real-time to assign weights to each modality's features. If a specific sensor provides noisy or degraded data, the router automatically down-weights its contribution, prioritizing more reliable modalities to maintain segmentation accuracy.

3. Dual-Pathway Segmentation Head

To capture both fine-grained textures and broad semantic context, the framework utilizes a dual-pathway approach. It adapts the SAM2 mask decoder and introduces an auxiliary segmentation head. This combination allows the model to fuse multi-scale features from different stages of the backbone, significantly improving the detection of small or distant objects.

Overview of the MLE-SAM framework (a), performance trends across modality combinations (b, c), and robustness radar charts (d, e).

Experimental Setup and Datasets

The model was rigorously tested on three diverse multi-modal benchmarks:

  • DELIVER: A synthetic dataset with four modalities and simulated sensor failures like motion blur and LiDAR jitter.
  • MUSES: A real-world driving dataset focused on adverse conditions such as night, rain, and fog.
  • MCubeS: A dataset for material segmentation using RGB, Near-Infrared, and Polarization data.

Results and Discussion

MLE-SAM consistently outperformed state-of-the-art methods across all benchmarks. On the MUSES dataset, it achieved a 73.95% mIoU, a substantial lead over previous methods like CMNeXt.

Resilience to Sensor Failure and Noise

The most striking result is the model's performance in "missing modality" scenarios. When one or more sensors were unavailable during testing, MLE-SAM showed a 32.15% improvement over existing methods. The dynamic router enables the model to degrade gracefully, shifting its attention to the remaining functional sensors. Furthermore, the model proved highly resilient to heavy Gaussian noise, where competing models often saw their performance collapse.

Quantitative mIoU comparison of MLE-SAM against other methods across various modality combinations on the DELIVER dataset.

Conclusion

MLE-SAM represents a significant step forward in adapting large-scale vision foundation models for complex, multi-modal tasks. By leveraging modality-specific LoRA experts and dynamic routing, the framework provides a robust and efficient solution for real-world segmentation challenges. Future research will focus on optimizing the model for sparse data types and exploring more efficient routing mechanisms for real-time edge applications.

Summary updated

BibTeX
@misc{zhu2024customize,
  author = {Chenyang Zhu and Bin Xiao and Lin Shi and Shoukun Xu and Xu Zheng},
  title = {{Customize Segment Anything Model for Multi-Modal Semantic Segmentation with Mixture of LoRA Experts}},
  year = {2024},
  eprint = {2412.04220},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.04220},
}
Figure