Skip to content

Shree2604/Badminton-AI-LangGraph-Analysis

Repository files navigation

🏸 Badminton AI LangGraph Analysis

⭐ Star this repo

AI-powered badminton performance analysis using computer vision, LangGraph orchestration, and Gemini AI

Python 3.8+ MIT License PRs Welcome

Pose Detection Demo

🎥 Click above to watch: Revolutionizing Badminton Training with AI: A Deep Dive into LangGraph-Powered Analysis

🚀 What It Does

Transform your badminton videos into comprehensive performance insights with cutting-edge AI technology:

🎯 Core Features

  • 🧠 Real-time pose detection - Track 33 body keypoints with MediaPipe precision
  • ⚡ LangGraph orchestration - Seamless linear pipeline processing
  • 📊 AI-generated reports - Customized insights for coaches, players & parents
  • 🌍 Multi-language support - Available in English, Hindi, Tamil, Telugu, Kannada
  • 🎥 Video annotations - Professional pose tracking visualization
  • 📈 Performance metrics - Advanced analysis including elbow angles and wrist distances
  • 📄 PDF report generation - Professional formatting with multilingual support

🏗️ System Architecture

System Architecture

Linear pipeline architecture powered by LangGraph orchestration

The system follows a sophisticated pipeline:

  1. Video Input → MediaPipe pose detection
  2. Data Processing → Performance metrics calculation
  3. AI Analysis → Gemini-powered insights generation
  4. Report Generation → Multi-format output (PDF, TXT, Annotated Video)

🛠️ Prerequisites

Before getting started, ensure you have:

Requirement Version Purpose
Python 3.8+ Core runtime
OpenCV Latest Video processing
MediaPipe Latest Pose detection
Gemini API Key - AI analysis
CUDA GPU Optional Faster processing

⚡ Quick Start

🔧 Installation

# 1. Clone the repository
git clone https://github.com/Shree2604/Badminton-AI-LangGraph-Analysis.git
cd Badminton-AI-LangGraph-Analysis

# 2. Create virtual environment
python -m venv venv

# 3. Activate virtual environment
# Linux/Mac:
source venv/bin/activate
# Windows:
.\venv\Scripts\activate

# 4. Install dependencies
pip install -r requirements.txt

🔑 Environment Setup

Create a .env file in the project root:

GEMINI_API_KEY=your_gemini_api_key_here

🚀 Run Analysis

# Basic usage
python main.py --video_path your_match.mp4

# Advanced usage with all options
python main.py \
  --video_path your_match.mp4 \
  --roles coach,student,parent \
  --language en \
  --output_dir ./analysis_results

🌐 Web Application

Deploy the web interface for easy access:

# Navigate to web app
cd web_app

# Install web dependencies
pip install -r requirements.txt

# Launch Flask application
python app.py

🌟 Access at: http://localhost:5000

🎯 Feature Overview

🎥 Video Processing 📊 Analytics 📝 Reporting
MediaPipe pose detection Performance metrics Role-based insights
Frame extraction Elbow angle analysis Multi-language support
RGB conversion Wrist distance tracking PDF generation
Pose visualization Movement patterns Professional formatting

🔍 Detailed Capabilities

🎯 Pose Analysis 📈 Performance Metrics 🗣️ Multi-Modal Analysis
33-point body keypoint tracking Joint angle calculations Video pose detection
Real-time pose estimation Distance measurements Audio transcription (Google Web Speech API)
Movement pattern recognition Movement velocity analysis Combined insights generation
Biomechanical analysis Form assessment Speech-to-text processing

🤝 Contributing

We welcome contributions! Here's how to get involved:

🔄 Development Workflow

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📧 Support & Contact

Need help or have questions?

Email GitHub Issues

Built with ❤️ by ShreeRaj Mummidivarapu

Elevating badminton training through artificial intelligence

About

An intelligent badminton analysis tool that leverages LangGraph for parallel processing of match footage, delivering real-time performance metrics, multi-language reports, and AI-powered insights for players and coaches to elevate their game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors