mystorm commited on
Commit
ddc2968
Β·
verified Β·
1 Parent(s): bc6429d

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +147 -0
README.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+ <h2>⚑️ FastVGGT: Training-Free Acceleration of Visual Geometry Transformer</h2>
3
+
4
+ <p align="center">
5
+ <a href="https://arxiv.org/abs/2509.02560"><img src="https://img.shields.io/badge/arXiv-FastVGGT-red?logo=arxiv" alt="Paper PDF"></a>
6
+ <a href="https://mystorm16.github.io/fastvggt/"><img src="https://img.shields.io/badge/Project_Page-FastVGGT-yellow" alt="Project Page"></a>
7
+ </p>
8
+
9
+
10
+ [You Shen](https://mystorm16.github.io/), [Zhipeng Zhang](https://zhipengzhang.cn/), [Yansong Qu](https://quyans.github.io/), [Liujuan Cao](https://mac.xmu.edu.cn/ljcao/)
11
+ </div>
12
+
13
+
14
+ ## πŸ”­ Overview
15
+
16
+ FastVGGT observes **strong similarity** in attention maps and leverages it to design a training-free acceleration method for long-sequence 3D reconstruction, **achieving up to 4Γ— faster inference without sacrificing accuracy.**
17
+
18
+
19
+ ## βš™οΈ Environment Setup
20
+ First, create a virtual environment using Conda, clone this repository to your local machine, and install the required dependencies.
21
+
22
+
23
+ ```bash
24
+ conda create -n fastvggt python=3.10
25
+ conda activate fastvggt
26
+ git clone git@github.com:mystorm16/FastVGGT.git
27
+ cd FastVGGT
28
+ pip install -r requirements.txt
29
+ ```
30
+
31
+ Next, prepare the ScanNet dataset: http://www.scan-net.org/ScanNet/
32
+
33
+ Then, download the VGGT checkpoint (we use the checkpoint link provided in https://github.com/facebookresearch/vggt/tree/evaluation/evaluation):
34
+ ```bash
35
+ wget https://huggingface.co/facebook/VGGT_tracker_fixed/resolve/main/model_tracker_fixed_e20.pt
36
+ ```
37
+
38
+ Finally, configure the dataset path and VGGT checkpoint path. For example:
39
+ ```bash
40
+ parser.add_argument(
41
+ "--data_dir", type=Path, default="/data/scannetv2/process_scannet"
42
+ )
43
+ parser.add_argument(
44
+ "--gt_ply_dir",
45
+ type=Path,
46
+ default="/data/scannetv2/OpenDataLab___ScanNet_v2/raw/scans",
47
+ )
48
+ parser.add_argument(
49
+ "--ckpt_path",
50
+ type=str,
51
+ default="./ckpt/model_tracker_fixed_e20.pt",
52
+ )
53
+ ```
54
+
55
+
56
+ ## πŸ’Ž Observation
57
+
58
+ Note: A large number of input_frames may significantly slow down saving the visualization results. Please try using a smaller number first.
59
+ ```bash
60
+ python eval/eval_scannet.py --input_frame 30 --vis_attn_map --merging 0
61
+ ```
62
+
63
+ We observe that many token-level attention maps are highly similar in each block, motivating our optimization of the Global Attention module.
64
+
65
+
66
+
67
+ ## πŸ€ Evaluation
68
+ ### Custom Dataset
69
+ Please organize the data according to the following directory:
70
+ ```
71
+ <data_path>/
72
+ β”œβ”€β”€ images/
73
+ β”‚ β”œβ”€β”€ 000000.jpg
74
+ β”‚ β”œβ”€β”€ 000001.jpg
75
+ β”‚ └── ...
76
+ β”œβ”€β”€ pose/ # Optional: Camera poses
77
+ β”‚ β”œβ”€β”€ 000000.txt
78
+ β”‚ β”œβ”€β”€ 000001.txt
79
+ β”‚ └── ...
80
+ └── gt_ply/ # Optional: GT point cloud
81
+ └── scene_xxx.ply
82
+ ```
83
+ - Required: `images/`
84
+ - Additionally required when `--enable_evaluation` is enabled: `pose/` and `gt_ply/`
85
+
86
+ Inference only:
87
+
88
+ ```bash
89
+ python eval/eval_custom.py \
90
+ --data_path /path/to/your_dataset \
91
+ --output_path ./eval_results_custom \
92
+ --plot
93
+ ```
94
+
95
+ Inference + Evaluation (requires `pose/` and `gt_ply/`):
96
+
97
+ ```bash
98
+ python eval/eval_custom.py \
99
+ --data_path /path/to/your_dataset \
100
+ --enable_evaluation \
101
+ --output_path ./eval_results_custom \
102
+ --plot
103
+ ```
104
+
105
+ ### ScanNet
106
+ Evaluate FastVGGT on the ScanNet dataset with 1,000 input images. The **--merging** parameter specifies the block index at which the merging strategy is applied:
107
+
108
+ ```bash
109
+ python eval/eval_scannet.py --input_frame 1000 --merging 0
110
+ ```
111
+
112
+ Evaluate Baseline VGGT on the ScanNet dataset with 1,000 input images:
113
+ ```bash
114
+ python eval/eval_scannet.py --input_frame 1000
115
+ ```
116
+
117
+ ### 7 Scenes & NRGBD
118
+ Evaluate across two datasets, sampling keyframes every 10 frames:
119
+ ```bash
120
+ python eval/eval_7andN.py --kf 10
121
+ ```
122
+
123
+ ## 🍺 Acknowledgements
124
+
125
+ - Thanks to these great repositories: [VGGT](https://github.com/facebookresearch/vggt), [Dust3r](https://github.com/naver/dust3r), [Fast3R](https://github.com/facebookresearch/fast3r), [CUT3R](https://github.com/CUT3R/CUT3R), [MV-DUSt3R+](https://github.com/facebookresearch/mvdust3r), [StreamVGGT](https://github.com/wzzheng/StreamVGGT), [VGGT-Long](https://github.com/DengKaiCQ/VGGT-Long), [ToMeSD](https://github.com/dbolya/tomesd) and many other inspiring works in the community.
126
+
127
+ - Special thanks to [Jianyuan Wang](https://jytime.github.io/) for his valuable discussions and suggestions on this work.
128
+
129
+ <!-- ## ✍️ Checklist
130
+
131
+ - [ ] Release the evaluation code on 7 Scenes / NRGBD -->
132
+
133
+
134
+ ## βš–οΈ License
135
+ See the [LICENSE](./LICENSE.txt) file for details about the license under which this code is made available.
136
+
137
+ ## Citation
138
+
139
+ If you find this project helpful, please consider citing the following paper:
140
+ ```
141
+ @article{shen2025fastvggt,
142
+ title={FastVGGT: Training-Free Acceleration of Visual Geometry Transformer},
143
+ author={Shen, You and Zhang, Zhipeng and Qu, Yansong and Cao, Liujuan},
144
+ journal={arXiv preprint arXiv:2509.02560},
145
+ year={2025}
146
+ }
147
+ ```