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
- Paper MapAnything: Universal Feed-Forward Metric 3D Reconstruction 3DV 2026 · first released 16 Sept 2025
Checkpoint mapanything-apache
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
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
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32float32 (the authors' autocast off) | fp32 | 2875 | 0.68× | 8,064 MiB/8,672 MiB | 0.7 | 2.88 |
| Original fp16original default MapAnything.infer(use_amp=True, amp_dtype='bf16') | fp16 | 1967 | – | 10,227 MiB/10.7 GiB | 6.1 | 2.62 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 636 | 3.1× | 3,697 MiB/4,092 MiB | 2.9 | 0.66 |
| Kernels | fp16 | 544 | 3.6× | 3,697 MiB/4,072 MiB | 0.6 | 0.54 |
| Portable + torch.compile | 596 | 3.3× | 3,347 MiB/3,792 MiB | 46 (build) | – | |
| TensorRT fp16 | fp16 | 367 | 5.4× | 3,880 MiBenginenot comparable | 137 (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
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12 | Original | fp32 | 8492 | 10.9 GiB process | matches | 336x518 |
| Portable | fp16 | 6369 | 7,218 MiB process | matches | 336x518 | |
| Portable | fp32 | 7357 | 11.4 GiB process | matches | 336x518 | |
| Kernels | fp16 | not implemented | – | 336x518 | ||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 631 | 3,623 MiB/3,992 MiB | – | 336x518 |
| Kernels | fp16 | 626 | 3,623 MiB/3,992 MiB | – | 336x518 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 185 | 3,623 MiB/3,992 MiB | – | 336x518 |
| Kernels | fp16 | 179 | 3,623 MiB/3,992 MiB | – | 336x518 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 488 | 3,623 MiB/3,992 MiB | – | 336x518 |
| Kernels | fp16 | 483 | 3,623 MiB/3,992 MiB | – | 336x518 | |
| NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 183 | 3,623 MiB/3,992 MiB | – | 336x518 |
| Kernels | fp16 | 170 | 3,623 MiB/3,992 MiB | – | 336x518 | |
| NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 96.5 | 3,647 MiB/3,992 MiB | – | 336x518 |
| Kernels | fp16 | 97.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 Facefastforks 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 %
| Run | dtype | AbsRel ↓ | δ1.25 % ↑ | Δ AbsRel vs fp32 original | scans | ms / scan |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.0875 | 93.23 | reference | 5 | 3316 |
| Original fp16 | bf16 | 0.0877 | 93.22 | −0.0002 | 5 | 2200 |
| Portable fp32 | fp32 | 0.0875 | 93.23 | ±0.0000 | 5 | 3247 |
| Portable | fp16 | 0.0875 | 93.23 | ±0.0000 | 5 | 729 |
| Kernels | fp16 | 0.0876 | 93.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).
| Check | Tolerance | Measured |
|---|---|---|
| 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.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
mapanything-apache | synthetic (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; alsoresolution) - 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-apache3000x4000 (7.1 GiB peak allocated, 9.2 reserved) mapanything-apache336x518, first call: portable + torch.compile 46 s (cold Inductor cache), TensorRT fp16 137 s (ONNX + engine).mapanything-apacheoriginal (fp32) 336x518: float32 (the authors' autocast off)mapanything-apacheoriginal 336x518: original default MapAnything.infer(use_amp=True, amp_dtype='bf16')mapanything-apacheload / 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.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
mapanything-apache | DTU scans 1, 9, 24, 33, 75, view 24 + 7 sources, AbsRel / delta1 % | 0.0875 / 93.23 | 0.0877 / 93.22 | 0.0875 / 93.23 | 0.0875 / 93.23 | 0.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).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
mapanything-apache | 0.00022 / 0.00072 | RTX 5060 Ti, torch 2.14.1+cu130 | fastbb@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).
Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).