Skip to content

Add DUSt3R stereo method - #12

Merged
nburrus merged 1 commit into
migrate-to-uvfrom
add-dust3r
May 10, 2026
Merged

Add DUSt3R stereo method#12
nburrus merged 1 commit into
migrate-to-uvfrom
add-dust3r

Conversation

@nburrus

@nburrus nburrus commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds stereodemo/method_dust3r.py — a minimal PyTorch inference adapter for DUSt3R (CVPR 2024), using a self-contained local port of the ViT-Large encoder + cross-attention decoder + DPT/linear head (no dependency on the official DUSt3R package)
  • Adds stereodemo/dust3r_lib/ — minimal inference code adapted from ibaiGorordo/dust3r-pytorch-inference-minimal (CC BY-NC-SA 4.0)
  • Supports the 512-dpt and 224-linear checkpoints (~2.3 GB each, downloaded on first use); non-commercial only
  • Scale recovery: estimates DUSt3R's implicit focal length from the left point map and the predicted baseline from the right point map (rectified-pair assumption), then computes pixel disparity as f_dust3r × b_dust3r / Z_dust3r — avoids using the user's calibrated focal length in PnP, which would bias the scale

Test plan

  • uv run stereodemo datasets → DUSt3R appears in the method list
  • 512-dpt checkpoint downloads on first use and produces a plausible coloured point cloud
  • uv run python tests/test_methods.py TestStereoInference.test_dust3r passes (skips if checkpoint not cached)
  • No regression in other methods (test_bm, test_sgbm, test_crestereo, etc.)

🤖 Generated with Claude Code

Vibe-coded with codex & claude
@nburrus
nburrus merged commit b3eac90 into migrate-to-uv May 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant