Skip to content
AF
Challenge

The 30-second rep challenge

Pick squats or jumping jacks, step back from your webcam, and do as many as you can in 30 seconds. A pose model running in your browser finds your joints in every frame, a few angle rules count the reps live, and at the end you get a score card to share. It is a game and a demo of how camera rep counting works, not coaching: the rules are simple, the count can be wrong, and your camera frames never leave this tab.

Exercise

Before you start: clear some space, stand far enough back that the camera sees you from head to feet, and stop if anything hurts. The camera is asked for only when you press Start camera, and the preview shows the skeleton and the angle before anything counts. Press Go for a 3-second countdown; reps during it do not count.

How the counting works

The counter is the method how rep counting works describes, kept short enough to print in full here. Every number below is read from the same module the page runs, so this text and the code cannot disagree.

  1. Landmarks. Google’s @mediapipe/tasks-vision 1.1.1 runs Pose Landmarker lite (5.5 MiB) on each frame and returns 33 points, indexed on the BlazePose 33 map, each with a visibility score. It also returns the same pose as world landmarks, which the package’s type definitions describe as coordinates in meters; the angle is computed from those, so it does not depend on where you stand in the frame.
  2. One angle. For squats, the knee angle at the knee between hip and ankle, averaged over the legs the camera can see. For jumping jacks, the arm angle at the shoulder between hip and wrist, averaged over both arms, and only when both are visible. A side is used only when its three landmarks each report a visibility of at least 0.5; otherwise the frame has no reading and the counter waits.
  3. Smoothing. The angle passes through a moving average with a 50 ms time constant, so single-frame jitter is damped by the same amount at any frame rate.
  4. Two zones with a gap. A squat rep is the angle going below 100° (bottom) and back above 160° (standing). A jumping jack is above 135° (arms up) and back below 45° (arms down). The gap between the zones is the hysteresis: an angle hovering at one boundary cannot finish a cycle on its own. You have to start in the rest zone, so beginning at the bottom of a squat is not half a rep.
  5. Hold and speed limits. A zone has to hold for 60 ms of frames (two frames at 30 frames per second) before the phase changes, which drops one-frame glitches. A cycle that completes faster than 600 ms for a squat or 300 ms for a jumping jack is rejected, and the result says how many were.

Where the thresholds come from: the squat values are the example definition squat detection with pose estimation reports from a 2026 study, which marks them as adjustable defaults. The jumping-jack values are our own choice for a frontal webcam: the jumping jack counter page reports no measured counting accuracy and gives no numeric threshold to copy, and the studies it read tracked hand and foot distance rather than an arm angle. Nothing here was calibrated on real users.

Where it gets the count wrong

  • Depth it cannot see. Facing the camera, the knee bend is mostly toward the lens, and the model estimates that depth from a flat image. A real squat can read shallower than it is, and a different camera angle can change the count.
  • Partial movements. Squats that stop above the bottom zone and jumping jacks whose arms stop at shoulder height are not counted. The jumping-jack rule watches the arms only, so arm swings without a jump count as reps.
  • The frame. Feet, hands or hips out of shot, loose clothing, low light, a busy background or a second person all degrade the landmarks. The model is asked for one pose.
  • The device. A slow device runs fewer frames per second, and very fast reps can fall between them. How fast the model runs on yours is what the pose model benchmark measures.

It does not judge form, depth targets or safety, and it is not exercise, coaching or medical advice. What a product-grade counter adds on top of rules like these is in adding rep counting to an app, how form feedback works and testing a rep counting algorithm.

Frequently asked questions

How does the 30-second rep challenge count reps?

Each camera frame goes through MediaPipe Pose Landmarker lite in your browser, which returns 33 body landmarks. The page turns them into one angle, the knee angle for squats and the hip, shoulder and wrist angle for jumping jacks, and a two-phase state machine counts a rep when that angle goes from the rest zone to the active zone and back. For squats that is below 100° and back above 160°; for jumping jacks, above 135° and back below 45°.

Why did the rep challenge miss a rep or count one I did not do?

Because its rules are simple. A shallow squat never reaches the bottom zone, arms that stop at shoulder height never reach the top zone, a body partly out of frame gives no reading, and a slow device skips frames. Loose clothing, low light and a camera that is too close all make the landmarks less reliable. The thresholds are starting values, not ones tuned on real users, so treat the number as a game score, not a measurement.

Does the webcam rep challenge upload my video?

No. Frames go from your camera into the pose model running in the same browser tab and are never stored, recorded or sent. The page downloads Google's runtime from cdn.jsdelivr.net and the model file from storage.googleapis.com. That runtime also sends Google a usage report of its own, which in the code we read carries timings and the library version, not images. The share card is drawn on your device and leaves only if you save or post it yourself.

Can I reuse the challenge's angle thresholds in my own app?

As a starting point only. The squat thresholds come from one 2026 study's example definition and the jumping-jack ones are our own choice; neither was calibrated for your camera, model or users. The how-rep-counting-works and per-exercise pages explain what to test, and every rule the counter applies is listed on this page.

What this page sends, and what it keeps

Everything runs client-side. Camera frames go from your browser’s video element into the WebAssembly runtime and are never stored, recorded or sent; this site has no server code behind this page, keeps no scores and has no leaderboard. The network requests are the runtime from cdn.jsdelivr.net and the model file from storage.googleapis.com, so those hosts see an ordinary download, the same one the benchmark makes. The package version and file URLs were checked on 2026-10-31.

The runtime also reports its own usage to Google. Version 1.1.1 posts to https://odml.pa.googleapis.com/v1/log about once a minute and when the model closes, and we saw that request in our own test of this page. In the library’s code the report is built from the task name, the running mode, an operating-system family read from the user agent, the library version and timing counters such as frames processed and latency; no image, video or landmark value goes into it. Its public options offer no switch to turn it off, and a content blocker that blocks that host does not stop the challenge.

The score card is a PNG drawn on a canvas in your browser and the result line is text built in the same place. Neither contains an image of you.

A free demo from AIFitnessAPI. Every topic in camera-based tracking is at AI motion tracking, and the free developer tools are at free tools for health-app builders.

Next step

Turning this into a choice of API: