Joint-by-joint comparison of human movement against a reference.

MotionCoach aligns a practitioner's video with a reference performance by movement phase, not by clock time. It measures interpretable joint indicators and shows exactly where, when and how strongly the two differ, together with how much evidence supports each result.

Animated demo of the MotionCoach timeline workbench: reference and practitioner timelines with correspondence bands, status strips, synced videos with skeleton overlays, and a body-normalised skeleton comparison
Recorded on the real workbench. Video pixels are blurred deliberately; skeletons and analysis layers are as rendered. The UI is currently in Chinese.

What it does

The first application is Baduanjin (八段锦), a traditional Chinese qigong routine. The engine itself knows nothing about any particular discipline: each application supplies a rules profile and an annotated reference.

Scope

Analyses what both videos share

A fast coarse pass locates every section in the practitioner video and checks detection, foot visibility, camera cuts and correspondence quality. Full-rate analysis runs only on the longest stretch that passes.

Alignment

Matches movement phases

Two-stage DTW, mirror-invariant then per section, copes with practitioners who are 2–3× slower or repeat moves more often. Timing and shape differences are reported separately.

Evidence

Per-joint differences with status

Fourteen named 2D indicators: joint angles, wrist height, trunk lean, head turn, stance width and hip height. Where evidence is thin the result is not evaluable or uncertain, never a silent pass.

Workbench

A timeline you can drag

The reference timeline sits on top and the practitioner timeline below, joined by correspondence bands. Status strips and issue markers sit on the same axis, and the playhead drives videos, skeletons and curves together.

Visual

Body-normalised skeletons

Both bodies are scaled to one standard figure, keeping each bone's own 2D direction. This reduces the effect of body size and camera distance, and difference vectors point from the reference to the practitioner.

Research

Swappable, comparable algorithms

End users run MediaPipe, GPU first. Developers benchmark RTMPose, RTMW, RTMW3D and YOLO on identical frames, with speed, stability and P95 measurement differences.

How it works

Each stage writes structured evidence. Rules turn evidence into statuses; the client only displays them and never recomputes them.

  1. NormaliseBoth videos become H.264 proxies with rotation applied and timestamps preserved.
  2. LocateA 2 fps coarse alignment checks every section and picks the shared, continuous interval.
  3. Estimate posesPose estimation runs on the interval only, on an absolute k/fps sampling grid, GPU first.
  4. Align & compareCoarse then per-section DTW; signed differences at key moments, with coverage and timing.
  5. Evaluate & showProfile tolerances and view limits produce statuses, which open in the timeline workbench.
Static screenshot of the MotionCoach report workbench

Built for checking, not just viewing

  • Denominators everywhere. “31/35 evaluable focus indicators within tolerance”, with the not-evaluable count listed alongside.
  • Status that respects the camera. Movements a frontal view cannot measure are hatched, not coloured green.
  • Mirror-aware. Selfie recordings and mirror-side practice are independent transforms; together they cancel.
  • Reproducible inputs. Content-addressed caches keyed by video, model, device class and sampling grid.
  • Exportable. Aligned per-moment data as CSV, with technical metadata in every report.

Pose backends

MediaPipe is the default. The others are for developer-side comparison. 3D methods from our survey are catalogued with their requirements.

BackendOutputRoleGPU pathLicence
MediaPipe Pose Landmarker33 points + hip-centred 3DDefaultGPU delegate (EGL)Apache-2.0
RTMPose / RTMOCOCO-17ComparisonONNX Runtime CUDAApache-2.0
RTMW133 whole-body pointsComparisonONNX Runtime CUDAApache-2.0
RTMW3D133 points + 3D (not metric)3D experimentsONNX Runtime CUDAApache-2.0
YOLO11 / YOLO26 poseCOCO-17ComparisonPyTorch CUDAAGPL-3.0
GVHMRWorld-grounded SMPL motion3D candidatePyTorch CUDAResearch; SMPL needs registration
SAM 3D BodySingle-image body mesh3D candidatePyTorch CUDASAM Licence; gated weights

Quickstart

git clone https://github.com/BMProjects/MotionCoach.git && cd MotionCoach
uv sync                                    # Python 3.12, FFmpeg required
uv run motioncoach serve                   # http://127.0.0.1:8765
uv run motioncoach analyze --reference baduanjin_demo_a --user practice.mp4 --mirrored yes

uv sync --extra rtm --extra yolo           # developer backends (ONNX Runtime GPU, Ultralytics)
uv run motioncoach bench --reference baduanjin_demo_a --user practice.mp4 --backends mediapipe-full,rtmw-l

Research prototype. The Baduanjin section boundaries, tolerances and focus joints are drafts that a coach has not yet confirmed. Indicators are 2D and assume a frontal camera. No agreement study against expert ratings or motion capture has been done yet. Sample videos are not distributed.

Acknowledgements