[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-facebookresearch--vggt":3,"tool-facebookresearch--vggt":62},[4,18,26,35,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,2,"2026-04-08T11:23:26",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":32,"last_commit_at":41,"category_tags":42,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[43,13,15,14],"插件",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[52,15,13,14],"语言模型",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,61],"视频",{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":68,"readme_en":69,"readme_zh":70,"quickstart_zh":71,"use_case_zh":72,"hero_image_url":73,"owner_login":74,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":90,"forks":91,"last_commit_at":92,"license":93,"difficulty_score":10,"env_os":94,"env_gpu":95,"env_ram":94,"env_deps":96,"category_tags":104,"github_topics":78,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":106,"updated_at":107,"faqs":108,"releases":142},6126,"facebookresearch\u002Fvggt","vggt","[CVPR 2025 Best Paper Award] VGGT: Visual Geometry Grounded Transformer","VGGT（Visual Geometry Grounded Transformer）是一款荣获 CVPR 2025 最佳论文奖的开源人工智能模型，由牛津大学视觉几何组与 Meta AI 联合研发。它本质上是一个前馈神经网络，能够直接从单张、少量甚至数百张场景图像中，在数秒内直接推断出完整的 3D 几何属性。\n\n传统方法重建 3D 场景往往依赖繁琐的迭代优化或复杂的流水线，而 VGGT 解决了这一效率瓶颈。它能一次性输出相机的内外参数、深度图、点云图以及 3D 点轨迹，将原本耗时的过程压缩至瞬间完成，且支持导出为 COLMAP 格式，便于与 3D 高斯溅射（Gaussian Splatting）等主流技术无缝衔接。\n\n该工具特别适合计算机视觉研究人员、3D 开发者以及需要快速构建场景几何信息的工程师使用。其核心技术亮点在于“视觉几何接地”的 Transformer 架构，打破了以往模型难以统一处理多变视角数量的限制。值得一提的是，项目方已更新许可协议，推出了支持商业应用（非军事用途）的专用检查点，并开放了训练代码，允许用户在自定义数据集上进行微调，极大地降低了高质量 3D 重建的技术门槛","VGGT（Visual Geometry Grounded Transformer）是一款荣获 CVPR 2025 最佳论文奖的开源人工智能模型，由牛津大学视觉几何组与 Meta AI 联合研发。它本质上是一个前馈神经网络，能够直接从单张、少量甚至数百张场景图像中，在数秒内直接推断出完整的 3D 几何属性。\n\n传统方法重建 3D 场景往往依赖繁琐的迭代优化或复杂的流水线，而 VGGT 解决了这一效率瓶颈。它能一次性输出相机的内外参数、深度图、点云图以及 3D 点轨迹，将原本耗时的过程压缩至瞬间完成，且支持导出为 COLMAP 格式，便于与 3D 高斯溅射（Gaussian Splatting）等主流技术无缝衔接。\n\n该工具特别适合计算机视觉研究人员、3D 开发者以及需要快速构建场景几何信息的工程师使用。其核心技术亮点在于“视觉几何接地”的 Transformer 架构，打破了以往模型难以统一处理多变视角数量的限制。值得一提的是，项目方已更新许可协议，推出了支持商业应用（非军事用途）的专用检查点，并开放了训练代码，允许用户在自定义数据集上进行微调，极大地降低了高质量 3D 重建的技术门槛。","\u003Cdiv align=\"center\">\n\u003Ch1>VGGT: Visual Geometry Grounded Transformer\u003C\u002Fh1>\n\n\u003Ca href=\"https:\u002F\u002Fjytime.github.io\u002Fdata\u002FVGGT_CVPR25.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-VGGT\" alt=\"Paper PDF\">\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.11651\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2503.11651-b31b1b\" alt=\"arXiv\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fvgg-t.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject_Page-green\" alt=\"Project Page\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffacebook\u002Fvggt\">\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Demo-blue'>\u003C\u002Fa>\n\n\n**[Visual Geometry Group, University of Oxford](https:\u002F\u002Fwww.robots.ox.ac.uk\u002F~vgg\u002F)**; **[Meta AI](https:\u002F\u002Fai.facebook.com\u002Fresearch\u002F)**\n\n\n[Jianyuan Wang](https:\u002F\u002Fjytime.github.io\u002F), [Minghao Chen](https:\u002F\u002Fsilent-chen.github.io\u002F), [Nikita Karaev](https:\u002F\u002Fnikitakaraevv.github.io\u002F), [Andrea Vedaldi](https:\u002F\u002Fwww.robots.ox.ac.uk\u002F~vedaldi\u002F), [Christian Rupprecht](https:\u002F\u002Fchrirupp.github.io\u002F), [David Novotny](https:\u002F\u002Fd-novotny.github.io\u002F)\n\u003C\u002Fdiv>\n\n```bibtex\n@inproceedings{wang2025vggt,\n  title={VGGT: Visual Geometry Grounded Transformer},\n  author={Wang, Jianyuan and Chen, Minghao and Karaev, Nikita and Vedaldi, Andrea and Rupprecht, Christian and Novotny, David},\n  booktitle={Proceedings of the IEEE\u002FCVF Conference on Computer Vision and Pattern Recognition},\n  year={2025}\n}\n```\n\n## Updates\n\n- [July 29, 2025] We've updated the license for VGGT to permit **commercial use** (excluding military applications). All code in this repository is now under a commercial-use-friendly license. However, only the newly released checkpoint [**VGGT-1B-Commercial**](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B-Commercial) is licensed for commercial usage — the original checkpoint remains non-commercial. Full license details are available [here](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fblob\u002Fmain\u002FLICENSE.txt). Access to the checkpoint requires completing an application form, which is processed by a system similar to LLaMA's approval workflow, automatically. The new checkpoint delivers similar performance to the original model. Please submit an issue if you notice a significant performance discrepancy.\n\n\n\n- [July 6, 2025] Training code is now available in the `training` folder, including an example to finetune VGGT on a custom dataset. \n\n\n- [June 13, 2025] Honored to receive the Best Paper Award at CVPR 2025! Apologies if I’m slow to respond to queries or GitHub issues these days. If you’re interested, our oral presentation is available [here](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1JVuPnuZx6RgAy-U5Ezobg73XpBi7FrOh\u002Fedit?usp=sharing&ouid=107115712143490405606&rtpof=true&sd=true). Another long presentation can be found [here](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1aSv0e5PmH1mnwn2MowlJIajFUYZkjqgw\u002Fedit?usp=sharing&ouid=107115712143490405606&rtpof=true&sd=true) (Note: it’s shared in .pptx format with animations — quite large, but feel free to use it as a template if helpful.)\n\n\n- [June 2, 2025] Added a script to run VGGT and save predictions in COLMAP format, with bundle adjustment support optional. The saved COLMAP files can be directly used with [gsplat](https:\u002F\u002Fgithub.com\u002Fnerfstudio-project\u002Fgsplat) or other NeRF\u002FGaussian splatting libraries.\n\n\n- [May 3, 2025] Evaluation code for reproducing our camera pose estimation results on Co3D is now available in the [evaluation](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Ftree\u002Fevaluation) branch. \n\n\n## Overview\n\nVisual Geometry Grounded Transformer (VGGT, CVPR 2025) is a feed-forward neural network that directly infers all key 3D attributes of a scene, including extrinsic and intrinsic camera parameters, point maps, depth maps, and 3D point tracks, **from one, a few, or hundreds of its views, within seconds**.\n\n\n## Quick Start\n\nFirst, clone this repository to your local machine, and install the dependencies (torch, torchvision, numpy, Pillow, and huggingface_hub). \n\n```bash\ngit clone git@github.com:facebookresearch\u002Fvggt.git \ncd vggt\npip install -r requirements.txt\n```\n\nAlternatively, you can install VGGT as a package (\u003Ca href=\"docs\u002Fpackage.md\">click here\u003C\u002Fa> for details).\n\n\nNow, try the model with just a few lines of code:\n\n```python\nimport torch\nfrom vggt.models.vggt import VGGT\nfrom vggt.utils.load_fn import load_and_preprocess_images\n\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n# bfloat16 is supported on Ampere GPUs (Compute Capability 8.0+) \ndtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] >= 8 else torch.float16\n\n# Initialize the model and load the pretrained weights.\n# This will automatically download the model weights the first time it's run, which may take a while.\nmodel = VGGT.from_pretrained(\"facebook\u002FVGGT-1B\").to(device)\n\n# Load and preprocess example images (replace with your own image paths)\nimage_names = [\"path\u002Fto\u002FimageA.png\", \"path\u002Fto\u002FimageB.png\", \"path\u002Fto\u002FimageC.png\"]  \nimages = load_and_preprocess_images(image_names).to(device)\n\nwith torch.no_grad():\n    with torch.cuda.amp.autocast(dtype=dtype):\n        # Predict attributes including cameras, depth maps, and point maps.\n        predictions = model(images)\n```\n\nThe model weights will be automatically downloaded from Hugging Face. If you encounter issues such as slow loading, you can manually download them [here](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B\u002Fblob\u002Fmain\u002Fmodel.pt) and load, or:\n\n```python\nmodel = VGGT()\n_URL = \"https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B\u002Fresolve\u002Fmain\u002Fmodel.pt\"\nmodel.load_state_dict(torch.hub.load_state_dict_from_url(_URL))\n```\n\n## Detailed Usage\n\n\u003Cdetails>\n\u003Csummary>Click to expand\u003C\u002Fsummary>\n\nYou can also optionally choose which attributes (branches) to predict, as shown below. This achieves the same result as the example above. This example uses a batch size of 1 (processing a single scene), but it naturally works for multiple scenes.\n\n```python\nfrom vggt.utils.pose_enc import pose_encoding_to_extri_intri\nfrom vggt.utils.geometry import unproject_depth_map_to_point_map\n\nwith torch.no_grad():\n    with torch.cuda.amp.autocast(dtype=dtype):\n        images = images[None]  # add batch dimension\n        aggregated_tokens_list, ps_idx = model.aggregator(images)\n                \n    # Predict Cameras\n    pose_enc = model.camera_head(aggregated_tokens_list)[-1]\n    # Extrinsic and intrinsic matrices, following OpenCV convention (camera from world)\n    extrinsic, intrinsic = pose_encoding_to_extri_intri(pose_enc, images.shape[-2:])\n\n    # Predict Depth Maps\n    depth_map, depth_conf = model.depth_head(aggregated_tokens_list, images, ps_idx)\n\n    # Predict Point Maps\n    point_map, point_conf = model.point_head(aggregated_tokens_list, images, ps_idx)\n        \n    # Construct 3D Points from Depth Maps and Cameras\n    # which usually leads to more accurate 3D points than point map branch\n    point_map_by_unprojection = unproject_depth_map_to_point_map(depth_map.squeeze(0), \n                                                                extrinsic.squeeze(0), \n                                                                intrinsic.squeeze(0))\n\n    # Predict Tracks\n    # choose your own points to track, with shape (N, 2) for one scene\n    query_points = torch.FloatTensor([[100.0, 200.0], \n                                        [60.72, 259.94]]).to(device)\n    track_list, vis_score, conf_score = model.track_head(aggregated_tokens_list, images, ps_idx, query_points=query_points[None])\n```\n\n\nFurthermore, if certain pixels in the input frames are unwanted (e.g., reflective surfaces, sky, or water), you can simply mask them by setting the corresponding pixel values to 0 or 1. Precise segmentation masks aren't necessary - simple bounding box masks work effectively (check this [issue](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F47) for an example).\n\n\u003C\u002Fdetails>\n\n\n## Interactive Demo\n\nWe provide multiple ways to visualize your 3D reconstructions. Before using these visualization tools, install the required dependencies:\n\n```bash\npip install -r requirements_demo.txt\n```\n\n### Interactive 3D Visualization\n\n**Please note:** VGGT typically reconstructs a scene in less than 1 second. However, visualizing 3D points may take tens of seconds due to third-party rendering, independent of VGGT's processing time. The visualization is slow especially when the number of images is large.\n\n\n#### Gradio Web Interface\n\nOur Gradio-based interface allows you to upload images\u002Fvideos, run reconstruction, and interactively explore the 3D scene in your browser. You can launch this in your local machine or try it on [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffacebook\u002Fvggt).\n\n\n```bash\npython demo_gradio.py\n```\n\n\u003Cdetails>\n\u003Csummary>Click to preview the Gradio interactive interface\u003C\u002Fsummary>\n\n![Gradio Web Interface Preview](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_vggt_readme_e6e3f68011ac.png)\n\u003C\u002Fdetails>\n\n\n#### Viser 3D Viewer\n\nRun the following command to run reconstruction and visualize the point clouds in viser. Note this script requires a path to a folder containing images. It assumes only image files under the folder. You can set `--use_point_map` to use the point cloud from the point map branch, instead of the depth-based point cloud.\n\n```bash\npython demo_viser.py --image_folder path\u002Fto\u002Fyour\u002Fimages\u002Ffolder\n```\n\n## Exporting to COLMAP Format\n\nWe also support exporting VGGT's predictions directly to COLMAP format, by:\n\n```bash \n# Feedforward prediction only\npython demo_colmap.py --scene_dir=\u002FYOUR\u002FSCENE_DIR\u002F \n\n# With bundle adjustment\npython demo_colmap.py --scene_dir=\u002FYOUR\u002FSCENE_DIR\u002F --use_ba\n\n# Run with bundle adjustment using reduced parameters for faster processing\n# Reduces max_query_pts from 4096 (default) to 2048 and query_frame_num from 8 (default) to 5\n# Trade-off: Faster execution but potentially less robust reconstruction in complex scenes (you may consider setting query_frame_num equal to your total number of images) \n# See demo_colmap.py for additional bundle adjustment configuration options\npython demo_colmap.py --scene_dir=\u002FYOUR\u002FSCENE_DIR\u002F --use_ba --max_query_pts=2048 --query_frame_num=5\n```\n\nPlease ensure that the images are stored in `\u002FYOUR\u002FSCENE_DIR\u002Fimages\u002F`. This folder should contain only the images. Check the examples folder for the desired data structure. \n\nThe reconstruction result (camera parameters and 3D points) will be automatically saved under `\u002FYOUR\u002FSCENE_DIR\u002Fsparse\u002F` in the COLMAP format, such as:\n\n``` \nSCENE_DIR\u002F\n├── images\u002F\n└── sparse\u002F\n    ├── cameras.bin\n    ├── images.bin\n    └── points3D.bin\n```\n\n## Integration with Gaussian Splatting\n\n\nThe exported COLMAP files can be directly used with [gsplat](https:\u002F\u002Fgithub.com\u002Fnerfstudio-project\u002Fgsplat) for Gaussian Splatting training. Install `gsplat` following their official instructions (we recommend `gsplat==1.3.0`):\n\nAn example command to train the model is:\n```\ncd gsplat\npython examples\u002Fsimple_trainer.py  default --data_factor 1 --data_dir \u002FYOUR\u002FSCENE_DIR\u002F --result_dir \u002FYOUR\u002FRESULT_DIR\u002F\n```\n\n\n\n## Zero-shot Single-view Reconstruction\n\nOur model shows surprisingly good performance on single-view reconstruction, although it was never trained for this task. The model does not need to duplicate the single-view image to a pair, instead, it can directly infer the 3D structure from the tokens of the single view image. Feel free to try it with our demos above, which naturally works for single-view reconstruction.\n\n\nWe did not quantitatively test monocular depth estimation performance ourselves, but [@kabouzeid](https:\u002F\u002Fgithub.com\u002Fkabouzeid) generously provided a comparison of VGGT to recent methods [here](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F36). VGGT shows competitive or better results compared to state-of-the-art monocular approaches such as DepthAnything v2 or MoGe, despite never being explicitly trained for single-view tasks. \n\n\n\n## Runtime and GPU Memory\n\nWe benchmark the runtime and GPU memory usage of VGGT's aggregator on a single NVIDIA H100 GPU across various input sizes. \n\n| **Input Frames** | 1 | 2 | 4 | 8 | 10 | 20 | 50 | 100 | 200 |\n|:----------------:|:-:|:-:|:-:|:-:|:--:|:--:|:--:|:---:|:---:|\n| **Time (s)**     | 0.04 | 0.05 | 0.07 | 0.11 | 0.14 | 0.31 | 1.04 | 3.12 | 8.75 |\n| **Memory (GB)**  | 1.88 | 2.07 | 2.45 | 3.23 | 3.63 | 5.58 | 11.41 | 21.15 | 40.63 |\n\nNote that these results were obtained using Flash Attention 3, which is faster than the default Flash Attention 2 implementation while maintaining almost the same memory usage. Feel free to compile Flash Attention 3 from source to get better performance.\n\n\n## Research Progression\n\nOur work builds upon a series of previous research projects. If you're interested in understanding how our research evolved, check out our previous works:\n\n\n\u003Ctable border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n  \u003Ctr>\n    \u003Ctd align=\"left\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjytime\u002FDeep-SfM-Revisited\">Deep SfM Revisited\u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"white-space: pre;\">──┐\u003C\u002Ftd>\n    \u003Ctd>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"left\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FPoseDiffusion\">PoseDiffusion\u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"white-space: pre;\">─────►\u003C\u002Ftd>\n    \u003Ctd>\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggsfm\">VGGSfM\u003C\u002Fa> ──►\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\">VGGT\u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"left\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco-tracker\">CoTracker\u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"white-space: pre;\">──┘\u003C\u002Ftd>\n    \u003Ctd>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n## Acknowledgements\n\nThanks to these great repositories: [PoseDiffusion](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FPoseDiffusion), [VGGSfM](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggsfm), [CoTracker](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco-tracker), [DINOv2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fdinov2), [Dust3r](https:\u002F\u002Fgithub.com\u002Fnaver\u002Fdust3r), [Moge](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmoge), [PyTorch3D](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fpytorch3d), [Sky Segmentation](https:\u002F\u002Fgithub.com\u002Fxiongzhu666\u002FSky-Segmentation-and-Post-processing), [Depth Anything V2](https:\u002F\u002Fgithub.com\u002FDepthAnything\u002FDepth-Anything-V2), [Metric3D](https:\u002F\u002Fgithub.com\u002FYvanYin\u002FMetric3D) and many other inspiring works in the community.\n\n## Checklist\n\n- [x] Release the training code\n- [ ] Release VGGT-500M and VGGT-200M\n\n\n## License\nSee the [LICENSE](.\u002FLICENSE.txt) file for details about the license under which this code is made available.\n\nPlease note that only this [model checkpoint](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B-Commercial) allows commercial usage. This new checkpoint achieves the same performance level (might be slightly better) as the original one, e.g., AUC@30: 90.37 vs. 89.98 on the Co3D dataset.\n","\u003Cdiv align=\"center\">\n\u003Ch1>VGGT：视觉几何基础Transformer\u003C\u002Fh1>\n\n\u003Ca href=\"https:\u002F\u002Fjytime.github.io\u002Fdata\u002FVGGT_CVPR25.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-VGGT\" alt=\"论文PDF\">\n\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.11651\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2503.11651-b31b1b\" alt=\"arXiv\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fvgg-t.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject_Page-green\" alt=\"项目页面\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffacebook\u002Fvggt\">\u003Cimg src='https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Demo-blue'>\u003C\u002Fa>\n\n\n**[牛津大学视觉几何组](https:\u002F\u002Fwww.robots.ox.ac.uk\u002F~vgg\u002F)**；**[Meta AI](https:\u002F\u002Fai.facebook.com\u002Fresearch\u002F)**\n\n\n[Jianyuan Wang](https:\u002F\u002Fjytime.github.io\u002F)、[Minghao Chen](https:\u002F\u002Fsilent-chen.github.io\u002F)、[Nikita Karaev](https:\u002F\u002Fnikitakaraevv.github.io\u002F)、[Andrea Vedaldi](https:\u002F\u002Fwww.robots.ox.ac.uk\u002F~vedaldi\u002F)、[Christian Rupprecht](https:\u002F\u002Fchrirupp.github.io\u002F)、[David Novotny](https:\u002F\u002Fd-novotny.github.io\u002F)\n\u003C\u002Fdiv>\n\n```bibtex\n@inproceedings{wang2025vggt,\n  title={VGGT: Visual Geometry Grounded Transformer},\n  author={Wang, Jianyuan and Chen, Minghao and Karaev, Nikita and Vedaldi, Andrea and Rupprecht, Christian and Novotny, David},\n  booktitle={Proceedings of the IEEE\u002FCVF Conference on Computer Vision and Pattern Recognition},\n  year={2025}\n}\n```\n\n## 更新\n\n- [2025年7月29日] 我们已将VGGT的许可证更新为允许**商业使用**（军事应用除外）。本仓库中的所有代码现均采用对商业友好的许可证。然而，仅新发布的检查点[**VGGT-1B-Commercial**](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B-Commercial)获准用于商业用途——原始检查点仍为非商业用途。完整许可详情请见[此处](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fblob\u002Fmain\u002FLICENSE.txt)。访问该检查点需填写申请表，系统会以类似于LLaMA审批流程的方式自动处理。新检查点的性能与原模型相近。如您发现显著性能差异，请提交问题。\n\n- [2025年7月6日] 训练代码现已在`training`文件夹中提供，包含一个在自定义数据集上微调VGGT的示例。\n\n- [2025年6月13日] 荣幸荣获CVPR 2025最佳论文奖！近期回复咨询或GitHub问题可能较慢，敬请谅解。若您感兴趣，我们的口头报告可在此查看[链接](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1JVuPnuZx6RgAy-U5Ezobg73XpBi7FrOh\u002Fedit?usp=sharing&ouid=107115712143490405606&rtpof=true&sd=true)。另一份较长的演示文稿可在[这里](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1aSv0e5PmH1mnwn2MowlJIajFUYZkjqgw\u002Fedit?usp=sharing&ouid=107115712143490405606&rtpof=true&sd=true)找到（注：以.pptx格式分享，包含动画效果——文件较大，但如有需要，可作为模板使用）。\n\n- [2025年6月2日] 新增了一个脚本，用于运行VGGT并将预测结果保存为COLMAP格式，可选支持束调整。保存的COLMAP文件可直接与[gsplat](https:\u002F\u002Fgithub.com\u002Fnerfstudio-project\u002Fgsplat)或其他NeRF\u002F高斯泼溅库配合使用。\n\n- [2025年5月3日] 用于在Co3D数据集上复现我们相机位姿估计结果的评估代码现已在[evaluation](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Ftree\u002Fevaluation)分支中提供。\n\n## 概述\n\n视觉几何基础Transformer（VGGT，CVPR 2025）是一种前馈神经网络，能够直接从一张、几张或数百张图像中，在几秒钟内推断出场景的所有关键3D属性，包括相机外参和内参、点云图、深度图以及3D点轨迹。\n\n\n## 快速入门\n\n首先，将此仓库克隆到本地，并安装依赖项（torch、torchvision、numpy、Pillow和huggingface_hub）。\n\n```bash\ngit clone git@github.com:facebookresearch\u002Fvggt.git \ncd vggt\npip install -r requirements.txt\n```\n\n或者，您也可以将VGGT作为软件包进行安装（\u003Ca href=\"docs\u002Fpackage.md\">点击此处\u003C\u002Fa>了解详情）。\n\n现在，只需几行代码即可尝试该模型：\n\n```python\nimport torch\nfrom vggt.models.vggt import VGGT\nfrom vggt.utils.load_fn import load_and_preprocess_images\n\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n# bfloat16在Ampere架构GPU（计算能力8.0及以上）上受支持\ndtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] >= 8 else torch.float16\n\n# 初始化模型并加载预训练权重。\n# 首次运行时会自动下载模型权重，可能需要一些时间。\nmodel = VGGT.from_pretrained(\"facebook\u002FVGGT-1B\").to(device)\n\n# 加载并预处理示例图像（请替换为您自己的图像路径）\nimage_names = [\"path\u002Fto\u002FimageA.png\", \"path\u002Fto\u002FimageB.png\", \"path\u002Fto\u002FimageC.png\"]  \nimages = load_and_preprocess_images(image_names).to(device)\n\nwith torch.no_grad():\n    with torch.cuda.amp.autocast(dtype=dtype):\n        # 预测包括相机参数、深度图和点云图在内的各项属性。\n        predictions = model(images)\n```\n\n模型权重将自动从Hugging Face下载。若遇到加载缓慢等问题，您可以手动从[这里](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B\u002Fblob\u002Fmain\u002Fmodel.pt)下载并加载，或执行以下操作：\n\n```python\nmodel = VGGT()\n_URL = \"https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B\u002Fresolve\u002Fmain\u002Fmodel.pt\"\nmodel.load_state_dict(torch.hub.load_state_dict_from_url(_URL))\n```\n\n## 详细用法\n\n\u003Cdetails>\n\u003Csummary>点击展开\u003C\u002Fsummary>\n\n你还可以选择性地指定要预测的属性（分支），如下所示。这与上面的示例效果相同。此示例使用批大小为 1（处理单个场景），但自然也适用于多个场景。\n\n```python\nfrom vggt.utils.pose_enc import pose_encoding_to_extri_intri\nfrom vggt.utils.geometry import unproject_depth_map_to_point_map\n\nwith torch.no_grad():\n    with torch.cuda.amp.autocast(dtype=dtype):\n        images = images[None]  # 添加批次维度\n        aggregated_tokens_list, ps_idx = model.aggregator(images)\n                \n    # 预测相机参数\n    pose_enc = model.camera_head(aggregated_tokens_list)[-1]\n    # 外参和内参矩阵，遵循 OpenCV 规范（从世界坐标系到相机坐标系）\n    extrinsic, intrinsic = pose_encoding_to_extri_intri(pose_enc, images.shape[-2:])\n\n    # 预测深度图\n    depth_map, depth_conf = model.depth_head(aggregated_tokens_list, images, ps_idx)\n\n    # 预测点云\n    point_map, point_conf = model.point_head(aggregated_tokens_list, images, ps_idx)\n        \n    # 从深度图和相机参数构建 3D 点云\n    # 通常比点云分支生成的点云更精确\n    point_map_by_unprojection = unproject_depth_map_to_point_map(depth_map.squeeze(0), \n                                                                extrinsic.squeeze(0), \n                                                                intrinsic.squeeze(0))\n\n    # 预测轨迹\n    # 选择你要跟踪的点，形状为 (N, 2) 表示一个场景中的 N 个点\n    query_points = torch.FloatTensor([[100.0, 200.0], \n                                        [60.72, 259.94]]).to(device)\n    track_list, vis_score, conf_score = model.track_head(aggregated_tokens_list, images, ps_idx, query_points=query_points[None])\n```\n\n\n此外，如果输入帧中的某些像素不需要参与重建（例如反光表面、天空或水面），你可以简单地将这些像素的值设置为 0 或 1 来屏蔽它们。不需要精确的分割掩码——简单的边界框掩码同样有效（请参阅此 [issue](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F47) 中的示例）。\n\n\u003C\u002Fdetails>\n\n\n## 交互式演示\n\n我们提供了多种方式来可视化你的 3D 重建结果。在使用这些可视化工具之前，请先安装所需的依赖项：\n\n```bash\npip install -r requirements_demo.txt\n```\n\n### 交互式 3D 可视化\n\n**请注意：** VGGT 通常可以在不到 1 秒钟内完成一个场景的重建。然而，由于第三方渲染的原因，3D 点云的可视化可能需要数十秒，这与 VGGT 的处理时间无关。当图像数量较多时，可视化过程会更加缓慢。\n\n\n#### Gradio Web 界面\n\n我们的基于 Gradio 的界面允许你上传图像或视频，运行重建，并在浏览器中交互式地探索 3D 场景。你可以在本地机器上启动该界面，也可以在 [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Ffacebook\u002Fvggt) 上试用。\n\n\n```bash\npython demo_gradio.py\n```\n\n\u003Cdetails>\n\u003Csummary>点击预览 Gradio 交互式界面\u003C\u002Fsummary>\n\n![Gradio Web 界面预览](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_vggt_readme_e6e3f68011ac.png)\n\u003C\u002Fdetails>\n\n\n#### Viser 3D 查看器\n\n运行以下命令可以执行重建并在 Viser 中可视化点云。请注意，此脚本需要一个包含图像的文件夹路径，并且假设该文件夹下仅包含图像文件。你可以通过设置 `--use_point_map` 参数来使用点云分支生成的点云，而不是基于深度图的点云。\n\n```bash\npython demo_viser.py --image_folder path\u002Fto\u002Fyour\u002Fimages\u002Ffolder\n```\n\n## 导出为 COLMAP 格式\n\n我们还支持将 VGGT 的预测结果直接导出为 COLMAP 格式，方法如下：\n\n```bash\n# 仅前向预测\npython demo_colmap.py --scene_dir=\u002FYOUR\u002FSCENE_DIR\u002F\n\n# 带束调整\npython demo_colmap.py --scene_dir=\u002FYOUR\u002FSCENE_DIR\u002F --use_ba\n\n# 使用减少的参数运行带束调整以加快处理速度\n# 将 max_query_pts 从默认的 4096 减少到 2048，将 query_frame_num 从默认的 8 减少到 5\n# 代价是更快的执行速度，但在复杂场景中重建结果可能不够鲁棒（你可以考虑将 query_frame_num 设置为图像总数）\n# 更多带束调整配置选项请参见 demo_colmap.py\npython demo_colmap.py --scene_dir=\u002FYOUR\u002FSCENE_DIR\u002F --use_ba --max_query_pts=2048 --query_frame_num=5\n```\n\n请确保图像存储在 `\u002FYOUR\u002FSCENE_DIR\u002Fimages\u002F` 目录下，该目录应仅包含图像文件。可参考 examples 文件夹中的数据结构示例。\n\n重建结果（相机参数和 3D 点云）将自动保存到 `\u002FYOUR\u002FSCENE_DIR\u002Fsparse\u002F` 目录下，格式符合 COLMAP 标准，如下所示：\n\n``` \nSCENE_DIR\u002F\n├── images\u002F\n└── sparse\u002F\n    ├── cameras.bin\n    ├── images.bin\n    └── points3D.bin\n```\n\n## 与 Gaussian Splatting 集成\n\n\n导出的 COLMAP 文件可以直接用于 [gsplat](https:\u002F\u002Fgithub.com\u002Fnerfstudio-project\u002Fgsplat) 进行 Gaussian Splatting 训练。按照其官方说明安装 `gsplat`（推荐使用 `gsplat==1.3.0`）：\n\n训练模型的示例命令如下：\n```\ncd gsplat\npython examples\u002Fsimple_trainer.py  default --data_factor 1 --data_dir \u002FYOUR\u002FSCENE_DIR\u002F --result_dir \u002FYOUR\u002FRESULT_DIR\u002F\n```\n\n\n\n## 零样本单视角重建\n\n尽管我们的模型从未针对单视角任务进行过训练，但它在单视角重建方面表现出令人惊讶的好性能。该模型无需将单张图像复制成一对，而是可以直接从单张图像的特征中推断出 3D 结构。你可以通过上述演示尝试这一功能，它同样适用于单视角重建。\n\n\n我们并未对单目深度估计性能进行定量测试，但 [@kabouzeid](https:\u002F\u002Fgithub.com\u002Fkabouzeid) 慷慨地提供了 VGGT 与近期方法的对比结果 [此处](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F36)。结果显示，VGGT 在与 DepthAnything v2 或 MoGe 等最先进的单目方法相比时，表现具有竞争力甚至更优，尽管它从未专门针对单视角任务进行过训练。 \n\n\n\n## 运行时间和 GPU 内存\n\n我们在单块 NVIDIA H100 GPU 上对 VGGT 的聚合器模块进行了不同输入规模下的运行时间和 GPU 内存占用基准测试。\n\n| **输入帧数** | 1 | 2 | 4 | 8 | 10 | 20 | 50 | 100 | 200 |\n|:-------------:|:-:|:-:|:-:|:-:|:--:|:--:|:--:|:---:|:---:|\n| **时间 (s)** | 0.04 | 0.05 | 0.07 | 0.11 | 0.14 | 0.31 | 1.04 | 3.12 | 8.75 |\n| **内存 (GB)** | 1.88 | 2.07 | 2.45 | 3.23 | 3.63 | 5.58 | 11.41 | 21.15 | 40.63 |\n\n请注意，这些结果是在使用 Flash Attention 3 的情况下获得的，它比默认的 Flash Attention 2 实现更快，同时几乎保持相同的内存占用。你可以自行编译 Flash Attention 3 以获得更好的性能。\n\n## 研究进展\n\n我们的工作建立在一系列先前研究项目的基础上。如果您有兴趣了解我们的研究是如何演进的，请查看我们之前的工作：\n\n\n\u003Ctable border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n  \u003Ctr>\n    \u003Ctd align=\"left\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fjytime\u002FDeep-SfM-Revisited\">Deep SfM Revisited\u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"white-space: pre;\">──┐\u003C\u002Ftd>\n    \u003Ctd>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"left\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FPoseDiffusion\">PoseDiffusion\u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"white-space: pre;\">─────►\u003C\u002Ftd>\n    \u003Ctd>\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggsfm\">VGGSfM\u003C\u002Fa> ──►\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\">VGGT\u003C\u002Fa>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"left\">\n      \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco-tracker\">CoTracker\u003C\u002Fa>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"white-space: pre;\">──┘\u003C\u002Ftd>\n    \u003Ctd>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n## 致谢\n\n感谢以下优秀的开源项目：[PoseDiffusion](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FPoseDiffusion)、[VGGSfM](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggsfm)、[CoTracker](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fco-tracker)、[DINOv2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fdinov2)、[Dust3r](https:\u002F\u002Fgithub.com\u002Fnaver\u002Fdust3r)、[Moge](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmoge)、[PyTorch3D](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fpytorch3d)、[Sky Segmentation](https:\u002F\u002Fgithub.com\u002Fxiongzhu666\u002FSky-Segmentation-and-Post-processing)、[Depth Anything V2](https:\u002F\u002Fgithub.com\u002FDepthAnything\u002FDepth-Anything-V2)、[Metric3D](https:\u002F\u002Fgithub.com\u002FYvanYin\u002FMetric3D)，以及社区中许多其他令人启发的工作。\n\n## 待办事项\n\n- [x] 发布训练代码\n- [ ] 发布 VGGT-500M 和 VGGT-200M\n\n\n## 许可证\n有关本代码所采用许可证的详细信息，请参阅 [LICENSE](.\u002FLICENSE.txt) 文件。\n\n请注意，只有此 [模型检查点](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B-Commercial) 允许商业使用。该新检查点达到了与原始检查点相同的性能水平（甚至可能略优），例如，在 Co3D 数据集上的 AUC@30 分别为 90.37 和 89.98。","# VGGT 快速上手指南\n\nVGGT (Visual Geometry Grounded Transformer) 是一个前馈神经网络，能够从单张、几张或数百张图像中，在数秒内直接推断场景的关键 3D 属性（包括相机内外参、深度图、点云图和 3D 点轨迹）。\n\n## 环境准备\n\n*   **操作系统**: Linux (推荐), macOS, Windows\n*   **Python**: 3.8+\n*   **GPU**: 支持 CUDA 的 NVIDIA 显卡\n    *   推荐使用 Ampere 架构及以上 (Compute Capability 8.0+) 以启用 `bfloat16` 加速。\n    *   旧款显卡将自动使用 `float16`。\n*   **显存**: 根据输入图像数量而定，处理多视图重建建议显存充足。\n\n## 安装步骤\n\n1.  **克隆仓库**\n    ```bash\n    git clone git@github.com:facebookresearch\u002Fvggt.git \n    cd vggt\n    ```\n\n2.  **安装依赖**\n    使用 pip 安装核心依赖（包含 torch, torchvision, numpy, Pillow, huggingface_hub 等）：\n    ```bash\n    pip install -r requirements.txt\n    ```\n    > **提示**: 如果下载速度慢，可添加国内镜像源加速，例如：\n    > `pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n## 基本使用\n\n以下是最简单的推理示例，加载预训练模型并预测相机参数、深度图和点云。\n\n```python\nimport torch\nfrom vggt.models.vggt import VGGT\nfrom vggt.utils.load_fn import load_and_preprocess_images\n\n# 设置设备\ndevice = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n# 根据 GPU 能力选择精度：Ampere (8.0+) 支持 bfloat16，否则使用 float16\ndtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] >= 8 else torch.float16\n\n# 初始化模型并加载预训练权重\n# 首次运行会自动从 Hugging Face 下载权重 (facebook\u002FVGGT-1B)\nmodel = VGGT.from_pretrained(\"facebook\u002FVGGT-1B\").to(device)\n\n# 加载并预处理图像 (请替换为你的实际图片路径)\nimage_names = [\"path\u002Fto\u002FimageA.png\", \"path\u002Fto\u002FimageB.png\", \"path\u002Fto\u002FimageC.png\"]  \nimages = load_and_preprocess_images(image_names).to(device)\n\n# 执行推理\nwith torch.no_grad():\n    with torch.cuda.amp.autocast(dtype=dtype):\n        # 预测相机、深度图、点云图等属性\n        predictions = model(images)\n\n# predictions 字典中包含 'cameras', 'depth_map', 'point_map' 等结果\n```\n\n### 手动加载权重（可选）\n如果自动下载失败，可手动下载 [model.pt](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B\u002Fblob\u002Fmain\u002Fmodel.pt) 后加载：\n\n```python\nmodel = VGGT()\n_URL = \"https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002FVGGT-1B\u002Fresolve\u002Fmain\u002Fmodel.pt\"\nmodel.load_state_dict(torch.hub.load_state_dict_from_url(_URL))\nmodel.to(device)\n```","某文化遗产保护团队正利用无人机对一座古庙进行数字化重建，需要从数百张航拍照片中快速恢复高精度的 3D 模型。\n\n### 没有 vggt 时\n- **流程繁琐耗时**：必须依赖 COLMAP 等传统多视图几何管线，特征匹配与束调整（Bundle Adjustment）往往需要数小时甚至数天才能完成。\n- **稀疏数据失效**：当无人机拍摄角度重叠度低或纹理缺失时，传统算法极易失败，无法计算出相机位姿，导致重建中断。\n- **参数分离复杂**：相机内参、外参、深度图和点云需分步估算，各环节误差累积严重，最终模型常出现分层或扭曲。\n- **人工干预频繁**：工程师需手动筛选图片、调整参数阈值并修复错误匹配，极大增加了技术门槛和时间成本。\n\n### 使用 vggt 后\n- **秒级端到端推理**：vggt 作为前馈神经网络，能在几秒钟内直接从单张或多张图片中一次性输出所有关键 3D 属性，无需迭代优化。\n- **强鲁棒性处理**：即使面对视角差异大或纹理稀少的“困难”照片，vggt 仍能凭借视觉几何 grounding 能力精准预测相机位姿和深度。\n- **统一属性输出**：同时生成高精度的相机内外参、点图、深度图及 3D 点轨迹，数据一致性高，直接兼容 gsplat 等渲染引擎。\n- **自动化工作流**：支持一键导出 COLMAP 格式文件，彻底免去人工调参和中间步骤修复，让非专家也能轻松完成高质量重建。\n\nvggt 将原本需要数天的复杂 3D 重建流程压缩至秒级，以端到端的智能推理彻底打破了传统几何管线的效率瓶颈。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Ffacebookresearch_vggt_e6e3f680.png","facebookresearch","Meta Research","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Ffacebookresearch_449342bd.png","",null,"https:\u002F\u002Fopensource.fb.com","https:\u002F\u002Fgithub.com\u002Ffacebookresearch",[82,86],{"name":83,"color":84,"percentage":85},"Python","#3572A5",99.9,{"name":87,"color":88,"percentage":89},"Shell","#89e051",0.1,12808,1414,"2026-04-10T02:09:43","NOASSERTION","未说明","需要 NVIDIA GPU (代码中检查 torch.cuda.is_available)。bfloat16 精度需要 Ampere 架构及以上 (算力 8.0+, 如 A100, H100)，否则使用 float16。显存需求取决于输入图像数量，基准测试基于 NVIDIA H100 进行，未明确最低显存要求，但处理多视图 3D 重建通常建议大显存。",{"notes":97,"python":94,"dependencies":98},"1. 首次运行会自动从 Hugging Face 下载模型权重 (约 1B 参数)，需确保网络通畅或手动下载。2. 交互式 3D 可视化 (Gradio\u002FViser) 需额外安装 requirements_demo.txt 中的依赖。3. 若需导出 COLMAP 格式或使用高斯泼溅 (Gaussian Splatting)，需分别安装对应工具链 (如 gsplat==1.3.0)。4. 商业使用需申请特定的 'VGGT-1B-Commercial' 检查点许可，默认检查点仅限非商业用途。",[99,100,101,102,103],"torch","torchvision","numpy","Pillow","huggingface_hub",[15,105],"其他","2026-03-27T02:49:30.150509","2026-04-10T15:54:56.078776",[109,114,119,124,129,134,138],{"id":110,"question_zh":111,"answer_zh":112,"source_url":113},27740,"如何处理长视频（超过 100-200 帧）的相机轨迹估计？是否会受到内存限制？","可以通过增量创建子地图（submaps）的方式处理任意数量的帧，每个子地图的大小大致恒定（根据是否添加额外帧进行闭环检测会有所变化）。这种方法不受内存限制约束。相关代码和讨论可以在 VGGT-SLAM 仓库中找到：https:\u002F\u002Fgithub.com\u002FMIT-SPARK\u002FVGGT-SLAM","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F37",{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},27741,"微调后模型无法重建任何场景，且训练损失出现异常，可能是什么原因？","主要原因可能是默认配置文件开启了调试模式（debug flag 设为 True），导致仅使用了特定类别（如\"apple\"）的数据进行训练。此外，需关注 train_loss_conf_depth 指标，收敛后该值应为负数（通常在 -0.6 到 -0.8 之间表示性能合理）。如果该值过早变负或震荡，可能意味着训练不稳定。维护者已更新默认配置以修复此问题。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F290",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},27742,"如果不希望归一化真实值（GT）数据集，如何将获得的点云恢复至 GT 世界坐标系？","用户常遇到此问题，即在场景尺度归一化后难以还原坐标。虽然具体还原代码未在评论中直接给出，但建议在处理户外数据集（如 TartanAir）时务必进行有效掩码（valid masking），以排除天空等无效区域对尺度计算的干扰，从而减少归一化带来的误差。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F64",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},27743,"使用 VGGT 导出的 COLMAP 格式位姿进行高斯溅射（GS）优化时，为何 PSNR 会比原始 COLMAP 位姿低 1-2 dB？","这种差异通常不是由分辨率引起的，因为转换到原生分辨率时仅内参发生变化，外参（特别是平移尺度）应保持不变。一种可能的原因是：相机的内外参已恢复到原始分辨率，但点云的尺度仍是基于 518 分辨率推断的，导致可视化或优化时的尺度不匹配。建议检查点云尺度与相机轨迹尺度的一致性。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F79",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},27744,"在 Re10k 数据集上复现姿态估计时，AUC@30 结果（约 0.74）低于论文预期或与 Co3D 结果（约 0.88）差距较大，原因是什么？","性能差距可能源于以下因素：1. Re10k 测试集分割中包含的部分序列 YouTube 链接已失效，导致可用数据量减少（如仅有 1756 个序列而非 1832 个）；2. 帧采样策略不同（例如随机采样 10 帧可能与官方评估策略不一致）；3. 其他实现细节被忽略。建议核对数据完整性及采样逻辑。","https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fvggt\u002Fissues\u002F45",{"id":135,"question_zh":136,"answer_zh":137,"source_url":133},27745,"官方评估代码（用于姿态估计和 MVS）何时发布？","维护者表示正在准备代码的公开发布，并正在进行审批流程，预计将在 4 周内可用。获取官方评估代码有助于确保基准测试的准确性，避免因实现不当而低估模型性能。",{"id":139,"question_zh":140,"answer_zh":141,"source_url":123},27746,"在 ScanNet++ 数据集上进行训练时，场景尺度归一化的具体实现逻辑是什么？","归一化过程包括三步：1. 将所有相机位姿（c2w）和 3D 点转换到第一个相机的坐标系下；2. 计算所有有效 3D 点到原点的欧几里得距离均值作为场景尺度（scene_scale）；3. 利用该尺度对相机平移量和 3D 点进行归一化。需注意在处理过程中保留有效掩码（valid_mask）以排除无效点。",[]]