laplace-live/persona-flowhmr
About
LAPLACE Persona low latency monocular full body tracking with FlowHMR
AI & Machine LearningWhat you can do
- Live Camera (--source camera): Low-latency webcam capture on a dedicated reader thread resampled onto FlowHMR's exact 30.0 Hz clock, with thread-safe hot-swapping across multiple live camera devices.
- Debug Video (--source video): Plays any .mp4/.mkv/.mov (24/25/30/60 fps) resampled on the fly to 30.0 Hz without offline FFmpeg pre-transcoding, with seamless looping and side-by-side Live (t = now) vs Latency-Synced (t = now - Δ) preview feeds.
- Restores real/video camera distance, azimuth, elevation, roll, target, and vertical FOV (--camera-fov calibrated lens FOV or auto intrinsics with within-shot optical zoom tracking) in real time without VGGT-Omega by fusing SAM 3D Body PerspectiveHead metric depth + 3D joint Kabsch alignment with background optical-flow visual odometry (camera_R).
- Automatically detects hard multi-camera shot cuts (<0.15 ms/frame) and handles live webcam device switches, clamping sliding-window context to the active shot, anchoring world avatar heading across cuts, and snapping 60 Hz camera playout cleanly without swooping.
Measured star growth
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalpersona-flowhmr
Standalone external single-camera mocap app for LAPLACE Persona, running buffered sliding-window FlowHMR (YOLOX-L + SAM 3D Body Lite + HunyuanMotionMMDiT) with smooth 30 / 60 Hz SLERP playout over VMC (OSC/UDP) and Persona Plugin API (WebSocket).
Features
- Dual Input Modes (Unified 30.0 Hz Sampler):
- Live Camera (
--source camera): Low-latency webcam capture on a dedicated reader thread resampled onto FlowHMR's exact 30.0 Hz clock, with thread-safe hot-swapping across multiple live camera devices. - Debug Video (
--source video): Plays any.mp4/.mkv/.mov(24/25/30/60 fps) resampled on the fly to 30.0 Hz without offline FFmpeg pre-transcoding, with seamless looping and side-by-side Live (t = now) vs Latency-Synced (t = now - Δ) preview feeds.
- Live Camera (
- Dynamic 6-DoF Camera Tracking (
--camera-tracking/--no-camera-tracking):- Restores real/video camera distance, azimuth, elevation, roll, target, and vertical FOV (
--camera-fovcalibrated lens FOV or auto intrinsics with within-shot optical zoom tracking) in real time withoutVGGT-Omegaby fusingSAM 3D BodyPerspectiveHeadmetric depth + 3D joint Kabsch alignment with background optical-flow visual odometry (camera_R). - Automatically detects hard multi-camera shot cuts (<0.15 ms/frame) and handles live webcam device switches, clamping sliding-window context to the active shot, anchoring world avatar heading across cuts, and snapping 60 Hz camera playout cleanly without swooping.
- Restores real/video camera distance, azimuth, elevation, roll, target, and vertical FOV (
- RTX PRO 6000 Blackwell Accelerated (
triton-windows+torch.compile):- Batched BF16
YOLOX-L(416x416stride-2 with linear bbox interpolation, ~1.3 ms/frame) + loop-aware onlineByteTrackstabilizer. - Compiled BF16
SAM 3D Body Litewith GPU ray-conditioning, keypoints-only MHR fast path, configurable decoder depth (3/4/6layers), andhand_mode(offin-distribution neutral hands ~6.5 ms/frame effective,fast2-layer hands, orfull6-layer hands). - Compiled TF32
FlowHMR460M MMDiT sliding-window Euler ODE solver (~28–40 ms @ 4–6 steps) with algebraically phase-locked batching (0idle cadence stalls across infinite video loops), antipodal SLERP overlap crossfading, and continuoussrv_xzhorizontal root velocity integration. - Zero dependency on gated
smplh/neutral/model.npzorfacebook/VGGT-Omega.
- Batched BF16
- Dual Persona Integration:
- VMC over UDP (
127.0.0.1:39539): Atomic OSC 1.0#bundledatagrams containing/VMC/Ext/Root/Pos, all 52 SMPL-H body + finger humanoid bones (/VMC/Ext/Bone/Pos), optionally/VMC/Ext/Cam(Unity camera position, quaternion, FOV), and/VMC/Ext/OKat constant 30 or 60 Hz (1 ms Windows timer resolution). - Persona Plugin API (
ws://127.0.0.1:25034): Authenticates via Bearer token, runssession.identify, auto-creates/enables Persona'svmctracking source (tracking.addSource,pose.setEnabled), binds the primary VRM avatar (instance.setTrackingSources), optionally syncs dynamic 3D stage camera (scene.patch -> vrmCamerawith single-slot in-flight coalescing), and optionally injects Live2DFaceAngleX/Y/Z&ParamBodyAngleX/Y/Z(param.inject).
- VMC over UDP (
Latency Presets (RTX PRO 6000 Blackwell · Co-Resident with LAPLACE Persona)
| Preset | Window [H + S + O + L] |
ODE Steps | SAM Mode | End-to-End Playout Latency |
|---|---|---|---|---|
ultra_low |
38 + 6 + 2 + 2 = 48 |
4 |
Stride 3 · 3-Layer Body (hand_mode=off) |
~0.80 s |
low (default) |
44 + 9 + 3 + 4 = 60 |
5 |
Stride 3 · 3-Layer Body (hand_mode=off) |
~1.05 s |
balanced |
48 + 12 + 4 + 6 = 70 |
6 |
Stride 3 · 4-Layer Body + 2-Layer Fast Hands | ~1.45 s |
high |
60 + 15 + 6 + 10 = 91 |
10 |
Stride 5 · Full 6-Layer Body + Hands | ~2.15 s |
max |
60 + 20 + 8 + 28 = 116 |
16 |
Stride 5 · Full 6-Layer Body + Hands | ~3.20 s |
Setup (uv · Git Bash)
Managed with uv (pyproject.toml + uv.lock, including explicit CUDA 12.8 pytorch-cu128 wheel routing and triton-windows).
- Sync the locked environment and check GPU / checkpoint status:
cd /d/Git/persona-flowhmr uv sync uv run persona-flowhmr status - Download any missing checkpoints (automatically pulls
facebook/sam-3d-body-dinov3from ModelScope with SHA256 verification):uv run persona-flowhmr setup
Usage (Git Bash)
1. External App Control & Preview Web UI
cd /d/Git/persona-flowhmr
uv run persona-flowhmr serve --port 7865
Open http://127.0.0.1:7865 to switch between Live Camera and Debug Video (including native system file browsing), adjust latency presets (0.80s–3.20s), configure Hand Mode (auto/off/fast/full) and YOLOX resolution (416/640), toggle 30 / 60 FPS and Mirror, configure VMC / Persona Plugin API, and view synchronized live + playout HUD previews.
2. Headless CLI (Debug Video or Live Camera -> Persona)
# Low-latency (~1.05s) debug dance video -> VMC UDP 39539 + Persona Plugin API auto-setup
uv run persona-flowhmr run \
--source video \
--video "D:/Git/persona/references/dancing girl [2E2okJyQyZI].mp4" \
--preset low \
--fps 60 \
--plugin-api \
--plugin-token "<YOUR_PERSONA_TOKEN>"
# Live webcam (device 0) with selfie mirror enabled
uv run persona-flowhmr run --source camera --camera 0 --preset low --fps 60 --mirror
3. Export avatar and camera motion
To export a complete video, specify one or more destinations. The CLI solves the video once, including its final partial window, and writes the selected tracks at 30 Hz.
uv run persona-flowhmr export --video "dance.mp4" \
--avatar output/dance.vrma --avatar output/dance.fbx \
--avatar output/dance.vmd --camera-motion output/dance-camera.vmd
VRMA and binary FBX contain 52 animated joints and hips travel. FBX uses Mixamo bone names. Avatar VMD targets standard Japanese MMD bone names and combines the two chest rotations. Camera VMD stores the tracked orbit target, distance, rotation, and vertical field of view. In Persona, import the avatar file under Animations and the camera file under Camera Motion.
In the dashboard, enable Auto-record when I select a video, then browse for a file or enter its path. The dashboard records from frame zero through the last frame and finishes automatically, even when Loop Debug Video is checked. For a file already selected, use Record full video. Full-video recording runs at the speed of inference. It also works when the machine cannot process the clip in real time.
Enable Dynamic 6-DoF Camera Tracking to capture avatar and camera together. Under Motion recording, choose a paired ZIP to download your avatar format and the synchronized camera VMD, or download either track individually. All downloads use the same take.
For a live camera or an excerpt from a running stream, use Record take and Finish take. The take follows the mirror and root-movement settings. The recorder keeps the latest take in a local temporary file for repeated downloads. Budget about 100 MiB of temporary disk space per hour of recording, plus space for the exported files.
4. Tests & Linting
uv run pytest -v
uv run ruff check
Citation
Built on FlowHMR. If you find FlowHMR useful in your research, please cite:
@article{wang2026flowhmr,
title={FlowHMR: Physically Plausible Motion Capture from Video},
author={Wang, Zhanke and Zhao, Chengfeng and Shuai, Qing and Lin, Jingzhong and Li, Heng and Ling, Zeyu and Wen, Yuxin and Li, Jing and Kang, Di and Guo, Chunchao and Bao, Linchao},
journal={arXiv preprint arXiv:2610.03691},
year={2026}
}
License
persona-flowhmr is licensed under GNU AGPL-3.0 with a Section 7 linking exception for vendored Meta SAM 3D Body and DINOv3 components, which remain under their respective upstream licenses. See THIRD_PARTY_LICENSES.md for full details and modification notices.
Explore related projects
Loading…