Final code (or is it?)

https://editor.p5js.org/iss.dean/sketches/bh7KzYj6z

Intro

This week, I’d love to code an app that helps you practice yoga without an instructor. The school of yoga I’ll be focusing on is Iyengar Yoga.

It will do

It will NOT do

Use BlazePose ML library to detect body posture in 3D and offer helpful recommendations during poses, based on the desired angles of poses displayed in the book “Light on Yoga” by BKS Iyengar.

I’m not going to try and tell people what the point of yoga is, but it definitely isn’t to make you feel bad about your body by comparing it to other people. Bodies vary wildly in flexibility and strength. A pose that fits one person might not fit another person. Therefore this won’t grade your pose or gamify yoga, it will just offer friendly advice to help see something you might be missing while practicing alone.

image.png

                                                                                               *Light on Yoga, BKS Iyengar* 

Scale down

Because Light on Yoga describes over 200 poses, I’ll start out with a single pose and use the lighter BodyPose library. For the dramatic flare, it can be “warrior 2”, as seen in the image above.

Process

  1. Feeding the image above into BodyPose sketch, and mapping out the key points.
  2. Use the model to measure the angles between chosen key points.
  3. Write code that compares the key points from the live camera feed with the key points measured in the original image.
  4. Record instructions that are played for different measurements. For example, “Bend right knee”, when the knee is not bent at ~90 degree angle.