Inspiration

As we were brainstorming ideas, Gage and I (Carlos) were discussing how hard it is to get perfect form at the gym, let alone at home when following tutorials for workouts. That's when it hit us, what if we use Computer Vision and AI to provide user's feedback, what if we made a Personal Trainer AI, PeTAI.

What it does

PeTAI uses the camera from either an iPhone, iPad,Desktop, or Laptop to provide real time feedback on exercises you're doing. For instance, if you're following a Yoga or Dancing video from YouTube PetAI will tell you how similar your movements are to the teacher's. Likewise, if you're doing squats, PeTAI will notify you if you're at risk of injury or getting close to perfect form. As the saying goes, Perfect Practice Makes Perfect.

How we built it

PetAI is a cross platform experience. For iPhone, iPad and Apple TV, we're using Swift, SwiftUI and Apple's Vision framework in order to offer on-device analysis on the video streams from the cameras.

We also have a web app in order to support non-apple devices, that offers similar functionality via Google's ML Kit and a website built with Javascript.

Challenges we ran into

Setting up the real time tracking was relatively simple. Our main challenge was using the data we were collecting and offering feedback to the user. As it's very difficult for someone to have a perfect 90 degree squat, we had to find a set of constants that are doable and safe. Likewise for the dynamic exercises, it'd be difficult for someone to be perfectly in sync with a tutorial they're watching for the first time, we also had to take that into account.

Moreover, implement Apple Watch data analytics was also quite involved.

Accomplishments that we're proud of

Getting all of this working! We honestly didn't know if we'd be able to build this, so it's super cool. Especially the feedback functionality.

What we learned

We learned how to make multi platform apps and the importance of good form when exercising.

Built With

Share this project:

Updates