Salma MayorquinTerry Rodriguez
Published © CC BY-NC-ND

YogAI: Smart Personal Trainer

Pose estimation on a Raspberry Pi to guide and correct positions for any yogi.

AdvancedFull instructions provided10 hours3,736

Things used in this project


Read more



Heart rate monitor that can pair with YogAI mirror
Heart rate arduino bb f0bkb4782x


augment snippet

example on how to augment training samples, go to for full code
#!/usr/bin/env python3
import pandas as pd
import numpy as np
import random
#Reading poses
df = pd.read_csv('./data/yoga/poses.csv', header=None)
x_coords = np.array([1,0] * 14, dtype=np.int32)       # get x coordinates only
y_coords = np.flip(x_coords, axis=0)   # get y coordinates only
def rand_shift(vec, v): 
   return vec + v * np.random.randint(-10, 10) 
def vert_swap(vec, N=96):
   def col_swap(col):
       return (N - col) % 96
   return (vec * x_coords) + apply_vec(col_swap, (vec * y_coords))
def apply_vec(f,x):
   return f(x)
out_lst = []
for row in range(df.shape[0]):
   x, y= df.iloc[row, :-1], df.iloc[row,-1]
   for idx in range(5):
       v = random.choice([x_coords, y_coords]) #randomly choose an index to shift
       vec = rand_shift(x, v)
       out_lst.append(list(vec) + [y])
   #Vertical flip
   if random.choice([True, False]):
       v_vec = vert_swap(x)
       out_lst.append(list(v_vec) + [y])
out_df = pd.DataFrame(out_lst)


Salma Mayorquin

Salma Mayorquin

11 projects • 117 followers
Software engineer AI/ML & hardware tinkerer interested in embedded AI. Lets hack the change we want to see!
Terry Rodriguez

Terry Rodriguez

11 projects • 61 followers
hack the change you want to see