Personal Yoga Coach is a cutting-edge, AI-powered application designed to provide personalized yoga guidance directly on your device. The app enhances your yoga practice by offering real-time feedback, customized routines, and on-demand coaching—all while operating entirely offline to ensure privacy and accessibility.
This project won the Meta Consumer AI on the Edge Hackathon in December 2024. Huge thanks to the Lightning-Fast Teammates for making this possible: Gaspard Hassenforder, Alex Bohane, Lazlo Guioland, Julien Roubaud, and Alba Maria Tellez Fernandez.
- 🖥️ On-Device AI: Runs offline using Qwen/Qwen2.5-0.5B-Instruct for local LLM inference, ensuring privacy and no dependency on the internet.
- 🧘 Real-Time Feedback: AI-powered pose correction and accuracy scoring to help improve posture and technique.
- 🗣️ Voice and Visual Guidance: Provides both verbal cues and on-screen visual overlays for pose corrections.
- 🦾 Computer Vision-Powered Analysis: Uses MediaPipe and OpenCV for real-time human pose detection and skeleton tracking.
- 🎙️ AI-Driven Voice Feedback: NLP-driven corrections via Qwen LLM, using structured prompt engineering for precise feedback. Integrated with Piper TTS for voice-based corrections.
- 📊 Adaptive Feedback Mechanism: Scores pose accuracy and dynamically adjusts the difficulty level and feedback precision based on user performance.
- 🖥️ Gradio UI for User Interaction: Browser-based interactive interface that provides real-time visualization of detected poses and feedback.
- ⚡ Optimized Performance: Implements multi-threaded pose analysis, caching mechanisms, and lightweight inference models for seamless execution on local devices.
-
Pose Detection:
- Utilizes MediaPipe's BlazePose for extracting human body key points.
- Processes the skeletal structure using OpenCV overlays.
-
AI-Powered Correction:
- Compares detected poses with predefined yoga posture templates.
- Uses Qwen LLM to provide textual and audio-based corrections.
-
Real-Time Feedback:
- Processes corrections dynamically and offers voice guidance via Piper TTS.
- Displays visual cues on Gradio UI for better understanding.
-
Adaptive Accuracy Scoring:
- Computes pose similarity scores using cosine similarity between detected and ideal skeletal points.
- Adjusts guidance based on user performance over multiple sessions.
Follow these steps to install and run Personal Yoga Coach on your local machine.
- Python 3.8 or higher
- pip
- Virtual environment support (optional but recommended)
-
Clone the Repository:
git clone https://github.com/LazGL/YogaLivePoseCorrector.git
-
Navigate to the Project Directory:
cd YogaLivePoseCorrector -
Create a Virtual Environment (Recommended):
python -m venv venv
-
Activate the Virtual Environment:
- On Windows:
.\venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python app_llm.py
- Launch the application following the installation steps.
- Open the Gradio UI in your browser.
- Follow the on-screen instructions to start your yoga session.
- Receive real-time feedback through voice and visual guidance.
- Adjust your posture based on the corrections provided by the AI.
- All processing occurs entirely on-device, ensuring that your data never leaves your system.
- No internet connection is required, providing a secure and private experience.
- Your movement data and corrections remain completely confidential.
We welcome contributions to enhance Personal Yoga Coach! If you'd like to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -m "Add new feature"). - Push to the branch (
git push origin feature-branch). - Open a pull request.
This project is licensed under Apache 2.0, allowing modification and redistribution, as long as proper credit is given to the original author.
🚨 Additional Restriction: This code may not be used for commercial purposes without permission, as detailed in NON-COMMERCIAL.md.
Any improvements based on this code must give proper credit to the original author.
For any issues or suggestions, feel free to open an issue on GitHub or contact us via email.
🔗 GitHub Repository: YogaLivePoseCorrector