$ show JamesLLMs/LDM
This repository provides a functional system for motion retargeting from human video to robot models. It detects arm and hand poses from monocular video using MediaPipe, fuses the detections, applies multi-stage coordinate transformations (world → first-person → URDF standard), and retargets the motion to robot URDF models using numerical optimization. The system includes visualization tools for debugging coordinate transformations and verifying retargeting results. The architecture is modular with separate components for detection (`src/whobody_dect/`), retargeting (`src/dex_retargeting/`), and example workflows (`example/`). Key entry points include `example/vector_retargeting/retarget_from_wholebody_video.py` for the main retargeting pipeline and `src/whobody_dect/simple_visualize.py` for coordinate system validation.
The LLM identified 3 files worth highlighting for reuse:
Implements robust coordinate transformation from MediaPipe world coordinates to shoulder-centered local coordinates with length normalization. Supports both first-person perspective and URDF standard coordinate systems. Demonstrates non-obvious skill in handling anatomical coordinate systems, ensuring joint distances remain consistent regardless of camera angle or subject distance. Isolated from other components (only depends on numpy/json) and easily reusable in any pose estimation project requiring coordinate system alignment.
Provides flexible configuration management for different retargeting strategies (vector, position, dexpilot). Includes comprehensive validation of configuration consistency, automatic URDF path resolution, and clean separation of concerns. Demonstrates skill in handling complex configuration hierarchies with type-safe dataclasses and meaningful error messages. Could be extracted to any project requiring structured configuration with validation.
Clean wrapper around pinocchio robot kinematics library providing forward kinematics, Jacobian computation, and joint/link index mapping. Encapsulates the complexity of robot model handling while exposing a simple, intuitive interface. Demonstrates skill in creating minimal, focused abstractions over complex libraries. Fully isolated (depends only on pinocchio and numpy) and reusable in any robotics project requiring basic kinematics operations.