Building the twin
Motion TwinReal-time rehab biomechanics
Demo synthetic motion – fps
Camera off The twin is following the demo performer. Your video never leaves this device.
Front camera
CoachSquat
0repsready
    Muscle effortresthard

    Demo performer

    View

    Session

    App

    Twin WalkersPredictive gait simulations, healthy vs weak Inside the KneeLigament mechanics with OpenSim JAM
    Motion TwinReal-time rehab biomechanics

    Step into the lab

    Your camera finds 33 points on your body. They drive a full OpenSim skeleton with 88 leg muscles, and a physics solver estimates your joint loads and which muscles are working, every frame. Nothing leaves this device.

    Method & limits

    Pipeline, every frame

    1. Tracking. MediaPipe Pose Landmarker finds 33 body points in 3D from one camera, on this device. Each point is smoothed with a One Euro filter, harder for the face, for depth and for points the model can barely see. Legs out of view settle into relaxed standing rather than following the model's guesses.
    2. Skeleton. Each bone of the Lenhart 2015 OpenSim full-body model is placed by aligning its real body frame to the tracked points, chained joint to joint. The whole skeleton is scaled by one factor from your height, so it keeps adult proportions; the points only give directions.
    3. Hands. With hands on, MediaPipe Hand Landmarker adds 21 points per hand. Each of the model's own finger bones (15 per hand) is aimed along its tracked segment; the radius rolls over the ulna about the model's radioulnar axis to match the knuckle line (pronation and supination), and the wrist angles are the hand against the radius. The hand model file is fetched once from Google's public model store; video still never leaves the device.
    4. Joint angles follow OpenSim's conventions (hip flexion, adduction, rotation; knee flexion; ankle dorsiflexion).
    5. Ground force. The camera has no force plate, so the total ground force is computed from Newton's second law over all body segments (mass from your body weight), and shared between the feet by where the centre of pressure falls.
    6. Joint moments come from 3D Newton-Euler inverse dynamics up each leg (foot, shank, thigh).
    7. Muscle effort. Static optimisation shares each leg's joint moments across its 44 muscles, minimising the sum of squared activations. Moment arms come from OpenSim; the quadriceps' leverage through the kneecap comes from a solved OpenSim JAM knee-bending simulation (0 to 130 degrees). Each muscle's capacity follows its force-length curve.
    8. Visual layers. Load paths show an estimated compressive joint load: the ground force plus the forces of the muscles crossing each joint, in body weights (a rough index, not a joint contact model). The X-ray mirror fits a scale and offset between the tracked image points and the twin's joints every frame.
    9. Display. The drawn skeleton eases toward each new pose at screen rate (a 45 ms time constant), so motion stays continuous between camera frames. Numbers and physics use the pose itself.

    Self-check

    Running…

    What this cannot do

    Credits

    OpenSim (Stanford) and OpenSim JAM (Smith; Lenhart et al. 2015, Ann Biomed Eng 43:2675). MediaPipe Pose (Google). One Euro filter (Casiez et al. 2012). Rendering three.js.