Background

RevGym started with a friend of ours and a set of bicep curls. A bicep curl looks like one of the simplest exercises in the gym, but bad movement patterns led to an injury that kept our friend from training regularly. They didn't see the problem coming. There was no warning and nobody watching their form, and by the time it hurt, it was too late.

That stuck with us because it's so common. Most people train alone, but a mirror can't tell you how far your elbow moved, whether your reps are speeding up, or whether one arm is doing less than the other. Those details are hard to feel in the middle of a set.

We wanted to change that using something almost everyone already has: a phone. Before we could give anyone advice, we needed to understand how people really move. So we didn't start with an app. We started by collecting real data.

How we built it

Collecting the data. We went to the Student Recreation Center, set up a phone camera and recorded real people exercising. RevGym now holds movement data from 40 people. This dataset is the foundation of the project, and all of it was collected by our team.

Turning movement into numbers. The phone streams live video to a computer, and MediaPipe finds the body's key points. We started with what went wrong for our friend: the arm. Using a coordinate system, we track 17 points across the body at about 30 times per second and calculate 8 joint angles. We save those measurements but not the video recording.

Using math to understand form. To measure a curl, we take vector u from the elbow to the shoulder and vector v from the elbow to the wrist, then find the angle between them:

$$\theta = \arccos\left(\frac{\vec{u} \cdot \vec{v}}{|\vec{u}|\,|\vec{v}|}\right)$$

At 180°, the arm is straight. Following this angle through every rep shows how far someone moves, how fast they go, and whether their left and right sides match. These are the kinds of details that are easy to miss on your own.

We also lock a coordinate system to the floor, so we can see movement through the room. That lets us estimate jump height from the time spent in the air, t:

$$Height = \frac{g t^2}{8}$$

Storing the data. Movement data goes to Supabase while a person records, along with accounts and leaderboard results, so the dataset keeps building as more people use RevGym.

Building the app. You see your body tracked live, get feedback on your set from Claude, review your progress in personal statistics and compare results on a leaderboard. We built it with HTML, CSS, JavaScript and FastAPI.

Challenges we faced

  • Tracking errors: the model could swap left and right, lose people standing side-on, or see a body that wasn't there. We added checks to catch these errors.
  • Noisy angles: a straight knee could read as bent because depth is hard to estimate from one camera, so we kept both raw and smoothed angles.
  • Connecting the phone: phones only allow live camera access over HTTPS, and some campus networks block devices from talking to each other. We used QR pairing and a phone hotspot as a fallback.
  • Collecting real data: people move differently, and lighting and camera angles change everywhere you go. Real recordings were much messier than our tests.

What we learned

  • A small, carefully collected dataset teaches you more than a large one you don't understand.
  • Pose estimates are only estimates, and camera position and lighting change the results.
  • Basic vector math can turn a phone camera into a useful movement tool.
  • Consent and privacy matter from the start when you collect data from real people.

Conclusion

RevGym began because someone we care about got hurt doing an exercise that looked simple. We couldn't undo that injury, but we could try to make the problem easier to see for the next person.

So we collected real movement data, turned it into numbers anyone can understand, and built a live app around it. Next, we want to check our form scores against real coaches and collect data from more people.

The more people use RevGym, the more people can catch and fix bad form early. We hope what happened to our friend doesn't happen to anyone else, and if RevGym helps even one person fix their form before they get hurt, it did its job. With RevGym, it is important that we move with a purpose.

Built With

Share this project:

Updates

Submission history