Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

NYRA - Natural Yoga Recognition Assistant

Your personal AI yoga trainer to keep you fit and healthy

About

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.

Features

  • 🧘 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

Uses

  • 🏠 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

Tech Stack Used

Front-End

  • HTML5
  • CSS3
  • JavaScript
  • React 18 with TypeScript (UI Wizard)
  • Tailwind CSS with Shadcn UI components
  • Vite build system

Back-End

  • 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

Installation

Prerequisites

  • Python 3.10 or higher
  • Node.js (v16+) and npm for UI enhancements
  • Webcam
  • Firebase account (optional, for cloud features)

Setup Instructions

  1. Clone the repository

    git clone https://github.com/yourusername/nyra.git
    cd nyra
  2. Create a virtual environment

    python -m venv .venv
  3. Activate the virtual environment

    • Windows: .venv\Scripts\activate
    • Mac/Linux: source .venv/bin/activate
  4. Install Python dependencies

    pip install -r requirements.txt
  5. 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
  6. Set up UI components (optional but recommended)

    cd ui-wizard-enhancements
    npm install
    npm run build
    cd ..
  7. Run the application

    • Easiest method (Windows): Run run_yoga.bat to 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
  8. 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.

UI Development Mode

To work on the UI components in development mode:

cd ui-wizard-enhancements
npm run dev

This will start the Vite development server with hot module replacement.

Application Modes

  • 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

Screenshots

Home Screen

Home Screen

Pose Detection

Pose Detection

Progress Analytics

Progress Analytics

Yoga Asanas

Yoga Asanas Yoga Asanas

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the 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.


Made with ❤️ by Aditya Singh

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages