Skip to content

The Running Analysis Tool uses computer vision for real-time feedback to help runners improve form and performance with a standard camera.

Notifications You must be signed in to change notification settings

henryczup/running-form-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running Analysis Project

Overview

This project provides a real-time running analysis tool using computer vision and pose estimation techniques. It captures video input from a camera, analyzes the runner's form, and provides instant feedback on various biomechanical metrics.

Features

  • Real-time pose estimation using multiple model options (MoveNet, BlazePose, Lite-HRNet)
  • Calculation of key running metrics (e.g., head angle, trunk angle, knee angles, arm swing)
  • Visual feedback with adjustable display modes (angles, metrics, recommendations)
  • Audio feedback for immediate form corrections
  • Metric logging for post-run analysis
  • Video recording and playback functionality

Requirements

  • Python 3.7+
  • OpenCV
  • TensorFlow
  • PyTorch
  • MediaPipe
  • PyQt5
  • NumPy
  • pyttsx3

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/running-analysis.git
    cd running-analysis
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Download the necessary model files and place them in the models/ directory.

Usage

Run the main script with desired options:

python main.py --model_type blazepose --side left --runner_height 182

Options:

  • --model_type: Choose from 'movenet', 'blazepose', or 'lite_hrnet' (default: blazepose)
  • --side: 'left' or 'right', depending on which side of the runner is facing the camera (default: left)
  • --runner_height: Height of the runner in cm (default: 182)

Key Components

  • core/analyzer.py: Main analysis loop and frame processing
  • models/: Contains different pose estimation model implementations
  • metrics/: Calculates various running metrics
  • visualization/: Handles display of metrics and pose on video frames
  • feedback/: Provides recommendations and audio feedback
  • utils/: Utility functions for angle calculation, filtering, etc.

Customization

  • Adjust thresholds in feedback/assessment_calculator.py to customize metric assessments
  • Modify feedback/recommendations.py to change the recommendation logic
  • Update core/config.py for global configuration settings

Post-Run Analysis

After each session:

  1. Options to review recorded video
  2. View summary of logged metrics
  3. Save or delete session data

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgements

  • TensorFlow for MoveNet implementation
  • Google's MediaPipe for BlazePose
  • Contributors to the Lite-HRNet project

About

The Running Analysis Tool uses computer vision for real-time feedback to help runners improve form and performance with a standard camera.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages