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.
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.
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 # run the app flutter run
The project structure is quite primitive right now.
Let's look at the lib folder
Don't worry, we'll take a brief look at all the files in a minute! Let's start with 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.
The idea came to me when I first saw the PoseNet framework which is a computer vision model that estimates the pose of a person in an image or a video by estimating where key body joints are.
I started by wireframing the app and designed different app screens.
I then built different components in Flutter and then used the Flutter Tflite package to run a pre-trained PoseNet model on the image stream (video frame).
Then I trained a custom model on the output of the above PoseNet model to classify Yoga Poses. It certainly took some time to find images on google to create a dataset and fit a classifier on it.
The challenge now was to run the 2 model (PoseNet and the custom Yoga Classifier) in a pipeline in the app. For this, I had to understand how to write platform-specific code in Flutter and run custom Tflite models in Android!
It was a challenging task but in the end, all the hard work paid off and the app was up and running!
The art of practising yoga helps in controlling an individual's mind, body and soul. It brings together physical and mental disciplines to achieve a peaceful body and mind. Thus, by building this app, I wish that everyone can access and learn Yoga and keep their body, soul and mind in tune.
Any contributions to the app are most welcome!