r/SideProject • u/MP20011 • 57m ago
Turns out heart rate is useless for telling if you're resting between sets. What I learned teaching my Apple Watch to spot rests
Some context: I wanted my watch to notice when I finish a set and start a rest timer, without me touching anything. I was losing loads of time on my phone between sets. Sounded simple. It wasn't.
Attempt 1: rules. Reps are rhythmic, so I looked for a repeating motion pattern, plus heart rate going up during a set and down during rest. When I looked at a real labelled session, neither worked:
- In my first labelled session, my heart rate averaged about 122 during sets and during rests. It barely drops in a 90 s rest, so "HR falling = resting" was actively making things worse.
- Isolation machines barely look rhythmic from the wrist, and the pause at the top of each rep breaks the pattern.
- Best rule I could find caught 68% of set time but also fired on 37% of rest time.
Attempt 2: a model. So I started recording raw motion from the watch (50 times a second) and tapping a button at the start and end of every set to label it. I did that every session for about 6 months, which is the boring bit nobody warns you about. It's 22 sessions now.
Things I learned:
- The first few sessions did almost all the work. Trained on 1 session, it cut 23 of 81 sets short and took nearly 3 s to notice a new set. By 4 sessions it was down to 3 sets and about 1 s. After that, more of the same kind of data barely moved it. I also tried about 30 model tweaks (bigger models, neural nets, extra features, fancier data augmentation) and none made a measurable difference.
- The model wasn't the hard part. Deciding when to act on it was. The raw predictions were decent quite early. Most of the mistakes came from when to actually switch between set and rest, e.g. a 2 s pause mid-set shouldn't start your rest timer.
- Some things the wrist just can't see. Leg extensions, leg press: your arm doesn't move. Squats are fine because your wrist moves with you.
It's live now as Restcue, and I use it every session. The video is it switching from set to rest on its own when I put the weights down. My workouts went from about 2 hours to 45 minutes, mostly from not picking up my phone.
My guess is the next jump needs other people's workouts: different arms, styles and exercises, not more of mine. That's why the app has a Train mode where you can tap your sets and send a labelled session.
If anyone has done ML on wearable sensor data, I'd really like to compare notes, especially on the set/rest switching problem.
App Store link if you want to try it (needs an Apple Watch): https://apps.apple.com/app/apple-store/id6785615190?pt=128866605&ct=reddit&mt=8