--- title: AI Fitness Coach - Fine-Tuned Personas emoji: 🏋️ colorFrom: blue colorTo: purple sdk: gradio sdk_version: 4.44.0 app_file: app.py pinned: false license: mit --- # 🏋️ AI Fitness Coach with Fine-Tuned Personas An intelligent fitness coaching system that analyzes exercise form and provides personalized feedback through fine-tuned language models. ## ✨ Features - **3D Pose Estimation**: Uses PoseFormer for accurate body pose tracking - **Real-time Scoring**: Analyzes form and provides detailed breakdown by body part - **4 Fine-Tuned Personas**: Each with unique coaching style - 🔥 **Hype Beast**: Energetic, motivational, hype-focused - 📊 **Data Scientist**: Analytical, metrics-driven, detailed - 💪 **No-Nonsense Pro**: Direct, tough-love, results-oriented - 🧘 **Mindful Aligner**: Calm, body-awareness focused, supportive ## 🔬 Model Details ### Training Pipeline - **Base Model**: DistilGPT-2 (82M parameters) - **Training Data**: 320 synthetic examples (80 per persona) - **Data Generation**: GPT-4o API with persona-specific prompts - **Fine-Tuning**: 1000 steps per persona, FP16 mixed precision - **Training Time**: ~15 minutes per persona on RTX GPU ### Architecture ``` User Video → MediaPipe Pose Detection → PoseFormer 3D Estimation → Scoring Algorithm → Fine-Tuned Persona Model → Feedback ``` ## 🚀 How It Works 1. **Upload Video**: Record yourself doing an exercise 2. **Select Persona**: Choose your preferred coaching style 3. **Get Analysis**: Receive detailed scoring and personalized feedback 4. **Improve**: Follow the coach's recommendations ## 📊 Performance Metrics - **Pose Detection Accuracy**: 95%+ on clear videos - **Processing Time**: ~3-5 seconds per video - **Model Size**: ~250MB per persona (compressed) - **Inference Speed**: <1 second on GPU, ~2-3 seconds on CPU ## 🛠️ Technology Stack - **Frontend**: Gradio - **Backend**: Python, PyTorch - **Pose Estimation**: MediaPipe + PoseFormer - **LLM**: Fine-tuned DistilGPT-2 - **Training**: Hugging Face Transformers, Accelerate ## 📝 Citation If you use this project, please cite: ```bibtex @software{ai_fitness_coach_2024, title = {AI Fitness Coach with Fine-Tuned Personas}, author = {Your Name}, year = {2024}, url = {https://huggingface.co/spaces/your-username/ai-fitness-coach} } ``` ## 📄 License MIT License - See LICENSE file for details ## 🙏 Acknowledgments - PoseFormer for 3D pose estimation - Hugging Face for model hosting and training tools - OpenAI GPT-4o for synthetic training data generation - MediaPipe for 2D pose detection