YogAI is a responsive virtual yoga instructor using pose estimation to guide and correct a yogi that runs on a raspberry pi smart mirror.
You'll need have the following installed:
- tensorflow 1.11 - pip wheel for 3.5 w/tflite working thanks to PINTO0309
- sci-kit learn
- raspberry pi 3+
- speaker with aux
- one way mirror + framing materials
$ git clone https://www.github.com/smellslikeml/YogAI $ cd YogAI $ ./install.sh
We're using a tflite Convolutional Pose Machine (CPM) model we found here. The table below offers more information about the model we are running for labeling and inference.
|Model||Input shape||Output shape||Model size||Inference time (rpi3)|
||2.6 MB||~2.56 FPS|
Using this model and the
label.py script on yoga sample poses will output 28 dim arrays of body part coordinates into a csv file.
The Hackster post will show you how to obtain training samples for your desired poses. Use the
label.py script to transform the images into 28 dim arrays with labels. The knn.ipynb is a jupyter notebook to help you train a KNN to classify yoga poses. You want to make sure your samples follow this directory structure:
├── poses │ ├── plank │ │ ├── sample1.jpg │ │ ├── sample2.jpg │ │ ├── ... │ ├── cow │ │ ├── sample1.jpg │ │ ├── sample2.jpg │ │ ├── ... . . . .
After you've trained the classifier on your samples, you should have a pickled model in the
./models directory. Simply run
to get your YogAI instructor running!
 Convolutional Pose Machine : https://arxiv.org/pdf/1602.00134.pdf
 Tensorflow wheels w/ tflite : https://github.com/PINTO0309/Tensorflow-bin
 Pose estimation for mobile : https://github.com/edvardHua/PoseEstimationForMobile
 Pose estimation tensorflow implementation : https://github.com/ildoonet/tf-pose-estimation