MapAnything (fastforks)

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).

This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: https://github.com/kleinicke/fastforks. Kernels for the kernels backend: https://huggingface.co/fastforks/kernels. Original code: https://github.com/facebookresearch/map-anything at 3d10cf7.

Author weight repos: https://huggingface.co/facebook/map-anything-apache.

Task: multiview. Tier: stable. Outputs: depth, confidence, mask, world_points, intrinsics, cam_to_world, metric_scale. Backends: portable, kernels.

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.

Variants

Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.

variant weights (author link) SHA-256 weights licence commercial use
mapanything-apache@1 model.safetensors fa06c0fdccef Apache-2.0 yes

Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0. Licence files: LICENSE.

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.

Licence evidence: https://github.com/facebookresearch/map-anything/blob/3d10cf7/LICENSE and https://huggingface.co/facebook/map-anything-apache/blob/00f9c245bbcb60522d1ed7f9e9d88462c6e3f38a/README.md

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)

Speed and memory

Multiview, synthetic

model input time (ms): original fp32 original portable kernels kernels speed-up: vs original vs portable peak memory (MiB, allocated / reserved): original portable kernels
mapanything-apache 336x518 2875 1967 636 544 3.6x 1.2x 10227 / 10952 3697 / 4092 3697 / 4072

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
mapanything-apache 6.12 (336x518) 2.89 (336x518) 0.57โ€  (336x518) 2.62 (336x518) 0.66 (336x518) 0.54 (336x518)

torch.compile and TensorRT

model input time: portable compile TensorRT fp16 kernels preparation: compile (cold first call) ONNX + engine build peak MiB (alloc / reserved): portable compile kernels TensorRT (engine + torch)
mapanything-apache 336x518 636 ms 596 ms 367 ms 544 ms 46.2 s 137 s 3697 / 4092 3347 / 3792 3697 / 4072 6220 / 6248

Fixed-size speed and peak memory, all models

model mode 480x640 720x1280 1080x1920 12 MP 3000x4000
mapanything-apache portable 680.9 ms / 3914 / 5848 493.1 ms / 3635 / 5196 498.1 ms / 3846 / 5442 734.6 ms / 7240 / 9442
mapanything-apache kernels 569.7 ms / 3914 / 5846 415.3 ms / 3635 / 5196 419.9 ms / 3846 / 5442 622.3 ms / 7240 / 9440

Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).

Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or (fp32) where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.

Accuracy

On public datasets

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 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.0876 / 93.23

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06.

Parity with the original code

Every variant is checked against reference outputs of the original code at its pinned commit. 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).

Usage

from fastforks import multiview

model = multiview.load("mapanything-apache")  # mode="auto": the preferred backend from recorded measurements
result = model(["view0.jpg", "view1.jpg", "view2.jpg"])  # the views of one scene, no cameras needed
result.depth  # [V, H, W] float32 tensor; result.kind says what the maps mean
result.backend  # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')

Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: mapanything-apache.

Kernels backend

multiview.load("mapanything-apache", mode="kernels") runs our CUDA kernels (fastbb). It needs a prebuilt kernel for your GPU architecture (downloaded from https://huggingface.co/fastforks/kernels on first use) and a recent NVIDIA driver; if there is none it raises BackendUnavailableError with the reason and never falls back silently. mode="auto" picks kernels when it can run and logs the choice.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for fastforks/mapanything

Finetuned
(2)
this model

Collection including fastforks/mapanything