How lazgl/yogaliveposecorrector works
Project type and purpose
• This is an on-device, AI-powered yoga coaching application. It combines computer-vision (pose detection), machine-learning inference (LLM prompt engineering), text-to-speech, and a browser-based UI using Gradio. Its purpose is to run entirely offline on a local device, providing real-time visual and voice guidance for yoga posture correction.
File structure
• Top-level scripts:
• app_llm.py: Orchestrator that ties together UI, pose detection, scoring, LLM calls, and TTS.
• inference_new.py: Handles local LLM inference using Qwen/Qwen2.5.
• calculate_difference.py: Computes pose-similarity scores (cosine similarity) between detected keypoints and template poses.
• tts_utils.py: Wraps Piper TTS functionality for voice feedback.
• Configuration: requirements.txt lists Python dependencies (MediaPipe, OpenCV, Gradio, Qwen bindings, Piper).
• No separate “frontend” or “backend” folders—these are logical components in a single Python application.
README for additional insights
• Architecture hints:
• MediaPipe BlazePose + OpenCV for skeleton tracking
• Qwen-based LLM on-device for NLP corrections
• Piper TTS for audio feedback
• Gradio UI for interactive display and camera capture
• Emphasis on multi-threading, caching, offline operation, and adaptive feedback loops.