Problem
A rep counter needs to distinguish full movement from partial motion without sending camera frames to a server.
Approach
MediaPipe identifies thirty-three body landmarks. Shoulder, elbow and wrist positions determine the elbow angle. A two-stage state machine counts only a full range of motion, independently for each arm.
Architecture
Camera → MediaPipe in WebAssembly → joint angles → per-arm state machine → React counter. Inference runs locally.
MediaPipeReactWebAssemblyOpenCV
Challenges and trade-offs
Camera angle and occlusion affect landmarks. The original Python and OpenCV notebook was ported into a browser-based workflow.
