AI Trainer: Real-Time Exercise Repetition Counter

This project uses advanced machine learning and computer vision techniques, leveraging MediaPipe and OpenCV, to create an AI Trainer that tracks body movements and counts exercise repetitions in real-time. The AI Trainer helps users maintain proper form and monitor their progress effectively.

Project Objective

The objective of this project is to accurately detect body movements and count exercise repetitions, such as dumbbell curls, in real-time. This system promotes fitness tracking and ensures exercises are performed with proper technique.

Steps Involved:

Data Preparation:

  • Captured video of exercises like dumbbell curls performed by various individuals.
  • Extracted key points of the body using MediaPipe for pose estimation.
  • Annotated key points to calculate angles and track movements for repetition counting.

Model Selection:

  • Used MediaPipe for its robust pose detection capabilities.
  • Implemented a custom logic to calculate joint angles for accurate repetition counting.

Development:

  • Integrated pose estimation with a custom algorithm to track arm movements and detect exercise direction.
  • Visualized progress with dynamic feedback using a progress bar and percentage tracker.
  • Displayed real-time FPS to ensure smooth performance on different hardware setups.

Evaluation:

  • Validated the repetition counting logic using test video datasets.
  • Analyzed performance in terms of accuracy and real-time tracking reliability.
  • Improved visual feedback to enhance user experience.

Exercise Tracking Results:

The AI Trainer demonstrated high accuracy in detecting movements and counting repetitions during exercises. For example, in a session of 12 dumbbell curls, the trainer accurately counted all repetitions while providing real-time visual feedback.

Example Repetition Counting:

During a demo session, the AI Trainer correctly tracked the motion of the user’s arm and counted each repetition with visual indicators, achieving a success rate of 100% for a single exercise session.

Results:

By applying AI and computer vision techniques, the AI Trainer enables individuals to track their fitness goals more effectively. It ensures proper form during exercises, enhances engagement, and provides insights into performance, making it an invaluable tool for fitness enthusiasts.

Images and Videos from the Project



View the Code