Iambackup
/

Iambackup Lin-Zhuo commited on
Commit
2100313
·
0 Parent(s):

Duplicate from robbyant/lingbot-map

Browse files

Co-authored-by: LIn-Zhuo Chen <Lin-Zhuo@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/teaser.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+ <img src="assets/teaser.png" width="100%">
3
+
4
+ <h1>LingBot-Map: Geometric Context Transformer for Streaming 3D Reconstruction</h1>
5
+
6
+ Robbyant Team
7
+
8
+ </div>
9
+
10
+ <div align="center">
11
+
12
+ [![Paper](https://img.shields.io/static/v1?label=Paper&message=arXiv&color=red&logo=arxiv)](https://arxiv.org/abs/2604.14141)
13
+ [![PDF](https://img.shields.io/static/v1?label=Paper&message=PDF&color=red&logo=adobeacrobatreader)](lingbot-map_paper.pdf)
14
+ [![Project](https://img.shields.io/badge/Project-Website-blue)](https://technology.robbyant.com/lingbot-map)
15
+ [![HuggingFace](https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Model&message=HuggingFace&color=orange)](https://huggingface.co/robbyant/lingbot-map)
16
+ [![ModelScope](https://img.shields.io/static/v1?label=%F0%9F%A4%96%20Model&message=ModelScope&color=purple)](https://www.modelscope.cn/models/Robbyant/lingbot-map)
17
+ [![License](https://img.shields.io/badge/License-Apache--2.0-green)](LICENSE.txt)
18
+
19
+ </div>
20
+
21
+ https://github.com/user-attachments/assets/fe39e095-af2c-4ec9-b68d-a8ba97e505ab
22
+
23
+ -----
24
+
25
+ ### 🗺️ Meet LingBot-Map! We've built a feed-forward 3D foundation model for streaming 3D reconstruction! 🏗️🌍
26
+
27
+ LingBot-Map has focused on:
28
+
29
+ - **Geometric Context Transformer**: Architecturally unifies coordinate grounding, dense geometric cues, and long-range drift correction within a single streaming framework through anchor context, pose-reference window, and trajectory memory.
30
+ - **High-Efficiency Streaming Inference**: A feed-forward architecture with paged KV cache attention, enabling stable inference at ~20 FPS on 518×378 resolution over long sequences exceeding 10,000 frames.
31
+ - **State-of-the-Art Reconstruction**: Superior performance on diverse benchmarks compared to both existing streaming and iterative optimization-based approaches.
32
+
33
+ ---
34
+
35
+ # ⚙️ Quick Start
36
+
37
+ ## Installation
38
+
39
+ **1. Create conda environment**
40
+
41
+ ```bash
42
+ conda create -n lingbot-map python=3.10 -y
43
+ conda activate lingbot-map
44
+ ```
45
+
46
+ **2. Install PyTorch (CUDA 12.8)**
47
+
48
+ ```bash
49
+ pip install torch==2.9.1 torchvision==0.24.1 --index-url https://download.pytorch.org/whl/cu128
50
+ ```
51
+
52
+ > For other CUDA versions, see [PyTorch Get Started](https://pytorch.org/get-started/locally/).
53
+
54
+ **3. Install lingbot-map**
55
+
56
+ ```bash
57
+ pip install -e .
58
+ ```
59
+
60
+ **4. Install FlashInfer (recommended)**
61
+
62
+ FlashInfer provides paged KV cache attention for efficient streaming inference:
63
+
64
+ ```bash
65
+ # CUDA 12.8 + PyTorch 2.9
66
+ pip install flashinfer-python -i https://flashinfer.ai/whl/cu128/torch2.9/
67
+ ```
68
+
69
+ > For other CUDA/PyTorch combinations, see [FlashInfer installation](https://docs.flashinfer.ai/installation.html).
70
+ > If FlashInfer is not installed, the model falls back to SDPA (PyTorch native attention) via `--use_sdpa`.
71
+
72
+ **5. Visualization dependencies (optional)**
73
+
74
+ ```bash
75
+ pip install -e ".[vis]"
76
+ ```
77
+
78
+ # 📦 Model Download
79
+
80
+ | Model Name | Huggingface Repository | ModelScope Repository | Description |
81
+ | :--- | :--- | :--- | :--- |
82
+ | lingbot-map | [robbyant/lingbot-map](https://huggingface.co/robbyant/lingbot-map) | [Robbyant/lingbot-map](https://www.modelscope.cn/models/Robbyant/lingbot-map) | Base model checkpoint (4.63 GB) |
83
+
84
+ # 🎬 Demo
85
+
86
+ ### Streaming Inference from Images
87
+
88
+ ```bash
89
+ python demo.py --model_path /path/to/checkpoint.pt \
90
+ --image_folder /path/to/images/
91
+ ```
92
+
93
+ ### Streaming Inference from Video
94
+
95
+ ```bash
96
+ python demo.py --model_path /path/to/checkpoint.pt \
97
+ --video_path video.mp4 --fps 10
98
+ ```
99
+
100
+ ### Streaming with Keyframe Interval
101
+
102
+ Use `--keyframe_interval` to reduce KV cache memory by only keeping every N-th frame as a keyframe. Non-keyframe frames still produce predictions but are not stored in the cache. This is useful for long sequences
103
+ which excesses 320 frames.
104
+
105
+ ```bash
106
+ python demo.py --model_path /path/to/checkpoint.pt \
107
+ --image_folder /path/to/images/ --keyframe_interval 6
108
+ ```
109
+
110
+ ### Windowed Inference (for long sequences, >3000 frames)
111
+ ```bash
112
+ python demo.py --model_path /path/to/checkpoint.pt \
113
+ --video_path video.mp4 --fps 10 \
114
+ --mode windowed --window_size 64
115
+ ```
116
+
117
+
118
+ ### Sky Masking
119
+
120
+ Sky masking uses an ONNX sky segmentation model to filter out sky points from the reconstructed point cloud, which improves visualization quality for outdoor scenes.
121
+
122
+ **Setup:**
123
+
124
+ ```bash
125
+ # Install onnxruntime (required)
126
+ pip install onnxruntime # CPU
127
+ # or
128
+ pip install onnxruntime-gpu # GPU (faster for large image sets)
129
+ ```
130
+
131
+ The sky segmentation model (`skyseg.onnx`) will be automatically downloaded from [HuggingFace](https://huggingface.co/JianyuanWang/skyseg/resolve/main/skyseg.onnx) on first use.
132
+
133
+ **Usage:**
134
+
135
+ ```bash
136
+ python demo.py --model_path /path/to/checkpoint.pt \
137
+ --image_folder /path/to/images/ --mask_sky
138
+ ```
139
+
140
+ Sky masks are cached in `<image_folder>_sky_masks/` so subsequent runs skip regeneration.
141
+
142
+ ### Without FlashInfer (SDPA fallback)
143
+
144
+ ```bash
145
+ python demo.py --model_path /path/to/checkpoint.pt \
146
+ --image_folder /path/to/images/ --use_sdpa
147
+ ```
148
+
149
+ # ���� License
150
+
151
+ This project is released under the Apache License 2.0. See [LICENSE](LICENSE.txt) file for details.
152
+
153
+ # 📖 Citation
154
+
155
+ ```bibtex
156
+ @article{chen2026geometric,
157
+ title={Geometric Context Transformer for Streaming 3D Reconstruction},
158
+ author={Chen, Lin-Zhuo and Gao, Jian and Chen, Yihang and Cheng, Ka Leong and Sun, Yipengjing and Hu, Liangxiao and Xue, Nan and Zhu, Xing and Shen, Yujun and Yao, Yao and Xu, Yinghao},
159
+ journal={arXiv preprint arXiv:2604.14141},
160
+ year={2026}
161
+ }
162
+ ```
163
+
164
+ # ✨ Acknowledgments
165
+
166
+ We thank Shangzhan Zhang, Jianyuan Wang, Yudong Jin, Christian Rupprecht, and Xun Cao for their helpful discussions and support.
167
+
168
+ This work builds upon several excellent open-source projects:
169
+
170
+ - [VGGT](https://github.com/facebookresearch/vggt)
171
+ - [DINOv2](https://github.com/facebookresearch/dinov2)
172
+ - [Flashinfer](https://github.com/flashinfer-ai/flashinfer)
173
+
174
+ ---
assets/teaser.png ADDED

Git LFS Details

  • SHA256: d34377bdb2f0747442f3113692914e669e97cb1d474578711cc30d08c5618bcc
  • Pointer size: 132 Bytes
  • Size of remote file: 5.11 MB
lingbot-map-long.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:832bc82cbae0bc9bbe946ef5ee1f7226abd8c0e183ccf8beddbb3d133576f409
3
+ size 4632303465
lingbot-map-stage1.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96585170caf8f760662f44572e5add8816e4be717192a2adf1b11563ad1fc1e9
3
+ size 4762938315
lingbot-map.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee665103348e07e6b826d529b8e61de8f413d5432a4f2e84970d6c8fd2e1cd72
3
+ size 4632303465