FelixKAI commited on
Commit
d8e3bfb
Β·
verified Β·
1 Parent(s): 50d58ab

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +160 -0
README.md ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <h1 align="center">MF-RSVLM</h1>
2
+ <p align="center">
3
+ <strong>FUSE-RSVLM: Feature Fusion Vision-Language Model for Remote Sensing</strong>
4
+ </p>
5
+
6
+ <p align="center">
7
+ <a href="https://arxiv.org/abs/2512.24022" target="_blank">
8
+ <img src="https://img.shields.io/badge/arXiv-2512.24022-B31B1B.svg" alt="arXiv Badge"/>
9
+ </a>
10
+ <a href="https://huggingface.co/FelixKAI/mfrsvlm-7b_sft" target="_blank">
11
+ <img src="https://img.shields.io/badge/HuggingFace-Model-yellow" alt="Hugging Face Model"/>
12
+ </a>
13
+ <a href="https://huggingface.co/datasets/FelixKAI/RSVLM-SFT" target="_blank">
14
+ <img src="https://img.shields.io/badge/HuggingFace-Dataset-yellow" alt="Hugging Face Dataset"/>
15
+ </a>
16
+ <img src="https://komarev.com/ghpvc/?username=Yunkaidang&color=blue" alt="GitHub Views"/>
17
+ </p>
18
+
19
+ <p align="center">
20
+ <a href="https://github.com/Yunkaidang/RSVLM">Project Page</a> |
21
+ <a href="https://arxiv.org/abs/2512.24022">Paper</a> |
22
+ <a href="https://huggingface.co/FelixKAI/mfrsvlm-7b_sft">Model</a> |
23
+ <a href="https://huggingface.co/datasets/FelixKAI/RSVLM-SFT">Dataset</a>
24
+ </p>
25
+
26
+ > If this project helps you, please give us a star on GitHub.
27
+
28
+ ## Overview
29
+ MF-RSVLM is a remote sensing vision-language model (VLM). It combines a CLIP vision encoder, a two-layer MLP projector, and a Vicuna-7B LLM, and is trained in two stages for modality alignment and instruction following.
30
+
31
+ - Visual Encoder: CLIP ViT-L/14 336px
32
+ - Projector: 2-layer MLP
33
+ - LLM: Vicuna-7B v1.5
34
+ - Training: Pretrain (VersaD 1.4M image-text pairs) + SFT (instruction tuning)
35
+
36
+ ## Contents
37
+ - [Install](#install)
38
+ - [Repository Layout](#repository-layout)
39
+ - [Downloads](#downloads)
40
+ - [Training](#training)
41
+ - [Inference Demos](#inference-demos)
42
+ - [Evaluation](#evaluation)
43
+ - [Citation](#citation)
44
+
45
+
46
+ ## Install
47
+ ```bash
48
+ git clone git@github.com:opendatalab/MF-RSVLM.git
49
+ cd MF-RSVLM
50
+ conda create -n mf-rsvlm
51
+ conda activate mf-rsvlm
52
+ pip install -r requirements.txt
53
+ ```
54
+
55
+ ## Repository Layout
56
+ ```
57
+ MF-RSVLM/
58
+ β”œβ”€β”€ mfrsvlm/ # package code
59
+ β”‚ β”œβ”€β”€ model/ # deepstack, builder, consolidate
60
+ β”‚ β”œβ”€β”€ train/ # train_mem.py, train.py, trainer
61
+ β”‚ β”œβ”€β”€ conversation.py
62
+ β”‚ β”œβ”€β”€ constants.py
63
+ β”‚ β”œβ”€β”€ mm_utils.py
64
+ β”‚ └── utils.py
65
+ β”œβ”€β”€ scripts/ # inference/eval/data-prep helpers + ZeRO configs
66
+ β”‚ └── data/
67
+ β”œβ”€β”€ checkpoints/ # mf-rsvlm-7b_pretrained, mf-rsvlm-7b_sft
68
+ β”œβ”€β”€ models/ # vicuna-7b-v1.5, clip-vit-large-patch14-336, llava-mlp2x
69
+ β”œβ”€β”€ requirements.txt
70
+ └── README.md
71
+ ```
72
+
73
+ ## Downloads
74
+ ### Models
75
+ | Name | Link | Description |
76
+ |---|---|---|
77
+ | MF-RSVLM Pretrain | https://huggingface.co/FelixKAI/mf_rsvlm_7b_pretrained | Pretrain stage |
78
+ | MF-RSVLM SFT | https://huggingface.co/FelixKAI/mfrsvlm-7b_sft | SFT stage|
79
+ | CLIP Pretrain | https://huggingface.co/openai/clip-vit-large-patch14-336 | Pretraining stage vision tower |
80
+ | Vicuna-7B| https://huggingface.co/lmsys/vicuna-7b-v1.5 | Pretraining stage Language tower |
81
+ | LLaVA-1.5 MLP Projector | https://huggingface.co/liuhaotian/llava-v1.5-mlp2x-336px-pretrain-vicuna-7b-v1.5/tree/main | MLP projector weights |
82
+
83
+ ### Datasets
84
+ - Pretrain data: https://huggingface.co/datasets/FitzPC/VHM_VersaD
85
+ - SFT data: https://huggingface.co/datasets/FelixKAI/RSVLM-SFT
86
+
87
+
88
+ ## Training
89
+ MF-RSVLM training has two stages: pretraining for modality alignment, and supervised fine-tuning (SFT) for instruction following.
90
+
91
+ ### Pretrain
92
+ Run the Slurm script below to start pretraining:
93
+ ```bash
94
+ sh scripts/rs/slurm_pretrain.sh
95
+ ```
96
+
97
+ ### Supervised Fine-Tuning
98
+ Run the Slurm script below to start SFT:
99
+ ```bash
100
+ sh scripts/rs/slurm_finetune.sh
101
+ ```
102
+
103
+ ## Inference Demos
104
+ ### Single-Sample Inference (CLI)
105
+ Use the lightweight helper to test a single image-question pair. This script loads the model once and prints the response directly in the terminal.
106
+
107
+ ```bash
108
+ CUDA_VISIBLE_DEVICES=0 python scripts/run_mfrsvlm_inference.py \
109
+ --model-path checkpoints/mfrsvlm-7b_sft \
110
+ --image-path /path/to/image.png \
111
+ --prompt "What is shown in the image?"
112
+ ```
113
+
114
+
115
+ ### Web Demo (Full-Model UI)
116
+ Start a simple Flask web interface for interactive evaluation. The server loads the checkpoint once, then serves a browser UI for repeated queries.
117
+
118
+ ```bash
119
+ CUDA_VISIBLE_DEVICES=0 python scripts/run_mf-rsvlm_web_server.py \
120
+ --model-path checkpoints/mfrsvlm-7b_sft \
121
+ --host 0.0.0.0 \
122
+ --port 7860
123
+ ```
124
+
125
+ Open `http://localhost:7860` in your browser, upload an image, and enter a question to get the model response.
126
+
127
+ **Web UI Result**
128
+ ![Web UI Result](asserts/result.png)
129
+
130
+ ## Evaluation
131
+ We provide a dedicated evaluation toolkit: [RSEvalKit](https://github.com/fitzpchao/RSEvalKit).
132
+
133
+ ```bash
134
+ git clone https://github.com/fitzpchao/RSEvalKit
135
+ cd RSEvalKit
136
+ conda create -n rseval
137
+ conda activate rseval
138
+ pip install -r requirements.txt
139
+ ```
140
+
141
+ Download the [model weights and datasets](#downloads), then follow the RSEvalKit README for one-click evaluation.
142
+
143
+
144
+ ## Citation
145
+ ```bibtex
146
+ @article{dang2025fuse,
147
+ title={FUSE-RSVLM: Feature Fusion Vision-Language Model for Remote Sensing},
148
+ author={Dang, Yunkai and Wang, Donghao and Yang, Jiacheng and Jiang, Yifan and Zhu, Meiyi and Yang, Yuekun and Wang, Cong and Fan, Qi and Li, Wenbin and Gao, Yang},
149
+ journal={arXiv preprint arXiv:2512.24022},
150
+ year={2025}
151
+ }
152
+ ```
153
+
154
+ ## Acknowledgement
155
+ We gratefully acknowledge these wonderful works:
156
+ - [Vicuna](https://github.com/lm-sys/FastChat#vicuna-weights)
157
+ - [LLaVA](https://github.com/haotian-liu/LLaVA)
158
+ - [ShareGPT4V](https://github.com/InternLM/InternLM-XComposer/tree/main/projects/ShareGPT4V)
159
+ - [LLaMA](https://github.com/facebookresearch/llama)
160
+ - [VHM](https://github.com/opendatalab/VHM)