Zero-dependency JS library that counts exercise reps from pose detection keypoints. Works with MediaPipe, MoveNet, PoseNet — geometry-based rep counting, no neural networks.
// Import — no instantiation needed
import { countReps, getCount } from 'rep-counter';
// Call with each frame
const result = countReps(keypoints, 'push-ups');
// → { repCount: 5, state: 'UP', feedback: 'Rep 5!' }
No ML models, no heavy dependencies. Just pure angle math that works with any pose detection output.
Just the math. No PyTorch, no TensorFlow — doesn't run any ML itself.
Node.js, browser, React Native, Expo. The function doesn't care about your stack.
300ms minimum between reps prevents false positives from pose jitter.
Full type definitions included. Works with inference, auto-complete, and type safety.
Each exercise has a defined state machine. Rep counts on DOWN → UP transition.
Add custom exercises with just angle thresholds. No ML training needed.
Paste pose keypoints (from MediaPipe/MoveNet) to test rep counting.
Quick test:
+ incline push-ups, decline push-ups, jump squats, chin-ups, and more