yskaaks / ai-motion-tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AI Motion Tracker

Overview

AI-based fitness assistant for tracking and analyzing exercise form, specifically focusing on squats and bicep curls. Utilizes OpenCV and MediaPipe for real-time pose estimation and TensorFlow for squat form analysis.

Key Features

  • Real-time pose detection with MediaPipe.
  • Angle calculation for joints to determine exercise form.
  • Bicep curl and squat counting logic.
  • Squat form analysis using a trained CNN model.
  • Video processing for both live camera feed and pre-recorded videos.

File Descriptions

  • gym_buddy.py: Main script for real-time exercise tracking and form analysis.
  • gym_buddy_recorded.py: Processes pre-recorded videos for exercise tracking and form analysis.
  • labeling_squats.py: Script for extracting and labeling frames from squat videos, preparing datasets for model training.
  • squat_coach.py: Real-time squat coaching tool, providing feedback on squat form using a trained CNN model.
  • squat_model.py: CNN model training script for squat form analysis.

Implementation Details

  1. Real-Time Pose Estimation: Using MediaPipe to detect body landmarks in real-time.
  2. Exercise Counting Logic: Algorithm to count bicep curls and squats based on joint angles.
  3. Form Analysis: Squat form analysis using a CNN model, trained on labeled video data.
  4. Feedback System: Providing real-time feedback on exercise form to the user.
  5. Video Processing: Ability to process both live camera feeds and pre-recorded videos.

Technologies Used

  • Python
  • OpenCV for video processing.
  • MediaPipe for pose estimation.
  • TensorFlow and Keras for CNN model development.
  • NumPy for mathematical operations.

Setup and Usage

  • Run gym_buddy.py for real-time exercise tracking with a webcam.
  • Use gym_buddy_recorded.py for analyzing pre-recorded exercise videos.
  • labeling_squats.py is used to prepare training data for the CNN model.
  • squat_coach.py provides real-time feedback on squat form.
  • Train the CNN model for squat analysis with squat_model.py.

This project demonstrates advanced skills in computer vision, machine learning, and real-time data processing, applied to the fitness domain.

About


Languages

Language:Python 76.4%Language:Jupyter Notebook 23.6%