Skip to content

Repository files navigation

SportTrack.ai πŸƒβ€β™‚οΈ

AI-Powered Sports Technique Analysis with Real-Time Pose Detection

Python

SportTrack.ai is a cutting-edge web application that analyzes sports performance videos using advanced AI pose detection. Upload a video of athletic performance and receive instant feedback with skeletal overlay visualization and technique analysis.

✨ Features

🎯 Core Functionality

  • 33-Point Pose Detection: Advanced MediaPipe AI tracks every major body landmark
  • Real-Time Video Overlay: Skeletal connections drawn on original video frames
  • Side-by-Side Comparison: View original and analyzed videos simultaneously
  • Interactive Parameter Tuning: Fine-tune detection settings for optimal results
  • British English Interface: Localised for UK/EU users

πŸ”§ Advanced Controls

  • Adjustable Detection Sensitivity: Control how picky the AI is about pose detection
  • Movement Tracking Options: Optimise for fast movements vs stability
  • Processing Speed vs Accuracy: Choose based on your needs and hardware
  • Troubleshooting Tips: Built-in guidance for common issues

🎨 User Experience

  • SportTrack.ai Branding: Official yellow colour scheme and logo
  • Responsive Design: Works seamlessly on desktop and mobile
  • Drag & Drop Upload: Intuitive file upload with progress tracking
  • Progressive Enhancement: Graceful degradation for older browsers

πŸš€ Quick Start

Quick Start Script

The fastest way to get started:

# Clone the repository
git clone https://github.com/fuzzylabs/sporttrack-ai.git
cd sporttrack-ai

# Run the quick start script
chmod +x start.sh
./start.sh

Open your browser to http://localhost:8000

Manual Setup

  1. Clone the repository:

    git clone https://github.com/fuzzylabs/sporttrack-ai.git
    cd sporttrack-ai
  2. Quick start:

    chmod +x start.sh
    ./start.sh
  3. Open your browser: Navigate to http://localhost:8000

Manual Installation

Using uv (recommended for faster installation):

# Install uv if not already installed
pip install uv

# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv sync

# Run application
python3 app.py

Or using pip:

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run application
python3 app.py

πŸ“Ή How It Works

  1. πŸ“€ Upload: Drag and drop your sports video (MP4, AVI, MOV, MKV)
  2. πŸ€– AI Analysis: MediaPipe processes each frame to detect body landmarks
  3. 🎨 Visualisation: Skeletal overlay applied with green landmarks and red connections
  4. πŸ“Š Metrics: Real-time confidence scores and technique analysis
  5. πŸ”§ Tuning: Adjust parameters based on your specific sport and conditions

πŸ† Use Cases

Use Case Description Benefits
Sports Coaching Analyze athlete technique frame-by-frame Objective feedback, identify improvement areas
Self-Training Review your own performance Track progress, perfect technique
Biomechanics Research Study human movement patterns Quantitative analysis, research data
Injury Prevention Identify improper form Reduce injury risk, improve safety
Performance Analysis Compare techniques over time Measure improvement, optimize training

πŸ”§ Parameter Tuning Guide

The application includes an advanced parameter tuning interface with user-friendly explanations:

Key Parameters

Parameter What It Does When to Adjust
Detection Sensitivity How easily the AI finds your body Lower for difficult lighting/angles
Movement Tracking How well it follows fast movement Lower for rapid sports like tennis
Processing Speed Accuracy vs performance trade-off Higher for detailed analysis
Landmark Clarity How clear body points must be Lower when partially obscured
Pose Completeness How many points needed for valid pose Lower for partial visibility
Stability Requirement How consistent poses must be over time Lower for quicker detection

πŸ’‘ Quick Fixes

  • Poses appearing too late? β†’ Lower "Stability Requirement" and "Pose Completeness"
  • Too many false poses? β†’ Increase "Detection Sensitivity" and "Landmark Clarity"
  • Losing tracking during fast movement? β†’ Lower "Movement Tracking"
  • Need more detail? β†’ Set "Processing Speed" to "Slow but very accurate"

πŸ›  Technology Stack

Backend

  • Python 3.9+ with Flask web framework
  • MediaPipe for AI pose detection (33 landmarks)
  • OpenCV for video processing and overlay generation
  • NumPy for numerical computations

Frontend

  • HTML5 with semantic markup
  • CSS3 with custom properties and grid layouts
  • Vanilla JavaScript for interactions and real-time updates
  • Responsive Design with mobile-first approach

Deployment

  • Flask web server for local/server deployment
  • H.264 video encoding for browser compatibility
  • Progressive Enhancement for accessibility

πŸ“ Project Structure

sporttrack-ai/
β”œβ”€β”€ 🐍 Backend
β”‚   β”œβ”€β”€ app.py                    # Flask web application
β”‚   β”œβ”€β”€ pose_processor.py         # MediaPipe pose detection engine
β”‚   β”œβ”€β”€ requirements.txt          # Python dependencies (pip)
β”‚   └── pyproject.toml           # Project configuration (uv)
β”œβ”€β”€ 🎨 Frontend
β”‚   β”œβ”€β”€ templates/index.html      # Main web interface
β”‚   β”œβ”€β”€ static/css/style.css      # SportTrack.ai styling
β”‚   β”œβ”€β”€ static/js/main.js         # Frontend interactions
β”‚   └── static/Asset-3@4x.png     # Official SportTrack.ai logo
β”œβ”€β”€ πŸ“ Storage
β”‚   β”œβ”€β”€ static/uploads/           # Uploaded video storage
β”‚   └── static/processed/         # Processed video output
β”œβ”€β”€ πŸš€ Deployment
β”‚   β”œβ”€β”€ start.sh                  # Quick startup script
β”‚   └── .gitignore               # Git ignore rules
└── πŸ“š Documentation
    β”œβ”€β”€ README.md                # This file
    └── CLAUDE.md                # Development documentation

🌐 Browser Support

Browser Version Status
Chrome 80+ βœ… Full Support
Firefox 75+ βœ… Full Support
Safari 13+ βœ… Full Support
Edge 80+ βœ… Full Support

⚑ Performance

  • CPU-Optimised: No GPU dependencies, runs on any modern computer
  • Real-Time Processing: 30+ FPS pose detection
  • Efficient Encoding: H.264 compression for smaller file sizes
  • Progressive Loading: Handles large video files gracefully

🀝 Contributing

We welcome contributions! Please see our development documentation for detailed information about:

  • Development setup and guidelines
  • Code standards and testing
  • Architecture and design decisions
  • Future enhancement plans

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Install dependencies: uv sync or pip install -r requirements.txt
  4. Make your changes and add tests
  5. Commit: git commit -m 'Add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Open a Pull Request

πŸ“„ License

This project is proprietary software developed for SportTrack.ai. All rights reserved.

πŸ”’ Privacy & Security

  • Local Processing: Videos processed locally, not stored permanently
  • No Data Collection: No personal information collected or stored
  • Secure Upload: File validation and size limits prevent abuse
  • Auto Cleanup: Temporary files automatically removed after processing

πŸ“ž Support


SportTrack.ai - Revolutionising sports technique analysis with AI

🌐 Website β€’ πŸ“– Docs β€’ 🐍 Python

Made with ❀️ for athletes and coaches worldwide

About

AI-Powered Sports Technique Analysis with Real-Time Pose Detection

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages