yuchenwu73 commited on
Commit
774e461
·
1 Parent(s): 2ec731d

Add model card with full HBB/OBB results and usage

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ base_model: Qwen/Qwen3-VL-4B-Instruct
4
+ pipeline_tag: image-text-to-text
5
+ library_name: transformers
6
+ language:
7
+ - en
8
+ tags:
9
+ - remote-sensing
10
+ - visual-grounding
11
+ - oriented-bounding-box
12
+ - reinforcement-learning
13
+ - qwen3-vl
14
+ ---
15
+
16
+ # GeoBox-R1
17
+
18
+ 统一边界框级遥感视觉定位模型,同时输出水平框(HBB)与旋转框(OBB)。
19
+
20
+ > **GeoBox-R1: Curriculum-Guided SFT and Geometric RL for Unified Box-Level Remote Sensing Visual Grounding**
21
+ > Chenxi Lan\*, Yuchen Wu\*, Minghang Zhou, Tianyu Li, Zhihao Qiu, Guoqing Wang
22
+ > AAAI 2027 投稿中。(\* 共同一作)
23
+ >
24
+ > [项目主页](https://yuchenwu73.github.io/GeoBox-R1/) ·
25
+ > [代码](https://github.com/yuchenwu73/GeoBox-R1) ·
26
+ > [训练数据](https://huggingface.co/datasets/yuchenwu73/GeoBox-R1-Data) ·
27
+ > [Stage-1 SFT 检查点](https://huggingface.co/yuchenwu73/GeoBox-R1-SFT)
28
+
29
+ 本仓库是**最终模型**(Stage-1 SFT + Stage-2 GDPO 后的合并权重)。
30
+ 只需要第一阶段结果请用 [`GeoBox-R1-SFT`](https://huggingface.co/yuchenwu73/GeoBox-R1-SFT)。
31
+
32
+ ## 训练流程
33
+
34
+ 基座 **Qwen3-VL-4B-Instruct**,两阶段:
35
+
36
+ 1. **课程式 SFT** — 训练数据按 HBB → OBB → HBB-to-OBB CoT 由易到难排列。
37
+ LoRA(rank 16,alpha 32),冻结视觉编码器与 merger,lr `1e-4`,1 epoch,2× RTX 4090。
38
+ 2. **几何强化学习(GDPO)** — 在 SFT 检查点上用两个基于规则的几何奖励细化 OBB:
39
+ Rotated IoU 与自适应 Wasserstein 距离(λ 各 0.5)。
40
+ G=8 rollouts,β=0.02,τ_c=8,lr `5e-6`,1 epoch,3× A100 40G(1 个 vLLM rollout 服务 + 2 个 GDPO worker)。
41
+
42
+ ## 结果
43
+
44
+ 7 个 HBB 与 3 个 OBB 评测集,三项指标的宏平均均取得最佳。
45
+
46
+ ### HBB(7 个评测集)
47
+
48
+ | Model | Params | DIOR-Test | DIOR-Val | RSVG-Test | RSVG-Val | GeoChat* | VRSBench* | AVVG | **Avg.** |
49
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
50
+ | Qwen3-VL | 8B | 54.14 | 53.68 | 33.82 | 34.80 | 50.73 | 53.55 | 25.22 | 43.70 |
51
+ | GeoGround | 7B | **77.70** | **77.13** | 26.65 | 27.81 | **69.76** | 65.76 | 21.60 | 52.35 |
52
+ | InternVL3 (SFT) | 8B | 74.83 | 75.06 | 46.05 | 44.05 | 59.23 | 58.05 | 28.41 | 55.10 |
53
+ | GeoBox-R1 (SFT) | 4B | 74.91 | 74.21 | 48.57 | 46.29 | 61.39 | 64.45 | 30.33 | 57.17 |
54
+ | **GeoBox-R1** | **4B** | 76.61 | 75.11 | **51.26** | **48.38** | 61.13 | **66.84** | **32.14** | **58.78** |
55
+
56
+ (Acc@0.5。Acc@0.7 与 mIoU 的宏平均分别为 **42.22** 与 **50.39**,同样最佳。)
57
+
58
+ ### OBB(3 个评测集)
59
+
60
+ | Model | Params | GeoChat* @0.5 / @0.7 / mRIoU | VRSBench* | AVVG | **Avg.** |
61
+ | --- | --- | --- | --- | --- | --- |
62
+ | InternVL3 (SFT) | 8B | 49.79 / 23.10 / 41.66 | 42.01 / 20.65 / 40.68 | 15.43 / 7.40 / 15.39 | 35.74 / 17.05 / 32.58 |
63
+ | GeoGround | 7B | 58.72 / 25.49 / 46.89 | 53.26 / 29.82 / 48.35 | 13.89 / 4.10 / 15.64 | 41.96 / 19.81 / 36.96 |
64
+ | GeoBox-R1 (SFT) | 4B | 55.96 / 30.45 / 45.45 | 51.14 / 27.69 / 45.91 | 22.23 / 15.07 / 19.20 | 43.11 / 24.40 / 36.85 |
65
+ | **GeoBox-R1** | **4B** | **60.56 / 35.19 / 48.92** | **56.61 / 30.55 / 49.43** | **24.79 / 16.89 / 21.18** | **47.32 / 27.55 / 39.85** |
66
+
67
+ 以 4B 参数超过 7B–8B 的现有最优模型:HBB 领先 **3.68/4.89/2.61** 点,OBB 领先 **5.36/7.74/2.89** 点,
68
+ 在更严格的 Acc@0.7 上增益最大。
69
+
70
+ **OBB-only RL 不牺牲 HBB**:GDPO 只用 OBB 样本训练,HBB 宏平均反而从 57.17/40.33/48.82 升到
71
+ 58.78/42.22/50.39 —— Acc@0.5 在 7 个集合中的 6 个上升,Acc@0.7 与 mIoU 全部 7 个上升。
72
+
73
+ ## 使用
74
+
75
+ 模型使用 HBB / OBB 两种提示词,输出 JSON 格式的框坐标。
76
+
77
+ ```python
78
+ from transformers import AutoModelForImageTextToText, AutoProcessor
79
+ from PIL import Image
80
+
81
+ model_id = "yuchenwu73/GeoBox-R1"
82
+ model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="auto", device_map="auto")
83
+ processor = AutoProcessor.from_pretrained(model_id)
84
+
85
+ image = Image.open("scene.png")
86
+ expression = "the brown suv on the right"
87
+
88
+ # 旋转框(OBB)
89
+ prompt = (f"Locate the instance that matches the description: [{expression}]. "
90
+ "Report oriented bbox coordinates in following JSON format:\n"
91
+ "```json\n[\n\t{\"oriented_bbox\": [[x1,y1],[x2,y2],[x3,y3],[x4,y4]]}\n]\n```")
92
+
93
+ messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": prompt}]}]
94
+ text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
95
+ inputs = processor(text=[text], images=[image], return_tensors="pt").to(model.device)
96
+ out = model.generate(**inputs, max_new_tokens=256)
97
+ print(processor.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
98
+ ```
99
+
100
+ 水平框把提示词换成 `Report horizontal bbox coordinates ...` 与 `{"horizontal_bbox": [x1,y1,x2,y2]}` 即可。
101
+
102
+ 也可用 [ms-swift](https://github.com/modelscope/ms-swift)(训练所用框架)推理与部署。
103
+
104
+ ## 引用
105
+
106
+ ```bibtex
107
+ @inproceedings{geoboxr1,
108
+ title = {GeoBox-R1: Curriculum-Guided SFT and Geometric RL for
109
+ Unified Box-Level Remote Sensing Visual Grounding},
110
+ author = {Lan, Chenxi and Wu, Yuchen and Zhou, Minghang and
111
+ Li, Tianyu and Qiu, Zhihao and Wang, Guoqing},
112
+ booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
113
+ year = {2027},
114
+ note = {Under review}
115
+ }
116
+ ```