Visionary-Laboratory/LoopVGGT
Sobre
LoopVGGT: Official implementation of "Training-Free Looped Vision Geometry Transformers"
IA e aprendizado de máquinaCrescimento medido de estrelas
- em 24 h
- Coletando histórico
- em 7 dias
- Coletando histórico
- em 15 dias
- Coletando histórico
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalLoopVGGT: Training-Free Looped Vision Geometry Transformers
Overview
Can a pretrained vision geometry transformer improve its predictions by spending more computation on the same input views? We introduce LoopVGGT, a training-free framework that replays a contiguous block window with damped updates during inference while preserving each backbone's native computation graph. Each pass moves the features partway toward the window's output, so the next pass starts from an updated representation.
We evaluate looping in 5 models across 9 benchmarks for camera pose estimation, depth estimation, and 3D reconstruction. Averaged across benchmarks, looping improves camera pose AUC for all five models and reconstruction F1 for all four models. For example, looping raises MapAnything’s pose AUC@3° by 5.82 points on ETH3D, reduces Pi3’s absolute relative depth error by 3.5% on Sintel, and improves VGGT’s reconstruction F1 by 6.64 points on HiRoom.
Key Results
Cross-benchmark aggregate gains over each model's unlooped baseline (dashed inner hexagon, 0) using one fixed shared configuration per model across nine benchmarks.
Qualitative 3D reconstruction comparisons (input reference, raw, and loop). Left group (top to bottom): VGGT (HiRoom), Pi3 (DTU), MapAnything (ScanNet++). Right group (top to bottom): VGGT (HiRoom), DA3 (DTU), VGGT-Ω (DTU).
Supported models
| Model | Loop window | K | Updated tokens | Anchor β |
|---|---|---|---|---|
| VGGT | [5, 8] | 4 | All | 0 |
| Pi3 | [4, 8] | 3 | All | 0 |
| Depth Anything 3 Giant 1.1 | [6, 6] | 3 | All | 0 |
| MapAnything | [2, 3] | 2 | All, including the scale token | 0 |
| VGGT-Ω 1B/512 | [8, 9] | 4 | Patch tokens | 0.125 |
Indices are zero-based and include both endpoints. VGGT, Pi3 and VGGT-Ω count native attention pairs; DA3 and MapAnything count physical blocks. DA3's selected block is in its single-view stage. MapAnything's window contains one global/frame pair. K counts total window evaluations, including the first pass, so looping adds K−1 evaluations of that window.
The configuration file is configs/main.json. The implementations also include the paired intermediate-feature update described in the method.
Installation
Use Linux and a CUDA-capable NVIDIA GPU with bfloat16 support. All five models share the Python 3.12 loopvggt environment. GPU memory requirements depend on the model and number of input views; full benchmark evaluation retains the paper's input counts.
conda env create -f environment.yml
conda activate loopvggt
python scripts/setup_dependencies.py
python scripts/check_environment.py
See installation and checkpoint instructions for pinned dependencies, system libraries and offline setup, including a fresh uv installation that keeps the environment and caches under one directory. Upstream model implementations are fetched at fixed revisions and retain their own licenses.
Run a simple demo
Try the paper’s VGGT loop ([5, 8], K = 4) on two bundled demo scenes:
python scripts/download_checkpoints.py --model vggt
python demo/run.py --scene backpack # DyCheck backpack (10 views, depth)
python demo/run.py --scene terrains # ETH3D terrains (42 views, 3D reconstruction & pose)


See demo/README.md for output files, metrics, and dataset attribution.
Try your own images
Start with a few views of one scene:
python scripts/demo.py --model vggt --images /path/to/images --mode both --output-dir outputs/demo-vggt
A directory is read in filename order; alternatively pass an ordered list of image paths. Raw and loop predictions are saved separately as exports/mini_npz/results.npz. Outputs contain depth, camera poses and model-specific geometry fields. This example needs RGB images only and does not compute benchmark metrics.
Reproduce the main tables
Download weights with python scripts/download_checkpoints.py --model all for the full evaluation, or replace all with a single model name. Prepare the datasets following the dataset instructions. The runtime configuration fixes the evaluated scenes, frame selection, input order and preprocessing. Model weights and datasets are downloaded separately.
Preview the exact tasks and commands without loading any model:
python scripts/reproduce.py --model vggt --mode both --data-root /path/to/benchmarks --dry-run
Run the raw baseline and the main loop configuration:
python scripts/reproduce.py --model vggt --mode both --data-root /path/to/benchmarks --output-dir results
Replace vggt with pi3, da3, mapanything or vggt-omega. To run all five models sequentially on the same GPU:
python scripts/reproduce.py --model all --mode both --data-root /path/to/benchmarks --output-dir results
Select a benchmark with --dataset, repeating the flag for multiple benchmarks. For a dataset with one evaluation task, such as HiRoom, a small benchmark smoke test can select one scene:
python scripts/reproduce.py --model vggt --dataset hiroom --scene 20241230/828738/cam_sampled_08 --mode both --data-root /path/to/benchmarks --output-dir results
Scene-subset outputs are placed under results/smoke/. Full runs write to results/MODEL/raw/ and results/MODEL/loop/. Existing task outputs are reused only when their saved run identity and validated metric files agree. Use a new output directory when changing weights, inputs or settings.
--checkpoint overrides a single model's checkpoint, and --checkpoints-dir changes the root for all default checkpoint paths. DA3 and MapAnything require a directory containing both config.json and model.safetensors. --device cuda:0 selects the visible GPU. Intermediate predictions are removed after each task attempt, including failed attempts, unless --keep-artifacts is supplied.
Evaluation coverage
| Dataset | VGGT / Pi3 / DA3 / MapAnything | VGGT-Ω |
|---|---|---|
| HiRoom | Pose, reconstruction | — |
| ETH3D | Pose, reconstruction, depth | Pose, depth |
| DTU | Pose, reconstruction | — |
| 7Scenes | Pose, reconstruction, depth | Pose, depth |
| NRGBD | Pose, depth | Pose, depth |
| ScanNet++ | Pose, reconstruction | — |
| DyCheck | Pose, depth | Pose, depth |
| Sintel | Pose, depth | Pose, depth |
| TUM-Dynamic | Pose, depth | Pose, depth |
ETH3D reconstruction requires complete GT-depth support. The dataset instructions describe generation of that support from the official data. Missing required data are reported explicitly.
Collect generated metrics
After a full run:
python scripts/summarize.py --model all --output-dir results --require-complete --output results/main_metrics.csv
The CSV contains unrounded native values and values scaled to the paper's table units. Each full-suite model has 39 metric cells per mode; VGGT-Ω has 24. Missing cells stay empty and cause --require-complete to fail. For a partial run, choose its model and omit that flag. Camera/depth accuracy and F1 are reported as percentages in paper_value; distances retain the per-dataset table convention.
Compare with the paper
Paper reference values list the printed main-table values and their units. After a complete run, compare the generated measurements:
python scripts/compare_paper.py --output-dir results --output results/paper_comparison.csv
The report includes every measured value, reference value and signed difference.
Missing cells and differences at the paper's printed precision cause a nonzero
exit status. Small last-digit differences can still be consistent with successful
reproduction; the comparison notes explain evaluation
variation and how to report it. For partial-run diagnostics, use --allow-incomplete.
Code layout
looped_inference/: damped updates, native attention-pair handling and intermediate-feature updates.model_adapters/: model-specific preprocessing and geometry-output adapters.scripts/reproduce.py: public main-table entry point.scripts/run_*benchmark*.py: model inference and evaluation protocols.configs/: main configurations, upstream revisions and benchmark input selection.docs/: installation, dataset preparation and reproduction instructions.
Development checks
python -m pytest tests looped_inference
python scripts/reproduce.py --model all --dry-run
These checks cover configuration dispatch, result collection and loop correctness on small reference networks. Full benchmark reproduction is a separate GPU check with the prepared datasets and pretrained checkpoints.
License and acknowledgements
Original LoopVGGT code is released under the MIT License. Pretrained weights and upstream code retain their respective terms; see third-party notices. The repository builds on VGGT, Pi3, Depth Anything 3, MapAnything, VGGT-Ω and their evaluation tools.
Explore projetos relacionados
Carregando…