MVSAnywhere
MVSAnywhere (Niantic): depth of a reference view from several posed images, for any scene type. Non-commercial licence.
stable Fork of nianticlabs/mvsanywhere@5bd49bb · backends: portable, kernels
- Paper MVSAnywhere: Zero-Shot Multi-View Stereo CVPR 2025 · first released 28 Mar 2025
Checkpoint mvsanywhere
Paper 2025 Added in 0.1.0 Evaluated with 0.2.0
Use it
pip install fastforks Lean install with only what this model needs: pip install "fastforks-core[nc]"
from fastforks import multiview
model = multiview.load("mvsanywhere") # kernels on a supported GPU, else portable PyTorch
result = model(images)
result.depth # also: mask, sky, depth_range
result.backend # what ran: mode, device, dtype, kernels The weights are non-commercial: fastforks downloads them only with FASTFORKS_NONCOMMERCIAL=1 set.
fastforks bench mvsanywhere Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.
Speed and memory
Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.
Input: synthetic, 448x672
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 273 | 0.80× | 1,441 MiB/1,500 MiB | 15.2 | 1.05 |
| Original fp16torch.autocast(float16) around the call | fp16 | 219 | – | 1,504 MiB/1,576 MiB | 3.2 | 1.04 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 93.2 | 2.3× | 931 MiB/1,226 MiB | 1.9 | 0.22 |
| Kernels | fp16 | 35.2 | 6.2× | 702 MiB/760 MiB | 1.8 | 0.48 |
| Portable + torch.compile | 70.8 | 3.1× | 818 MiB/860 MiB | 153 (build) | – | |
| TensorRTplanned for 0.2.1 | fails | – | – | – | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-03 to 2026-11-12. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two
times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.
Other devices
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14 | Original | fp32 | cannot run here | – | 448x672 | |
| Portable | fp16 | 1064 | 3,801 MiB process | matches | 448x672 | |
| Portable | fp32 | 1051 | 3,534 MiB process | matches | 448x672 | |
| Kernels | fp16 | not implemented | – | 448x672 | ||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 126 | 847 MiB/948 MiB | – | 448x672 |
| Kernels | fp16 | 73.2 | 744 MiB/780 MiB | – | 448x672 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 59.2 | 847 MiB/968 MiB | – | 448x672 |
| Kernels | fp16 | 29.3 | 996 MiB/1,060 MiB | – | 448x672 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 111 | 847 MiB/948 MiB | – | 448x672 |
| Kernels | fp16 | 71.9 | 786 MiB/840 MiB | – | 448x672 | |
| NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 57.8 | 847 MiB/948 MiB | – | 448x672 |
| Kernels | fp16 | 56.9 | 1,004 MiB/1,140 MiB | – | 448x672 | |
| NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 23.6 | 871 MiB/988 MiB | – | 448x672 |
| Kernels | fp16 | 12.5 | 1,134 MiB/1,180 MiB | – | 448x672 | |
CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.
Licence and weights
Non-commercial only
- Code
- LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 LICENSELICENSE-antialiased-cnns.md
- Weights
- LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (assumed from code)(not stated by the authors; assumed to follow the code) source
- Training data
- Synthetic data per the paper (arXiv 2411.14390): Hypersim, TartanAir, BlendedMVG, MatrixCity, VKITTI2, Dynamic Replica, MVS-Synth, SAIL-VOS 3D; DINOv2 / Depth Anything V2 initialisation
- code: LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (noncommercial)
- weights: LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (assumed from code)
- weights licence not stated by the original authors; assumed to be the code licence
- Niantic's non-commercial licence covers the code and the checkpoint; the BlurPool stem comes from Adobe's antialiased-cnns (CC-BY-NC-SA-4.0).
Our reading of the licences, not legal advice.
Weights
mvsanywhere_hero.ckpt 2.4 GB· hosted on Google Drivefastforks downloads and checks these files on first use (fastforks download mvsanywhere). Non-commercial weights need FASTFORKS_NONCOMMERCIAL=1.
Accuracy
The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.
DTU scans 1
9, 24, 33, 75, view 24 + 7 sources, AbsRel / delta1 %
| Run | dtype | AbsRel ↓ | δ1.25 % ↑ | MAE mm ↓ | Δ AbsRel vs fp32 original | scans | ms / scan |
|---|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.0077 | 99.82 | 5.57 | reference | 5 | 315 |
| Original fp16 | fp16 | 0.0110 | 99.84 | 7.85 | −0.0033 | 5 | 233 |
| Portable fp32 | fp32 | 0.0077 | 99.82 | 5.57 | ±0.0000 | 5 | 236 |
| Portable | fp16 | 0.0078 | 99.82 | 5.60 | −0.0001 | 5 | 115 |
| Kernels | fp16 | 0.0077 | 99.82 | 5.59 | ±0.0000 | 5 | 44.2 |
640x512 crops, the 7 most co-visible views as sources; GT = depth rendered from the structured-light points. AbsRel / delta1 over GT pixels, after per-image median scaling unless the model takes the cameras (calibrated MVS: cameras, error in mm; PatchMatchNet also the depth range 425-935 mm, MVSAnywhere its own range from the camera baselines). Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 555d7b79, 2026-11-06.
Closeness to the original
Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.1 % and p99 <= 0.5 % of the reference's median |value| (absolute error of the output depth).
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0.002 (relative) | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.001 (relative) | 0.00005 (relative) |
| GPU default dtypes, p99 |diff| | ≤ 0.005 (relative) | 0.00023 (relative) |
Recorded for mvsanywhere on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-12, with these kernels: cudnn_hacccutlass_convdpt_fusedfastbbigevmvsanywhere
Details
MVSAnywhere (Izquierdo et al. 2025): zero-shot multi-view stereo, the depth of a reference view from posed, calibrated source views. A view-agnostic MLP cost volume (warped matching features + camera metadata, softmax over the views) is encoded by a DINOv2 ViT-B fused with a second DINOv2's image features and decoded by a DPT head; the depth range comes from the camera baselines and is refined once.
- Input / output
- Input: several images of one scene (posed and calibrated for multi-view stereo, unposed otherwise). Output: depth maps and, where the model predicts them, cameras and 3-D points.
- Input size
- any H x W >= 1, resized or padded inside the model; tested up to 3000x4000 (3,110 MiB allocated)
- Options
long_side=640>= 64· changes the outputrefinement_steps=1>= 0· changes the output
- Outputs
depth,mask,sky(on request),depth_range(on request)- CUDA kernels
fastbbfast backbone kernels: flash attention, window attention, instance norm and rotary embeddings for ViT and similar backbonesigevIGEV stereo: convolution epilogues, correlation lookups, GRU gatescutlass_convCUTLASS convolutions with the recurrent update (GRU) fused incudnn_haccconvolutions with fp16 accumulation (cuDNN)mvsanywhereMVSAnywhere: fused cost-volume MLPdpt_fusedfused fp16 matrix multiplies and convolutions for DINOv2 backbones and DPT depth heads
- Apple (MPS)
- fp32, fp16
Full reference, generated from the repository
MVSAnywhere (Niantic): depth of a reference view from several posed images, for any scene type. Non-commercial licence.
Commercial use: no (code: LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (noncommercial); weights: LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (assumed from code)).
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
mvsanywhere | synthetic (448x672) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 273 219 93.2 35.2 70.8 planned for 0.2.1 | 1441 / 1500 1504 / 1576 931 / 1226 702 / 760 818 / 860 – |
Details
- Original code: https://github.com/nianticlabs/mvsanywhere at
5bd49bb - Code licence: LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (noncommercial); files:
LICENSE,LICENSE-antialiased-cnns.md - Weights licence: LicenseRef-noncommercial AND CC-BY-NC-SA-4.0 (assumed from code)
- Licence evidence: https://github.com/nianticlabs/mvsanywhere/blob/5bd49bb/LICENSE and README.md (the checkpoint is published under the repository's licence)
- Training data: Synthetic data per the paper (arXiv 2411.14390): Hypersim, TartanAir, BlendedMVG, MatrixCity, VKITTI2, Dynamic Replica, MVS-Synth, SAIL-VOS 3D; DINOv2 / Depth Anything V2 initialisation
- Licence note: Niantic's non-commercial licence covers the code and the checkpoint; the BlurPool stem comes from Adobe's antialiased-cnns (CC-BY-NC-SA-4.0).
- Options:
long_side= 640 (>= 64),refinement_steps= 1 (>= 0) - Kernel libraries:
fastbb,igev,cutlass_conv,cudnn_hacc,mvsanywhere,dpt_fused - Variants:
mvsanywhere - Not in this release (planned for 0.2.1):
mvsanywhereTensorRT export: TensorRT produces all-NaN depth and sky maps in both FP16 and FP32 - Outputs: depth, mask, sky (in
extras), depth_range (inextras); kind:metric - Input size: any H x W >= 1, resized or padded inside the model
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
mvsanywhere3000x4000 (3.0 GiB peak allocated, 4.2 reserved) mvsanywhere448x672, first call: portable + torch.compile 153 s (cold Inductor cache).mvsanywhereoriginal 448x672: torch.autocast(float16) around the callmvsanywhereload / first call: original 3.21 s / 1.037 s (448x672), portable 1.88 s / 0.221 s (448x672), kernels 1.76 s / 0.48 s (448x672)- Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls
Measured
640x512 crops, the 7 most co-visible views as sources; GT = depth rendered from the structured-light points. AbsRel / delta1 over GT pixels, after per-image median scaling unless the model takes the cameras (calibrated MVS: cameras, error in mm; PatchMatchNet also the depth range 425-935 mm, MVSAnywhere its own range from the camera baselines). Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
mvsanywhere | DTU scans 1, 9, 24, 33, 75, view 24 + 7 sources, AbsRel / delta1 % / MAE mm | 0.0077 / 99.82 / 5.57 | 0.0110 / 99.84 / 7.85 | 0.0078 / 99.82 / 5.60 | 0.0077 / 99.82 / 5.57 | 0.0077 / 99.82 / 5.59 |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 555d7b79, 2026-11-06.
Parity
CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.1 % and p99 <= 0.5 % of the reference's median |value| (absolute error of the output depth).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
mvsanywhere | 5e-05 / 0.00023 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120, igev@f075827d68c6:sm_120, mvsanywhere@7fdcb3aafdd8:sm_120 |
Example output
One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).
Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).