Your personal AI yoga trainer to keep you fit and healthy
NYRA (Natural Yoga Recognition Assistant) is an AI-powered yoga assistant that helps users perform yoga poses correctly and track their progress.
Yoga is a great form of exercise with benefits including improved flexibility, strength, and reduced stress and anxiety. Research has shown that yoga can help improve metabolism, heart rate, and respiration.
However, without proper knowledge about correct posture, people may suffer from acute pain and long-standing chronic problems. NYRA solves this by providing real-time guidance through an AI assistant that ensures users maintain proper form during their yoga practice.
- 🧘 Real-time Posture Guidance: Guides users to perform asanas correctly through AI voice assistant and webcam tracking
- 🧠 Advanced AI Models: Utilizes both MediaPipe and custom fine-tuned HuggingFace models for superior pose detection accuracy
- 🗣️ Audio Cues: Provides breathing guidance with inhale/exhale audio prompts during poses
- 📊 Progress Tracking: Shows accuracy data for each asana in the form of graphs and charts
- ⏱️ Pose Timer: Tracks how long a user can hold a specific pose
- 📈 Usage Analytics: Keeps track of time invested and provides visual representation of progress
- 🔄 Hybrid Mode: Switch between different AI models for best performance based on your system capabilities
- 🌐 WebSocket Support: Enhanced real-time communications for smoother experience
- 🔥 Firebase Integration: Cloud storage for user progress and analytics
- 🎨 Engaging Interface: Designed to inspire consistency and regular practice
- 👥 Future Feature: Invite friends for yoga challenges and friendly competitions
- 🏠 Solo Practice: Ideal for people who live alone and don't want to compromise on their health
- 🔄 Consistency Builder: Rewards system helps maintain regular practice
- 🏫 Learning Environments: Can be used to build dedicated yoga learning spaces
- 🩺 Health Monitoring: Track progress and improvements in flexibility and form
- 🧘♀️ Customized Routines: Follow guided yoga sessions with correct form feedback
- HTML5
- CSS3
- JavaScript
- React 18 with TypeScript (UI Wizard)
- Tailwind CSS with Shadcn UI components
- Vite build system
- Python 3.10+
- Flask web framework
- OpenCV for computer vision
- Mediapipe for pose detection
- HuggingFace Transformers for advanced pose classification
- TensorFlow Hub for AI models
- WebSockets for real-time communication
- Firebase for cloud storage and deployment
- Matplotlib for data visualization
- Python 3.10 or higher
- Node.js (v16+) and npm for UI enhancements
- Webcam
- Firebase account (optional, for cloud features)
-
Clone the repository
git clone https://github.com/yourusername/nyra.git cd nyra -
Create a virtual environment
python -m venv .venv
-
Activate the virtual environment
- Windows:
.venv\Scripts\activate - Mac/Linux:
source .venv/bin/activate
- Windows:
-
Install Python dependencies
pip install -r requirements.txt
-
Fix potential WebSocket server issues (if you encounter them)
- The WebSocket server is now more resilient and will provide fallback functionality
- If you experience WebSocket errors, the main application will still work correctly
-
Set up UI components (optional but recommended)
cd ui-wizard-enhancements npm install npm run build cd ..
-
Run the application
- Easiest method (Windows): Run
run_yoga.batto choose your detection mode through a simple menu - Standard mode:
python app.py - HuggingFace mode:
python app_hf.py - Hybrid mode:
python app_hybrid.py
- Easiest method (Windows): Run
-
Open your browser and go to
http://127.0.0.1:5000- The Flask development server should automatically launch this in your default browser
- The application will display the home page where you can choose different yoga modes
For Python 3.12 users, please refer to PYTHON312.md for specific instructions.
If you encounter any issues, check the TROUBLESHOOTING.md guide.
To work on the UI components in development mode:
cd ui-wizard-enhancements
npm run devThis will start the Vite development server with hot module replacement.
- Standard Mode: Uses MediaPipe for pose detection (faster, works on most systems)
- HuggingFace Mode: Uses custom fine-tuned transformer models for higher accuracy (requires more computational resources)
- Hybrid Mode: Combines both approaches for optimal performance
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Aditya Singh





