CLUE: 3D human meshes with per-vertex uncertainty
Closed-form, per-vertex uncertainty for 3D faces and bodies, and for SAM 3D Body in three lines of code.
Megh Shukla1 · Edo Collins2 · Prashanth Chandran2 · Karel Petránek2 · Sergio Orts-Escolano2 · Mathieu Salzmann1,3 · Alexandre Alahi1
1EPFL 2Google 3Waabi
CLUE colours every vertex of its mesh by how uncertain it is, from blue (certain) to red (uncertain).
CLUE maps the variance of a 3D morphable model's parameters to the variance of every vertex of its mesh, in closed form. This does not require sampling or computing expensive Jacobians. CLUE is accurate and computationally efficient for real time inference. Not only does CLUE make uncertainty visually interpretable, it also improves accuracy in comparison to deterministic and architecture agnostic unimodal baselines.
For every person in an image, the models in this repository predict the MHR body mesh and a variance for its pose and shape parameters, which CLUE turns into an uncertainty for each of the mesh's 18,439 vertices.
Two models, one repository
| file | what it is | use it when | |
|---|---|---|---|
| SAM 3D Body (CLUE) | sam3dbody_clue.safetensors, 6 MB | a variance head trained on top of Meta's released SAM 3D Body, which stays unchanged | you already run SAM 3D Body and want uncertainty for the meshes you already get |
| CLUE | clue.safetensors, 51.8 M parameters | SAM 3D Body's architecture with its decoder and heads trained with CLUE | you want the model trained with CLUE, as in the demo |
Quick start: uncertainty for your SAM 3D Body
The plugin adds SAM 3D Body (CLUE) to Meta's sam-3d-body code. Meshes, keypoints and cameras do not change; each person gets a per-vertex uncertainty on top.
pip install "git+https://github.com/vita-epfl/CLUE.git#subdirectory=ITW/inference/plugin"
from sam3dbody_clue import SAM3DBodyCLUE
clue = SAM3DBodyCLUE(model) # once, after load_sam_3d_body(...)
outputs = estimator.process_one_image(image, bboxes=boxes, inference_type="body")
clue.annotate(outputs) # adds outputs[i]["vertex_sigma_cm"], per-vertex standard deviation in cm
The head's weights are downloaded from this repository on first use. The repository is gated with automatic approval so please accept its terms once and log in with hf auth login. The gate exists to ensure that users comply with SAM 3D Body's license too. The plugin is tested with sam-3d-body at commit b5c765a, which is the latest commit as of the time of writing.
Run CLUE
- In the browser: the demo runs SAM 3D Body and CLUE side by side on your images and videos.
- Locally: the inference code runs SAM 3D Body, SAM 3D Body (CLUE) and CLUE on images, videos and folders:
python run.py --input my_video.mp4 --output results.
Results
| Training images | Per-vertex uncertainty | 3DPW MPJPE / PA-MPJPE / PVE / PA-PVE | EMDB MPJPE / PA-MPJPE / PVE / PA-PVE | |
|---|---|---|---|---|
| SAM 3D Body | 3.8M | ✗ | 56.0 / 35.1 / 67.1 / 47.2 | 63.2 / 38.2 / 74.7 / 47.1 |
| CLUE | 1.2M | ✓ | 55.8 / 34.5 / 66.4 / 46.7 | 64.9 / 39.7 / 77.0 / 49.0 |
Errors in mm (lower is better) on the 3DPW test split (35,515 people) and EMDB 1 (24,117 frames); PVE is pelvis-aligned. All rows come from our evaluation pipeline: the same people, boxes and camera intrinsics, and the same fit of the MHR mesh to SMPL. SAM 3D Body is Meta's released checkpoint run through this pipeline (its body branch, without the second-stage hand decoder), so it differs from the numbers reported by Meta. SAM 3D Body (CLUE) leaves SAM 3D Body's meshes unchanged, so its errors are those of SAM 3D Body.
What this repository contains
| file | content |
|---|---|
clue.safetensors | the tensors CLUE training produced: SAM 3D Body's decoder and heads (317 tensors) and the variance head (6 tensors); 51.8 M parameters |
config.json | the two settings of the variance head, and checksums of the Meta files it builds on |
sam3dbody_clue.safetensors | SAM 3D Body (CLUE): the variance head (6 tensors) for the released SAM 3D Body |
It does not contain the DINOv3 backbone or the MHR head constants. CLUE training kept both frozen at the values of Meta's SAM 3D Body release, so they are loaded from facebook/sam-3d-body-dinov3 (gated; SAM License) and these weights are put on top, by the inference code or clue_space/model.py in the demo Space.
Model details
- Architecture: SAM 3D Body (DINOv3-H+ backbone, promptable decoder, MHR head) plus a variance head on the decoder's pose token.
- Training: the decoder, heads and variance head were trained from scratch on SAM 3D Body's frozen DINOv3 backbone, on SA-1B and on the SAM 3D Body annotations of COCO, MPII and the 3DPW training split. SAM 3D Body (CLUE)'s head was trained on top of the frozen released model.
- Inference input: a person box in an image and the camera intrinsics (the demo uses focal length = image diagonal).
Licence and attribution
These weights build on Meta's SAM 3D Body and are released under the SAM License (LICENSE). If you use them, please link to this page and cite the paper. CLUE's code (GitHub, demo) is released under the BSD-3-Clause-Clear License, which grants no patent rights. The MHR rig is Apache 2.0 and the DINOv3 backbone is under the DINOv3 License. Training data: SA-1B, and the SAM 3D Body annotations of COCO, MPII and 3DPW (3DPW is for non-commercial research).
Citation
@misc{shukla2026modelinguncertaintypropagation3d,
title={Modeling Uncertainty Propagation in 3D Morphable Models},
author={Megh Shukla and Edo Collins and Prashanth Chandran and Karel Petránek and Sergio Orts-Escolano and Mathieu Salzmann and Alexandre Alahi},
year={2026},
eprint={2610.24646},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2610.24646},
}