SAM3DBody-cpp 开源单目多人三维骨骼重建与 BVH 导出引擎
SAM3DBody-cpp 是面向 Meta SAM 3D Body 技术的开源 C++ 推理引擎,可从图像、视频或摄像头估计多人三维姿态、手指关节和身体形状,并为每人导出可导入 Blender 的 BVH 动作文件。项目还支持 MPEG Avatar Representation Format,CUDA 模型包约 5.2GB;CPU 推理较慢,多人遮挡、交叉和手指重建可能影响结果。
SAM3DBody-cpp 将单目多人动作重建接入 BVH 和 Blender 工作流,并明确列出遮挡、手指细节与 CPU 速度限制。
🎬 A single camera can now reconstruct multiple people as 3D skeletons, including their hands, and export the motion directly to BVH for Blender.
Meet SAM3DBody-cpp, an open-source C++ inference engine for Meta's SAM 3D Body technology.
Unlike the original Python-based research pipeline, this implementation is designed to run as a standalone C++ application.
And it produces animation data that can actually be imported into 3D software.
🧠 What does it reconstruct?
From an image, video, or webcam, the system can estimate:
▪️ 3D body pose.
▪️ Hand and finger articulation.
▪️ Camera-relative body translation.
▪️ Body shape parameters.
▪️ A full-body mesh.
▪️ 70 body and hand keypoints.
▪️ Separate skeletons for multiple people.
The generated body geometry contains approximately 18,439 vertices.
🎮 BVH export for animation
One of the most useful capabilities is multi-person BVH generation.
For each detected person, the application can export a separate motion file.
For example:
person_0.bvh
person_1.bvh
The pipeline also attempts to maintain character identity between frames through bounding-box tracking.
Bone lengths are adapted to the estimated proportions of each person.
The resulting animation can be imported into Blender or other tools supporting BVH.
🔬 What's under the hood?
The pipeline combines:
▪️ YOLO for detecting people.
▪️ DINOv3 for visual features.
▪️ An ONNX pose decoder.
▪️ ggml for lightweight prediction heads.
▪️ Native C++ linear blend skinning.
A refined-pose option performs additional passes over the hands and wrists to improve articulation.
📦 More than BVH
The project also supports exporting MPEG Avatar Representation Format containers.
Unlike BVH, these can contain a base avatar representation with mesh and skinning information alongside animation data.
💻 Hardware requirements
The standard CUDA model package is approximately 5.2GB.
A CPU-compatible model configuration is also available, but the developers warn that the large visual backbone is extremely slow without GPU acceleration.
On a modern CPU, a single backbone inference may take 5–15 seconds.
Linux supports live visualization.
Windows currently supports headless command-line processing and offline motion export, but not the same native live overlay viewer.
⚠️ Limitations
Multi-person tracking relies on relatively simple image-based association and may struggle with occlusions or people crossing paths.
Finger reconstruction can also require extra refinement.
The model and its dependencies retain their respective license restrictions.
Why is this useful?
For indie developers and animators, even imperfect monocular motion capture can provide a starting point for character animation.
Instead of manually blocking out every pose, you can reconstruct a movement from video and refine it inside Blender.
💻 github.com/AmmarkoV/SAM3DBody…
🤗 huggingface.co/AmmarkoV/SAM3D…
#MotionCapture #Blender3D #ComputerVision #OpenSource
来源:CuteGuy☣️ · x.com
