SAM 3D Body

SAM 3D Body is Meta's promptable model for recovering a full-body 3D mesh, including hands and feet, from a single image and person boxes. LibreYOLO wraps the upstream package rather than porting it.

Tasks
mesh
Sizes
d3, h at 512 px
Install
pip install libreyolo
Support tier
Inference only, since v. Predict, validate and export only. Training features do not apply.
Upstream
SAM 3D Body by Meta Platforms, Inc., SAM License (not OSI-approved). Paper, source
Licenses
Code MIT, weights SAM License (not OSI-approved). Commercial use

Install

bash
pip install libreyolo

That gives you LibreYOLO's adapter only. SAM 3D Body itself is not bundled, because its license is not one LibreYOLO's own code may be derived from: clone the upstream repository and install its dependencies yourself, then point LibreYOLO at the clone.

bash
git clone https://github.com/facebookresearch/sam-3d-bodypip install roma einops yacs omegaconf braceexpand pytorch-lightning timm
python
from libreyolo.models.sam3dbody import LibreSAM3DBody model = LibreSAM3DBody(    None,    size="d3",    sam_3d_body_path="/path/to/sam-3d-body",    device="cuda",)

or set the SAM_3D_BODY_PATH environment variable instead of passing sam_3d_body_path on every call. A user who never constructs this family never triggers the import, and never encounters the SAM License. This family is not wired into the LibreYOLO() factory or the libreyolo predict CLI command; LibreSAM3DBody is the only entry point.

Predict

Python
from libreyolo import SAMPLE_IMAGEfrom libreyolo.models.sam3dbody import LibreSAM3DBody # This family is not registered with the LibreYOLO() factory, so it# is constructed directly. model_path=None is what triggers the# gated Hugging Face download; a string is instead treated as an# existing local checkpoint path and is never fetched automatically.# Inference requires a CUDA device; there is no CPU path.model = LibreSAM3DBody(None, size="d3", device="cuda")result = model(SAMPLE_IMAGE, person_boxes=[[34, 12, 220, 400]]) meshes = result.meshesprint(meshes.vertices.shape)    # (N, V, 3), camera frame, metersprint(meshes.joints3d.shape)    # (N, J, 3)
With a person detector
from libreyolo import LibreYOLO, SAMPLE_IMAGEfrom libreyolo.models.sam3dbody import LibreSAM3DBody # No named-string shortcut here: pass a constructed LibreYOLO# detector, a plain callable, or a PersonDetector instance.detector = LibreYOLO("LibreRFDETRn.pt")model = LibreSAM3DBody(None, size="d3", device="cuda") result = model(SAMPLE_IMAGE, person_detector=detector)

The checkpoint download is gated: it requires accepting Meta's license on the Hugging Face model page and authenticating with hf auth login before the first download succeeds. Inference itself needs a CUDA device unconditionally: the upstream estimator moves its batch to the GPU without checking, so a CPU-only machine raises rather than falling back. result.meshes is a Meshes payload, row-aligned with result.boxes (one row per detected person): vertices and joints3d are metric and already include the estimated camera translation, joints2d is in pixels on the original image, and rotations follow MHR's convention, Euler angles rather than axis-angle. See prediction for sources, streaming and result handling.

Variants

Two backbones behind the same MHR body model: d3 uses a DINOv3 ViT-H/16+ encoder, and h uses the original ViT-H encoder.

Export

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
meshmesh to ONNX: not supportedmesh to TorchScript: not supportedmesh to ExecuTorch: not supportedmesh to TensorRT: not supportedmesh to OpenVINO: not supportedmesh to Paddle: not supportedmesh to MNN: not supportedmesh to RKNN: not supportedmesh to ncnn: not supportedmesh to TFLite: not supportedmesh to CoreML: not supportedmesh to Core AI: not supported

Body-mesh export is not implemented: LibreYOLO has not yet defined an exported-graph contract for the mesh task, including how to represent the MHR parameter layout outside PyTorch.

Checkpoints

Every published weight file for this family.

FileInput (px)Weights license
mesh
LibreSAM3DBodyd3-mesh.pt512other
LibreSAM3DBodyh-mesh.pt512other

Every file above exists in the LibreYOLO org today and downloads on first use.

Licensing

Check the license on the Hugging Face repository of the specific weights you download. Every checkpoint in the LibreYOLO org carries one, and they are not always the same across a family. That repository is the authoritative source; the summary below describes what applied when this page was last verified.

This is a description of the licenses involved, not legal advice. If the answer matters commercially, read the licenses yourself and take your own counsel.

Original work
SAM 3D Body, Meta Platforms, Inc.
Upstream license
SAM License (not OSI-approved)
LibreYOLO code
MIT
Weights
SAM License (not OSI-approved), republished at huggingface.co/LibreYOLO
Interpretation
The SAM License is not one OSI recognizes as open source. Meta can amend its terms unilaterally, disclaims all warranty and liability, forbids reverse engineering the SAM Materials, and forbids any use touching military or warfare purposes, nuclear applications, espionage, weapons, or other export-controlled ends. It does not forbid commercial use outright, but a litigation clause ends your license the moment you sue Meta over the SAM Materials, so read it yourself before shipping a product on it. LibreYOLO wraps Meta's package rather than porting its code: none of it is vendored, it is an optional dependency the user installs themselves, and a user who never touches the mesh task never encounters these terms. The checkpoints are mirrored byte-identically behind the same Hugging Face access gate Meta uses, so accepting the license happens on Meta's own model page. LibreYOLO's own adapter code is MIT. The body model the checkpoints drive, MHR (Momentum Human Rig), is Meta's separate Apache-2.0 release and is fetched at runtime from its own public repository rather than mirrored.

The body model the checkpoints drive, MHR (Momentum Human Rig), is a separate Meta release under Apache-2.0. LibreYOLO fetches its TorchScript asset from MHR's own public release at runtime and caches it locally; that file is not mirrored by LibreYOLO and carries its own Apache-2.0 terms, not the SAM License.

Citation

@article{yang2026sam3dbody,
  title={SAM 3D Body: Robust Full-Body Human Mesh Recovery},
  author={Yang, Xitong and Kukreja, Devansh and Pinkus, Don and Sagar, Anushka and Fan, Taosha and Park, Jinhyung and Shin, Soyong and Cao, Jinkun and Liu, Jiawei and Ugrinovic, Nicolas and Feiszli, Matt and Malik, Jitendra and Dollar, Piotr and Kitani, Kris},
  journal={arXiv preprint arXiv:2602.15989},
  year={2026}
}

Copied from the authors' citation block at github.com/facebookresearch/sam-3d-body#citing-sam-3d-body.

Verified against LibreYOLO v1.5.0. Support tables, checkpoints and benchmark numbers on this page are generated from the released library and the published weights, not written by hand.