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

Overview

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.

You might also like...

A flutter based app using python scripts as backend for a quotes app.

A flutter based app using python scripts as backend for a quotes app.

Fluthon APP A new Flutter project which is supported from a python script and lists quotes . Deployment 📲 - /Script - python main.py. - Run main.d

Nov 16, 2022

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

flutter_tex Contents About Demo Video Screenshots How to use? Android iOS Web Examples Quick Example TeXView Document TeXView Markdown TeXView Quiz Te

Jan 5, 2023

Social Media Chat application based on mail and made with flutter

gossip_box A Social Media Chat app Based on mail built with flutter, dart and firebase. Here you can see the demo video: PS: This is created with fire

Jun 22, 2022

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

flutter_tex Contents About Demo Video Screenshots How to use? Android iOS Web Examples Quick Example TeXView Document TeXView Markdown TeXView Quiz Te

Jan 5, 2023

Alexander-Playlist - A media player and playlist based on Flutter

Alexander-Playlist - A media player and playlist based on Flutter

Alexander's App - silexcorp A new Flutter application. http://alexandermateo.com/ Config Firebase Configure firebase to your project. Screenshot | | |

Nov 8, 2021

Dart package to rank proposals according to Majority Judgment, using a score-based algorithm for performance and scalability

Majority Judgment for Dart This Dart package helps to resolve polls using Majority Judgment. Features Efficient Majority Judgment algorithm, scales we

Oct 18, 2021

Flutter based android app

Ask Us Ask Us is a flutter based android app. It's basically a discussion forum somewhat like Quora, designed to ask questions, share their experience

Dec 13, 2022

Flutter package to determine whether to prompt a user to rate your app based on a given criteria.

should_review This package helps determine if a user should be prompted to rate your app. The behavior of this package was inspired by the stackoverfl

Sep 10, 2022

Flutter based Android & iOS app for the NASH Uproar

Flutter based Android & iOS app for the NASH Uproar

NASH Uproar About the App Flutter based Android & iOS application for the NASH Uproar. Pulls data using the Wordpress API Downloading Android: Google

Apr 10, 2020
Comments
  • Added switch camera button at the top right corner

    Added switch camera button at the top right corner

    I implemented a button in lib/camera.dart that lets users switch from front camera to back camera and vice versa at the top right corner so that it does not block the user's view of the yoga pose.

    | Before | After | | :---: | :---: | | | |

    Fixes #10

    opened by NesaByte 0
  • leading back button on login page removed

    leading back button on login page removed

    Problem: The login page should not contain any back button.

    Solution: I set the appBar property of "automaticallyImplyLeading" as false.

    Result: The back button on the app bar is removed

    opened by AryanSethi 0
Owner
Aditya Sharma
I turn scrap to sculpture. Preferred Tech: Flutter 💙, Vue.js, React.js, Node.js, TensorFlow, PyTorch. ; )
Aditya Sharma
This is a Yoga app made in Flutter. This is an integration of a model that i found on https://www.uistore.design.

Yoguha A Flutter project made with Firebase that helps you for your next Yoga sessions. It contains : An authentication system A timer Some relaxing p

Scythe 2 Feb 1, 2022
Yoga training app using flutter,This project consist of two Screens.

Yoga Training App Watch it on YouTube Yoga training app using flutter,This proje

null 0 Jan 2, 2022
Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!

Quickly generate a personalized WhatsApp link with a predefined message and share it with your audience on your Social Networks!

Sanskar Tiwari 11 Aug 28, 2021
Personalized news app

taja_khobor It's a mobile application that will use the machine learning algorithm to personalize news according to individual taste. In addition to t

Md. Siam 6 Nov 2, 2022
Decentralized SkyDB-based alternative to Twitter, YouTube and Instagram with a native iOS, Android and web app.

SkyFeed SkyFeed is a decentralized SkyDB-based alternative to Twitter, YouTube and Instagram with a native Android, web and (soon) iOS app. Use You ne

null 88 Oct 28, 2022
gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required.

GUI_AUTOMATION gui automation based on pyautogui python as backend and flutter desktop as frontend, drag and drop tool, no coding required. Install py

Hassan Kanso 34 Oct 30, 2022
Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. Here is the simple program for BMI calculator in Flutter.

BMI-Calculator Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. Here is the simple progr

Renganathan 2 Oct 31, 2021
🌍 Full-stack travel app using Flutter, Dart and Geolocation service. Map updates 🗺 along with map markers based on location filters 📌

Tripscape ?? Built With Frontend Flutter Dart Backend & Libraries Geolocator Google Maps Flutter Provider API Places API Google Maps API Places Autoco

Soumyadeep Das 3 Nov 23, 2022
Pneumonia and COVID-19 detection Mobile App from Chest X-rays using CNN based deep learning classifiers.

image_classification A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you sta

null 1 Dec 7, 2021
A Flutter app based on the design of the Social Media Integeration App

A Flutter app based on the design of the Social Media Integeration App

Achmad Rizki Nur Fauzie 2 Dec 8, 2021