Automating Weight Loss with AI

@VictorSonck

@VictorSonck

Let's Make Something!

Problem Statement

Working from home and not working out

Conceptual Solution

Lock PC every hour and force pushups

@VictorSonck

@VictorSonck

@VictorSonck

2. Pose Estimation on OAK-1

@VictorSonck

2. Pose Estimation on OAK-1

OpenCV AI Kit: OAK—1    $150

Intel Myriad X

Excellent Documentation

Now it's just a tabular data problem!

BlazePose Pose Estimation

2. Pose Estimation on OAK-1

3. Labeling

@VictorSonck

3. Labeling

PUSH UP

PUSH DOWN

Classification Annotation

@VictorSonck

How to take a picture when doing a pushup?

Answer: Overengineer it using an unnecessary amount of AI

3. Labeling

@VictorSonck

https://github.com/allegroai/clearml

3. Labeling

4. Training my own model

+ some rules

@VictorSonck

4. Training my own model

+ some rules

>>> from sklearn.svm import SVC
>>> model = SVC()
>>> model.fit(X_train, y_train)

@VictorSonck

def trigger_logic(self):
  if self.history[-1] == 0:
    self.primed = False
  if (len(self.history) > 10 
      and 
      sum(self.history[-10:]) == 20
     ):
    self.primed = True
  if self.primed:
    if (self.history[-1] == 2 
        and 
        sum(self.history[-4:-1]) == 3
       ):
      self.count += 1

4. Training my own model

+ some rules

fosdem@projectwhy.be

projectwhy.be

@VictorSonck

Check out ClearML!

It's Open Source

app.clear.ml

ML Maker

Extra: Locking The Computer

Solution:

i3lock allows remote keystrokes while locked

xdotool + the existence of the Backspace key

Locking is easy, unlocking is hard

No way to get a custom password

I know my own password