• Stars
    star
    181
  • Rank 212,110 (Top 5 %)
  • Language
    Dart
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A personalized yoga trainer app based on Flutter and TensorFlow Lite.

⛔️ DEPRECATED - This project is no longer maintained by the author. If you wish to continue working on this, feel free to fork and continue improving on it.

Thanks for your love and support! 🫢🏻


No Maintenance Intended

Yoga Guru

HomeBeginnerIntermediateAdvance

ProfileUpdate ProfileInference

Yoga Guru is your personalized yoga trainer app based on Flutter. It uses posenet, a pre-trained deep learning model, to estimate body poses in real time and predict yoga asanas.

Getting Started

Step 1: Clone the project repository

Open terminal and type

git clone https://github.com/adityaas26/Yoga-Guru.git

Step 2: Run the app

Connect your device or start the emulator and run the following code

# change directories
cd Yoga-Guru

# gets all the dependencies
flutter pub get

# run the app
flutter run

Project Structure

The project structure is quite primitive right now.

project structure

Let's look at the lib folder

project structure

Don't worry, we'll take a brief look at all the files in a minute! Let's start with main.dart

1. main.dart

main.dart loads data from shared preferences and the camera module. It also defines routes for home, login and register pages. If the user is already logged in, it sets the initial route to home.dart else login.dart.

2. login.dart

login.dart defines a Login class, which is a stateful widget. It contains the textfields required to login into the app. The Login button calls the _login() method which routes to home.dart. Also contains a button to send the user to register.dart.

3. register.dart

register.dart defines a Register class, which is a stateful widget. It contains the textfields required to login into the app. The Login button calls the _register() method which routes to home.dart. Also contains a button to send the user to login.dart.

Home

4. home.dart

home.dart defines a Home class, which is a stateless widget. It contains buttons which routes the user to poses.dart according to the button they press. Each button (beginner, intermediate, advance) call a method _onPoseSelect().

This _onPoseSelect() method is quite important as the arguments given to this function decides which list of poses needs to be shown on the poses page.




Beginner

5. poses.dart

poses.dart defines a Poses class, which is a stateless widget. It shows a list of available poses as swipable cards. The code of the custom cards can be found in yoga_card.dart file. Each card is clickable and calls the _onSelect() method which directs the user to the InferencePage (inference.dart).






Inference

6. inference.dart

inference.dart defines a InferencePage class, which is a stateful widget. It is the class which loads the posenet model. It initializes the Camera object with the camera instance and _setRecognitions() callback function. The _setRecognitions() method is responsibe for saving the predicted output of the PoseNet model into a List (_recognitions). This list of predicted values (_recognitions) is then passed to BndBox's constructor.

You can read more about the implementation here.



7. camera.dart

camera.dart defines a Camera class, which is a stateful widget. It contains code related to camera initialization and calls Tflite.runPoseNetOnFrame() method by passing in the current CameraImage as an argument. The output (predictions) of this method is given as an argument to the _setRecognitions() method, which was passed to Camera() as callback.

8. bndbox.dart

bndbox.dart defines a BndBox class, which is a stateless widget. It takes the List of predictions (_recognitions) and plot keypoints on the screen. It also prints the accuracy of the model in %.

Profile

9. profile.dart

profile.dart defines a Profile class, which is a stateful widget. It contains the code for viewing and updating the user's profile data.







Support

Buy Me A Coffee

Reach out to me at any of the following platforms:

Resources to help you start

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

More Repositories

1

Flutter-shopping-cart

A simple shopping cart app implemented in Flutter managed by the provider package
Dart
11
star
2

app-script-html-form-mailer

This is a form mailer script written in Google's app script to push html form data on a spreadsheet and mail the content to a user.
JavaScript
5
star
3

portfolio

My Awesome Portfolio
CSS
4
star
4

Dr-Posture

Dr. Posture is a web application which detects your body posture (i.e. keypoints) in real time and classifies your posture to be correct or incorrect.
HTML
3
star
5

Spreadsheet-merger

Upload multiple spreadsheets and merge them intelligently.
Python
3
star
6

Facial-keypoints-detection

Detect facial keypoints using Convolutional Neural Network in Pytorch. Use image processing techniques and deep learning techniques to detect faces in an image and find facial keypoints, such as the position of the eyes, nose, and mouth on a face.
Jupyter Notebook
3
star
7

Data-Structures-and-Algorithms

Implementation of various data structures (array, linked-lists, stack, queue, etc) and various algorithms (searching, sorting, greedy, dynamic programming, etc) in python
Python
2
star
8

Flutter-Provider-impl

A flutter app built using provider package
Dart
1
star
9

Automatic-Image-Captioning

Combine CNN and RNN knowledge to build a deep learning model that produces captions given an input image.
Jupyter Notebook
1
star
10

sajag-2019

The National Conclave on Cyber Defence - Sajag 2019 seeks to change the paradigm of how we look at digital space and security, critically assessing the impact of cyber security on business operations and their security implications.
CSS
1
star
11

the_movie_app

Dart
1
star
12

Deep-Learning

Some cool deep learning projects
Jupyter Notebook
1
star