AI Personal Trainer

This project delivers an AI-driven web application that combines posture correction and personalized exercise planning. Using OpenCV and MediaPipe, it provides real-time feedback on five core exercises, while an integrated LLM generates weekly workout plans tailored to users’ fitness levels and goals. The goal was to make professional-level training accessible, safe, and motivating for individuals without a physical trainer.

Skills

Computer Vision · AI Integration · Web App Development

Skills

Computer Vision · AI Integration · Web App Development

Skills

Computer Vision · AI Integration · Web App Development

Tools

Python · Streamlit · OpenCV · MediaPipe · OpenAI API

Tools

Python · Streamlit · OpenCV · MediaPipe · OpenAI API

Tools

Python · Streamlit · OpenCV · MediaPipe · OpenAI API

Yellow Flower
Yellow Flower
Yellow Flower

Case Challenge

Case Challenge

Case Challenge

Many people exercise without a trainer, leading to poor posture and increased risk of injury. The challenge was to create a low-cost, AI-powered tool that can analyze gym posture in real time, provide feedback, and serve as a virtual personal trainer.

Approach

Approach

Approach

Posture Correction:

  • Implemented with MediaPipe Pose for 33 body landmarks.

  • Analyzed angles (shoulder-elbow, elbow-wrist, shoulder-hip) to assess form.

  • Designed a state machine to track reps and classify movements as correct/incorrect.

  • Added inactivity detection to reset counters when no motion is detected.

Exercise Coverage: Squats, Push-ups, Bicep Curls, Dumbbell Fly, and Kickbacks.

Feedback System: Triggered targeted prompts like “Straighten your back” or “Curl higher” when thresholds were crossed.

Personalized Plans:

  • Integrated LLM via LangChain + OpenAI to create weekly workout routines.

  • Collected user input (age, weight, goals, preferences, fitness level).

  • Generated structured plans with sets, reps, and calendar views.

Interface: Built in Streamlit for quick prototyping, easy navigation, and live feedback.

How It Works

How It Works

How It Works

This section demonstrates the core features of the AI Personal Trainer in action. From real-time posture correction to AI-generated workout plans, each feature was designed to make training safer, smarter, and more personalized for users.


Real-Time Posture Feedback – skeleton overlay + live correction prompts.

Exercise Tracking – counters for correct/incorrect reps with inactivity handling.

AI Plan Generator – chatbot interaction to design personalized weekly schedules.

Calendar View – clear breakdown of training sessions across the week.



System Highlights

System Highlights

System Highlights

  • Real-time CV-based analysis can effectively reduce injury risks by catching incorrect posture immediately.

  • Beginners benefit most — system provides step-by-step corrective cues.

  • 61%+ of generated plans matched user preferences in pilot tests, showing LLM value.

  • Streamlit allowed fast iteration but highlighted the need for richer UI frameworks (React, mobile-first design).

Outcome

Outcome

Outcome

  • Successfully combined computer vision (MediaPipe) with LLM personalization in one app.

  • Learned to optimize angle detection and state tracking for reliable exercise classification.

  • Understood the importance of contextual AI — plans had to feel personalized and motivating, not generic.

  • Delivered an MVP under tight deadlines (LLM integration completed in just 1 week).

Futture Improvements

  • Multi-camera support for better accuracy on complex exercises.

  • Progress tracking dashboards with performance history.

  • Database integration for user data and privacy.

  • Mobile app development for gyms and home use.

  • Integration of wearable sensor data (IMUs) for richer motion analysis.

  • Community features (leaderboards, challenges, forums) to keep users motivated.

View the details

View the details

View the details

Stay Connected

+61 421 718 726

thanhthao.chu05@gmail.com

Create a free website with Framer, the website builder loved by startups, designers and agencies.