SAM 3D Body - TorchScript conversion for VeloMocap

The whole SAM 3D Body pipeline traced as one TorchScript module, plus the MHR topology tables VeloMocap renders it with. Commercial use is allowed by the SAM License; the licence text must travel with the files.

Files

File Size SHA-256
sam3d_full_b8_ts.pt 3.3 GB 88ca5d6e2daaf132d1e9cc26b152f0e0aa2941ed58738f5cf3c290086c8c79d4
sam3d_body_b8_ts.pt 3.1 GB 07db1c511c80ad5861f60c232f6bb1b4a4f039071e3625a01c59de8a6ae14622
sam3d_full_ts.pt 3.3 GB 476d31ee0a26f1140ffc5fd44b3e64fc7ace8da4d112a3164bff8c5f5d16d9f6
sam3d_faces.bin 432.1 KB f6748e290ef37fbb6877c4cc5bd7287105db9e98252b0ba170ae9ac3c45eacd6
sam3d_keypoints.bin 6.4 KB 532b75ddb6e1650be033b80f79545eeb54eaf05298cef0bd63b9bc36e72fc4e6
sam3d_skeleton.bin 2.0 KB bf8080b0d21e9b2469cd1b84c62da475ec560ef9743341a011aac57bc90f61e9
sam3d_mesh.json 325.0 B 04430bf3908a102f3130d660a0eed32cb6da4e53cec10d9707f0e35fbecd4e3c

Upstream

What changed

  • Traced from model.ckpt and assets/mhr_model.pt by tools/torch/sam3d_full_jit.py: backbone, both hands, fusion and the MHR geometry in one graph, fp32.
  • sam3d_full_b8_ts.pt is the same graph traced at --batch 8: one call reconstructs up to eight people, which is what the reference does (its flow_sam.py passes every box of a frame at once and its flow_fast_sam.py batches up to sixteen frames). VeloMocap prefers it on a card with 10 GB or more and falls back to sam3d_full_ts.pt below that.
  • sam3d_body_b8_ts.pt is --hands body --batch 8: one body pass, no hand crops. VeloMocap runs it on the frames whose hand features are interpolated from a neighbour, which is the reference's video default (mocap/flow_hand_sampling.py: hands every fourth frame, body every frame).
  • The MHR tables were dumped by tools/onnx/dump_mesh.py.
  • Nothing was retrained, fine-tuned or pruned.

Verified

Largest vertex difference 1.5e-5 m against the PyTorch reference (fp32); keypoints and camera within 1e-3. The batch-8 graph reproduces the batch-1 graph to 7.7e-7 per item.

How to use

Drop the files into models/sam3d/ of a VeloMocap install, a VeloMocap checkout or packaged install. Model weights are not part of the source repository.

Licence

SAM License - the text is in LICENSE, reproduced verbatim from the upstream repository, and it governs these files. This repository is a conversion, i.e. a derivative work of that model; see NOTICE.md for which files were made here.

Loaded by LibTorch, not by ONNX Runtime. The ONNX export of this model exists in the development tree but is not used by the release and is not published here.

Disclaimer

Converted and published by VeloMocap contributors, not by the upstream authors. No warranty.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support