SAM 3D Body DINOv3: Promptable 3D Human Mesh Recovery

Meta's SAM 3D Body DINOv3 (3DB-DINOv3) pairs an 840M-parameter DINOv3 image encoder at 512x512 resolution with a promptable decoder over the Momentum Human Rig (MHR). It recovers full-body, hand, and foot 3D meshes from a single RGB image while accepting auxiliary 2D keypoint and segmentation mask prompts.
SAM 3D Body DINOv3: Promptable 3D Human Mesh Recovery: Meta's SAM 3D Body DINOv3 (3DB-DINOv3) pairs an 840M-parameter DINOv3 image encoder at 512x512 resolution with a promptable decoder over the Momentum Human Rig (MHR). It recovers full-body, hand, and foot 3D meshes from a single RGB image while accepting auxiliary 2D keypoint and segmentation mask prompts. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Decoupled Momentum Human Rig (MHR): Separates skeletal joint kinematics from soft-tissue surface shape for cleaner interpretability than coupled SMPL weights.
- 840M DINOv3 Backbone: Encodes 512x512 inputs alongside off-the-shelf camera FOV intrinsics (e.g., MoGe-2) for metric-consistent depth placement.
- SAM-Style Auxiliary Prompting: Accepts optional 2D keypoints and masks to disambiguate occluded limbs, overlapping people, or wrist orientation.
- Unified Body, Hands, and Feet: Outputs body_pose_params, hand_pose_params, shape_params, 3D vertices, and projected 2D/3D keypoints in one pass.
- Strong Out-of-Domain Generalization: Beats CameraHMR, PromptHMR, and NLF-L+fit across 3DPW, EMDB, and COCO.
import { createAgent } from "@smoke-monkey/harness";const spatialAgent = createAgent({agentId: "sam-3d-body-dinov3-worker",provider: "ollama",model: "qwen2.5-coder:14b",workspacePath: process.cwd(),permissions: {read_file: "allow",write_file: "allow",run_command: "ask",},});async function runMeshRecoveryAgent() {const result = await spatialAgent.run("Check Hugging Face access for facebook/sam-3d-body-dinov3, run demo.py " +"on inputs/frames/ with model.ckpt and assets/mhr_model.pt, and export " +"pred_vertices, pred_keypoints_3d, and body_pose_params JSON per subject.");console.log("[3D Mesh Agent] Output:", result.summary);}runMeshRecoveryAgent().catch(console.error);
Watch: Related Video Guides
How to Create 3D Models with AI using Meta SAM 3D (2026 Full Guide)
Introducing SAM 3D: a New Standard for 3D Object & Human Reconstruction from a Single Image
What Is SAM 3D Body DINOv3? MHR Decoupling & Promptable Architecture
SAM 3D Body DINOv3 (facebook/sam-3d-body-dinov3) is Meta Superintelligence Labs' single-image full-body 3D human mesh recovery (HMR) model. Built on an 840M-parameter DINOv3 visual encoder and a promptable encoder-decoder, it estimates 3D pose and shape for the body, hands, and feet using the Momentum Human Rig (MHR), a parametric mesh representation that decouples skeletal structure from surface shape.
Traditional HMR models couple bone lengths and tissue shape inside SMPL blend shapes, making wrist alignment and extreme articulations brittle. By splitting MHR skeleton rig parameters (body_pose_params, hand_pose_params) from surface shape_params, and accepting optional 2D keypoint or mask prompts at inference, 3DB handles heavy occlusion and ambiguous camera angles. An external FOV estimator such as MoGe-2 supplies camera intrinsics when exact focal length is unknown.
3D Mesh Recovery Benchmarks: 3DPW, EMDB, RICH, and COCO
Evaluated by mapping predicted MHR meshes to SMPL topology (lower is better for millimeter MPJPE, PA-MPJPE, and PVE; higher is better for 2D [email protected]), both 3DB-H (632M ViT-H) and 3DB-DINOv3 (840M DINOv3) outperform single-image baselines and match or surpass temporal video baselines:
| Model | 3DPW PA-MPJPE ↓ | 3DPW MPJPE ↓ | EMDB PA-MPJPE ↓ | EMDB MPJPE ↓ | EMDB PVE ↓ | RICH PA-MPJPE ↓ | COCO [email protected] ↑ |
|---|---|---|---|---|---|---|---|
| 3DB-DINOv3 (Ours) | 33.8 | 54.8 | 38.2 | 61.7 | 72.5 | 30.9 | 86.5 |
| 3DB-H (Ours) | 33.2 | 54.8 | 38.5 | 62.9 | 74.3 | 31.9 | 86.8 |
| NLF-L+fit (trained on RICH) | 33.6 | 54.9 | 40.9 | 68.4 | 80.6 | 28.7 | 74.9 |
| PromptHMR | 36.1 | 58.7 | 41.0 | 71.7 | 84.5 | 37.3 | 79.2 |
| CameraHMR | 35.1 | 56.0 | 43.3 | 70.3 | 81.7 | 34.0 | 80.5 |
| WHAM (video baseline) | 35.9 | 57.8 | 50.4 | 79.7 | 94.4 | — | — |
| HMR2.0b | 54.3 | 81.3 | 79.2 | 118.5 | 140.6 | 48.1 | 86.1 |
On out-of-domain EMDB, 3DB-DINOv3 drops PVE to 72.5 mm (vs. 80.6 mm for NLF-L+fit and 94.4 mm for video WHAM) and reaches 0.737 / 0.988 accuracy metrics alongside 67.8 LSPET [email protected] without training on EMDB or RICH.
Downloading Checkpoints & Running Full-Body Inference in Python
Because facebook/sam-3d-body-dinov3 is gated under the Meta sam-license on Hugging Face, authenticate via hf auth login after accepting license terms on the model card, then run either the CLI demo or Python estimator:
# 1. Clone SAM 3D Body and download gated DINOv3 checkpoint + MHR rig
git clone https://github.com/facebookresearch/sam-3d-body.git && cd sam-3d-body
hf download facebook/sam-3d-body-dinov3 --local-dir checkpoints/sam-3d-body-dinov3
# 2. Batch-process a folder of images into 3D mesh renders and parameters
python demo.py \
--image_folder ./input_images \
--output_folder ./mesh_outputs \
--checkpoint_path ./checkpoints/sam-3d-body-dinov3/model.ckpt \
--mhr_path ./checkpoints/sam-3d-body-dinov3/assets/mhr_model.ptFor programmatic integration inside an agent tool server, load the estimator directly from Hugging Face:
import cv2
import numpy as np
from notebook.utils import setup_sam_3d_body
from tools.vis_utils import visualize_sample_together
estimator = setup_sam_3d_body(hf_repo_id="facebook/sam-3d-body-dinov3")
img_bgr = cv2.imread("pose_sample.jpg")
outputs = estimator.process_one_image(cv2.cvtColor(img_bgr, cv2.COLOR_BGR2RGB))
# outputs[i] exposes pred_vertices, pred_keypoints_3d, pred_cam_t, focal_length,
# body_pose_params, hand_pose_params, and shape_params
rend_img = visualize_sample_together(img_bgr, outputs, estimator.faces)
cv2.imwrite("output_mesh.jpg", rend_img.astype(np.uint8))Wiring Promptable 3D Mesh Recovery into MCP Spatial Agents
In robotics, biomechanics screening, and digital character rigging, unprompted pose estimators often misalign wrists or swap occluded subjects in multi-person frames. Wrapping setup_sam_3d_body behind a local MCP tool lets an upstream VLM or SAM mask detector pass explicit 2D bounding masks and wrist keypoints as auxiliary prompts.
Inside Smoke Monkey Harness, a spatial inspection agent can detect low-confidence hand joints from pred_keypoints_2d, prompt 3DB-DINOv3 with refined hand coordinates, and stream clean MHR parameters to Blender, Isaac Sim, or functional movement screening pipelines.
Camera Intrinsics Matter for Metric Scale
When focal_length metadata is missing from EXIF headers, pair SAM 3D Body DINOv3 with an FOV estimator like MoGe-2 so pred_cam_t depth translation remains physically accurate.
Frequently Asked Questions
Q:What is the difference between 3DB-H and 3DB-DINOv3?
3DB-H uses a 632M-parameter ViT-H encoder, whereas 3DB-DINOv3 uses an 840M-parameter DINOv3 encoder at 512x512 resolution. 3DB-DINOv3 achieves lower out-of-domain error on EMDB (61.7 mm MPJPE and 72.5 mm PVE vs. 62.9 mm and 74.3 mm for 3DB-H).
Q:What is the Momentum Human Rig (MHR) used in SAM 3D Body?
MHR is Meta's parametric human mesh representation that decouples skeletal joint structure from soft-tissue surface shape, improving joint interpretability and hand-wrist accuracy compared to coupled SMPL models.
Q:What outputs does SAM 3D Body DINOv3 return per detected person?
Each person dictionary includes pred_vertices, pred_keypoints_3d, pred_keypoints_2d, pred_cam_t, focal_length, body_pose_params, hand_pose_params, and shape_params.
Q:How do I access facebook/sam-3d-body-dinov3 on Hugging Face?
The checkpoint is manually gated under the Meta SAM License. Submit the access form on the Hugging Face repository page, authenticate locally via hf auth login, and download with hf download facebook/sam-3d-body-dinov3.
Q:Can SAM 3D Body refine predictions when limbs or hands are occluded?
Yes. Similar to SAM segmentation models, 3DB accepts auxiliary 2D keypoint and mask prompts to guide wrist alignment and recover occluded limbs.
Related Alternatives & Comparisons
Google Antigravity Alternative: Free Model-Neutral Agent + Canvas (2026)
Claude Code Runtime Alternative: Open Source Stdio MCP Agent Harness
LangChain TypeScript Alternative: Zero Dependencies & Deterministic Loops
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.