Models · Multi-view depth

MapAnything

MapAnything (Meta): metric 3D reconstruction (cameras and depth) from several unposed images in one pass. Commercially usable (Apache variant).

stable Fork of facebookresearch/map-anything@3d10cf7 · backends: portable, kernels

Checkpoint mapanything-apache

Paper 2025 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 544 ms 336x518, fp16
vs the faster original 3.6× original fp16: 1967 ms
Peak memory 3,697 MiB original: 10,227 MiB
Accuracy vs original fp32 −0.0001 kernels AbsRel, DTU scans 1 (0.0875 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import multiview

model = multiview.load("mapanything-apache")  # kernels on a supported GPU, else portable PyTorch
result = model(images)
result.depth  # also: confidence, mask, world_points, intrinsics, cam_to_world, metric_scale
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench mapanything-apache

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, 336x518

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32float32 (the authors' autocast off)fp32 28750.68×8,064 MiB/8,672 MiB0.72.88
Original fp16original default MapAnything.infer(use_amp=True, amp_dtype='bf16')fp16 1967–10,227 MiB/10.7 GiB6.12.62
Portable fp32fp32not measured ––––
Portablefp16 6363.1×3,697 MiB/4,092 MiB2.90.66
Kernelsfp16 5443.6×3,697 MiB/4,072 MiB0.60.54
Portable + torch.compile 5963.3×3,347 MiB/3,792 MiB46 (build)–
TensorRT fp16fp16 3675.4×3,880 MiBenginenot comparable137 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-03. 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. 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

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12Originalfp328492 10.9 GiB processmatches336x518
Portablefp166369 7,218 MiB processmatches336x518
Portablefp327357 11.4 GiB processmatches336x518
Kernelsfp16not implemented–336x518
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16631 3,623 MiB/3,992 MiB–336x518
Kernelsfp16626 3,623 MiB/3,992 MiB–336x518
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16185 3,623 MiB/3,992 MiB–336x518
Kernelsfp16179 3,623 MiB/3,992 MiB–336x518
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16488 3,623 MiB/3,992 MiB–336x518
Kernelsfp16483 3,623 MiB/3,992 MiB–336x518
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16183 3,623 MiB/3,992 MiB–336x518
Kernelsfp16170 3,623 MiB/3,992 MiB–336x518
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp1696.5 3,647 MiB/3,992 MiB–336x518
Kernelsfp1697.6 3,647 MiB/4,030 MiB–336x518

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

Commercial use allowed

Code
Apache-2.0 LICENSE
Weights
Apache-2.0 source
Training data
The apache variant is trained on the subset of the paper's 13 datasets whose licences allow commercial use (README 'Models'; the exact list is in the paper). The CC-BY-NC facebook/map-anything checkpoint is not packaged.
  • The map-anything-apache weights are Apache-2.0, but the repository does not list the datasets they were trained on (the paper names the commercially usable subset), so their training-data terms are unclear here.
  • The CC-BY-NC facebook/map-anything checkpoint is not packaged.

Our reading of the licences, not legal advice.

Weights

model.safetensors 4.9 GB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download mapanything-apache).

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 %

RundtypeAbsRel ↓δ1.25 % ↑Δ AbsRel vs fp32 originalscansms / scan
Original fp32fp320.087593.23 reference 5 3316
Original fp16bf160.087793.22 −0.0002 5 2200
Portable fp32fp320.087593.23 ±0.0000 5 3247
Portablefp160.087593.23 ±0.0000 5 729
Kernelsfp160.087693.23 −0.0001 5 614

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, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 30c7a8e9, 2026-11-17.

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| <= 1 % and p99 <= 5 % of the reference's median |value| (absolute error of the output depth).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 (relative)not recorded
cpu_mask_mismatch≤ 0.0001 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.01 (relative)0.00022 (relative)
GPU default dtypes, p99 |diff|≤ 0.05 (relative)0.00072 (relative)

Recorded for mapanything-apache on RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-31, with these kernels: fastbb

Details

MapAnything (Keetha et al. 2025): metric multi-view reconstruction from unposed images in one forward pass. DINOv2 ViT-g/14 features per view, 16 alternating global / per-view attention blocks with a metric-scale token, a DPT head (ray directions, depth along the ray, confidence, non-ambiguity) and pose / scale heads. Images only (the original code's optional geometric inputs are not supported). Apache-2.0 code and weights (the map-anything-apache checkpoint).

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 (7,240 MiB allocated)
Options
  • long_side=518>= 14· changes the output
Outputs
depth, confidence, mask, world_points, intrinsics, cam_to_world, metric_scale(on request)
CUDA kernels
  • fastbbfast backbone kernels: flash attention, window attention, instance norm and rotary embeddings for ViT and similar backbones
Apple (MPS)
fp32, fp16
Full reference, generated from the repository

MapAnything (Meta): metric 3D reconstruction (cameras and depth) from several unposed images in one pass. Commercially usable (Apache variant).

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
mapanything-apachesynthetic (336x518)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
2875
1967
636
544
596
367
8064 / 8672
10227 / 10952
3697 / 4092
3697 / 4072
3347 / 3792
6220 / 6248
Details
  • Original code: https://github.com/facebookresearch/map-anything at 3d10cf7
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
  • Licence evidence: https://github.com/facebookresearch/map-anything/blob/3d10cf7/LICENSE and https://huggingface.co/facebook/map-anything-apache/blob/00f9c245bbcb60522d1ed7f9e9d88462c6e3f38a/README.md
  • Training data: The apache variant is trained on the subset of the paper's 13 datasets whose licences allow commercial use (README 'Models'; the exact list is in the paper). The CC-BY-NC facebook/map-anything checkpoint is not packaged.
  • Licence note: The map-anything-apache weights are Apache-2.0, but the repository does not list the datasets they were trained on (the paper names the commercially usable subset), so their training-data terms are unclear here.
  • Licence note: The CC-BY-NC facebook/map-anything checkpoint is not packaged.
  • Options: long_side = 518 (>= 14; also resolution)
  • Kernel libraries: fastbb
  • Variants: mapanything-apache
  • Outputs: depth, confidence, mask, world_points, intrinsics, cam_to_world, metric_scale (in extras); 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): mapanything-apache 3000x4000 (7.1 GiB peak allocated, 9.2 reserved)
  • mapanything-apache 336x518, first call: portable + torch.compile 46 s (cold Inductor cache), TensorRT fp16 137 s (ONNX + engine).
  • mapanything-apache original (fp32) 336x518: float32 (the authors' autocast off)
  • mapanything-apache original 336x518: original default MapAnything.infer(use_amp=True, amp_dtype='bf16')
  • mapanything-apache load / first call: original 6.12 s / 2.619 s (336x518), portable 2.89 s / 0.657 s (336x518), kernels 0.57† s / 0.541 s (336x518)
  • † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
  • 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.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
mapanything-apacheDTU scans 1, 9, 24, 33, 75, view 24 + 7 sources, AbsRel / delta1 %0.0875 / 93.230.0877 / 93.220.0875 / 93.230.0875 / 93.230.0876 / 93.23

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 30c7a8e9, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 5 % of the reference's median |value| (absolute error of the output depth).

variantkernels error vs original, mean / p99GPU, torchkernels used
mapanything-apache0.00022 / 0.00072RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d: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).

View 1
View 2
Output
Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), view 1
View 1 · 100%

Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).