项目地址:

GitHub - facebookresearch/vggt: [CVPR 2025 Best Paper Award] VGGT: Visual Geometry Grounded Transformer

一、下载权重

参考(CVPR2025)Best paper VGGT论文的复现_vggt复现-CSDN博客

由于权重是在Hugging Face,国内仍然下载非常慢挂上梯子后,从(https://huggingface.co/facebook/VGGT-1B/resolve/main/model.pt)下载,然后保存到自己的本地路径。

修改原仓库的demo_gradio.py,将加载模型的代码改为本地加载。对应32-34行,改为如下代码,checkpoint_path对应自己的路径即可。

checkpoint_path = "./checkpoint/model.pt"
state_dict = torch.load(checkpoint_path)
model = VGGT()
model.load_state_dict(state_dict)

二、复现

conda create -n vggt python=3.10
conda activate vggt
pip install -r requirements.txt
pip install -r requirements_demo.txt
python demo_gradio.py

点击上面的URL,上传图片或视频或选择网页上的例子,点击“重建”

21帧,用时220s

8帧,用时28s

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐