RuView icon indicating copy to clipboard operation
RuView copied to clipboard

fix(pose): black canvas + stacked ghost skeletons in Live Demo

Open VolatusLab opened this issue 4 months ago • 1 comments

Summary

Fixes the Live Demo Human Pose Detection rendering a black canvas with stacked/scrambled labels ("tudo preto e tudo em cima de tudo"), and folds in the current independent dev work so the branch builds green as a unit.

Root causes & fixes (pose pipeline)

1. Per-keypoint confidence dropped at the tracker boundary. PoseTrack::new/update_keypoints/create_track only accepted [[f32;3]] positions, so KeypointState.confidence kept its 0.0 init value forever. The server emitted all 17 keypoints with confidence 0, which caused both symptoms at once:

  • renderer skips every joint (guard conf > 0.1) → black canvas
  • bbox collapses to the degenerate 0.6×1.0 fallback → every Conf: 90% label piled on one point → scrambled text

Fixed by threading per-keypoint confidence through create/update; centroid-filled slots stay 0.0 (unobserved).

2. Kalman tracker fed pixels but tuned for metres. measurement_noise=0.08 m + Mahalanobis gate 9.0 gave an effective association gate of ~1.5 px. A single person's natural ±20 px jitter never matched its own track → every frame spawned a fresh track and stale ones lingered as confirmed ghost skeletons (Persons: 4/5 for one real person). Fixed by converting px↔m at the tracker boundary (PIXELS_PER_METER=100).

UI: pose-renderer keypoint-confidence thresholds made inclusive (>=), since the server clamps confidence to [0.1, 1.0] and joints at the floor were dropped.

Also merged (independent dev work)

  • ADR-271 Depth Anything Rust camera-depth backend (agent/depth-anything-rust) — no overlap with the pose fix; 33 pointcloud tests pass.
  • vendor/ruvector bump to latest upstream (6a6c39e6) — most recent of the automated submodule-update branches (the other 7 point at the same SHA).

Verification

  • wifi-densepose-signal: 478 + integration tests pass against the bumped ruvector
  • wifi-densepose-sensing-server tracker_bridge: all pass, incl. 3 new regression tests (confidence round-trip, multi-person separation, single-person no-churn)
  • wifi-densepose-pointcloud: 33 tests pass
  • Docker image rebuilt and validated end-to-end: stable Persons: 1 over 426/426 frames, one clean human skeleton.

🤖 Generated with claude-flow

https://claude.ai/code/session_01BztNyDLaawF9UUCJ1wrwTz

VolatusLab avatar Jul 21 '26 13:07 VolatusLab

The pose fix here is correct and well-diagnosed — threading per-keypoint confidence through PoseTrack so the tracker's bbox fit stops collapsing to a degenerate fallback, the px↔m conversion at the tracker boundary, and the strict→inclusive renderer threshold. The regression tests (confidence round-trip, multi-person separation, single-person no-churn) are a nice touch.

The blocker is packaging: this PR also bundles the entire ADR-271 depth-anything backend (identical to #1375) and a vendor/ruvector submodule bump. That conflicts with #1375 and folds an opaque submodule change into a rendering bugfix.

To help it land independently, I opened #1428, which carries only the three pose files (ui/utils/pose-renderer.js, sensing-server/tracker_bridge.rs, signal/ruvsense/pose_tracker.rs) with your regression tests, and nothing from the depth backend or the submodule bump — feel free to use it or close this in its favor. The depth-anything backend is better reviewed on its own as #1375.

PrinceAudre avatar Jul 25 '26 12:07 PrinceAudre