Inspiration

Sport-tailored workouts work—as shown by how improvements in throwing velocity were observed alongside increases in muscular endurance and power following a sport-specific training regimen focused on the proximal segments (1). But online workout routines and training programs, especially for more specialized disciplines and activities, are oddly difficult to find and oftentimes unreliable, and not everyone can afford a personalized coach. We were inspired to fill this gap with TrainR, offering specific, professional-grade workout routines that cater to the unique demands of niche sports, ensuring everyone has access to reliable guidance and is able to achieve optimal performance.

What it does

TrainR is a web application that generates customized workout plans for niche sports and provides feedback on form for user-submitted videos. Users can input their sport, fitness level, workout focus, and available equipment to receive tailored training routines that suit their specific needs. Users are also given the option to submit their own research papers for the API to retrieve information from to generate additional workouts.

How we built it

To develop our workout generator, we leveraged LangChain for retrieval-augmented generation (RAG), enabling us to chunk and query various research articles. We applied cosine similarity to rank the relevance of searches, guiding the language model’s output. Using the GPT-4 Turbo API, we generated personalized workouts based on the retrieved information. We also trained a YOLOv8 model for pose detection in order to provide the form feedback. We utilized React and HTML/CSS for the frontend.

Challenges we ran into

We spent about 10 hours trying to come up with an idea that was both feasible within the time period and that interacted with an undertapped field in some way (for the Tidal prompt). We ran into a few frontend roadblocks as we were still not entirely familiar with React and had to figure out how to run our model on a low-latency device without a GPU. Figuring out how to quantify the quality of a pose also posed a challenge.

Accomplishments that we're proud of

We're proud of being able to implement both of our planned features as well as the beautiful frontend.

What we learned

We learned how to use LangChain for RAG as well as a handful of other skills given that our team members were of differing experience levels.

What's next for TrainR

More activities for the CV model to score and a calendar feature to plan your generated workouts!

Sources

1) Palmer, Thomas et al. “Sport-Specific Training Targeting the Proximal Segments and Throwing Velocity in Collegiate Throwing Athletes.” Journal of athletic training vol. 50,6 (2015): 567-77.

Built With

Share this project:

Updates