MCPcopy Index your code
hub / github.com/devinxzhang/MFuser

github.com/devinxzhang/MFuser @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,412 symbols 4,096 edges 220 files 581 documented · 41%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

[CVPR 2025 Highlight] Mamba as a Bridge: Where Vision Foundation Models Meet Vision Language Models for Domain-Generalized Semantic Segmentation

PWC

Mamba as a Bridge: Where Vision Foundation Models Meet Vision Language Models for Domain-Generalized Semantic Segmentation

Xin Zhang\, Robby T. Tan\ National University of Singapore\ CVPR 2025

[Project Page] [Paper]

Environment

Requirements

  • The requirements can be installed with:

bash conda create -n mfuser python=3.9 numpy=1.26.4 conda activate mfuser conda install pytorch==2.0.1 torchvision==0.15.2 pytorch-cuda=11.8 -c pytorch -c nvidia pip install -r requirements.txt pip install xformers==0.0.20 pip install mmcv-full==1.5.1 pip install mamba_ssm==2.2.2 pip install causal_conv1d==1.4.0

Pre-trained VFM & VLM Models

  • Please download the pre-trained VFM and VLM models and save them in ./pretrained folder.
Model Type Link
DINOv2 dinov2_vitl14_pretrain.pth download link
CLIP ViT-L-14-336px.pt download link
EVA02-CLIP EVA02_CLIP_L_336_psz14_s6B.pt download link
SIGLIP siglip_vitl16_384.pth download link

Checkpoints

  • You can download MFuser model checkpoints and save them in ./work_dirs_d folder. By default, all experiments below use DINOv2-L as the VFM.
Model Pretrained Trained on Config Link
mfuser-clip-vit-l-city CLIP Cityscapes config download link
mfuser-clip-vit-l-gta CLIP GTA5 config download link
mfuser-eva02-clip-vit-l-city EVA02-CLIP Cityscapes config download link
mfuser-eva02-clip-vit-l-gta EVA02-CLIP GTA5 config download link
mfuser-siglip-vit-l-city SIGLIP Cityscapes config download link
mfuser-siglip-vit-l-gta SIGLIP GTA5 config download link

Datasets

python src_dataset_dict = dict(..., data_root='[YOUR_DATA_FOLDER_ROOT]', ...) tgt_dataset_dict = dict(..., data_root='[YOUR_DATA_FOLDER_ROOT]', ...)

  • The final folder structure should look like this:
MFuser
├── ...
├── pretrained
│   ├── dinov2_vitl14_pretrain.pth
│   ├── EVA02_CLIP_L_336_psz14_s6B.pt
│   ├── siglip_vitl16_384.pth
│   ├── ViT-L-14-336px.pt
├── data
│   ├── cityscapes
│   │   ├── leftImg8bit
│   │   │   ├── train
│   │   │   ├── val
│   │   ├── gtFine
│   │   │   ├── train
│   │   │   ├── val
│   ├── bdd100k
│   │   ├── images
│   │   |   ├── 10k
│   │   │   |    ├── train
│   │   │   |    ├── val
│   │   ├── labels
│   │   |   ├── sem_seg
│   │   |   |    ├── masks
│   │   │   |    |    ├── train
│   │   │   |    |    ├── val
│   ├── mapillary
│   │   ├── training
│   │   ├── cityscapes_trainIdLabel
│   │   ├── half
│   │   │   ├── val_img
│   │   │   ├── val_label
│   ├── gta
│   │   ├── images
│   │   ├── labels
├── ...

Training

python train.py configs/[TRAIN_CONFIG]

Evaluation

Run the evaluation: python test.py configs/[TEST_CONFIG] work_dirs_d/[MODEL] --eval mIoU

Citation

If you find our code helpful, please cite our paper:

@article{zhang2025mamba,
  title     = {Mamba as a Bridge: Where Vision Foundation Models Meet Vision Language Models for Domain-Generalized Semantic Segmentation},
  author    = {Zhang, Xin and Robby T., Tan},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month     = {June},
  year      = {2025},
}

Acknowledgements

This project is based on the following open-source projects. We thank the authors for sharing their codes. - MMSegmentation - TLDR - tqdm - MambaVision

Core symbols most depended-on inside this repo

to
called by 75
mmseg/core/box/samplers/sampling_result.py
_pcfg
called by 51
models/backbones/eva_clip/pretrained.py
split
called by 43
models/backbones/siglip/tokenization_utils.py
update
called by 38
models/backbones/siglip/tokenization_utils.py
info
called by 29
mmseg/models/utils/assigner.py
resize
called by 27
mmseg/ops/wrappers.py
add_prefix
called by 17
mmseg/core/utils/misc.py
get_model
called by 16
mmseg/models/uda/uda_decorator.py

Shape

Method 907
Class 269
Function 236

Languages

Python100%

Modules by API surface

mmseg/datasets/pipelines/transforms.py63 symbols
models/backbones/siglip/modeling_siglip.py53 symbols
models/backbones/eva_clip/transformer.py52 symbols
models/backbones/siglip/tokenization_utils.py44 symbols
models/backbones/clip/models.py40 symbols
mmseg/models/plugins/transformerlayers.py39 symbols
models/backbones/eva_clip/eva_vit_model.py38 symbols
mmseg/models/utils/transformer.py38 symbols
mmseg/models/backbones/mix_transformer.py38 symbols
mmseg/models/backbones/resnet.py28 symbols
mmseg/datasets/pipelines/formating.py28 symbols
models/backbones/eva_clip/model.py27 symbols

For agents

$ claude mcp add MFuser \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact