Back to Projects
Project 12 - Jul 17, 2026

Valdez Magic

Record a video of your gym — AI identifies every machine and hands you a complete, explained workout program with an AI coach on call

Walk through your gym filming for 20 seconds. Valdez Magic samples the frames, a vision LLM identifies all 20 supported equipment types, and a deterministic program engine builds your week: 3–6 days, longevity/strength/fat-loss goals, 30–60 minute sessions — every exercise with sets, reps, rest, targeted muscles, exact form cues, and the longevity reason it earns a spot. Valdez, the built-in AI coach, answers any question with your gym and plan as context. Email+OTP accounts, SQLite + Azure Blob storage, FastAPI backend.

Tech Stack

MP
MediaPipe Pose

33 landmarks, 100% in-browser

PY
FastAPI + SQLite

Daily entries API

AZ
Azure Blob Storage

Selfie dataset mirror

RW
Railway + Docker

One-command deploy

The Problem

Tracking body composition is high-friction:

  • DEXA scans cost $50-150 per visit and need appointments
  • Smart scales are inconsistent and can't see body shape
  • A bathroom-scale number hides recomposition — losing fat while gaining muscle looks like "no progress"
  • No daily feedback loop means motivation dies in week two
  • Sending body photos to cloud AI services is a privacy nightmare

The Solution

Make the camera the measuring tape:

  • Passwordless login — email + 6-digit OTP, then the camera does the rest
  • Pose analysis runs in the browser; video never leaves the device for inference
  • Deurenberg BMI equation + hip/shoulder ratio from live landmarks = instant estimate
  • One selfie + weight per day per user — before/after comparison across any two days
  • Chart.js trend of body fat % vs weight makes recomposition visible

The Daily Loop

  • Open — front camera starts, skeleton overlay confirms the AI sees you
  • Scan — MediaPipe Pose extracts shoulder and hip landmarks in real time
  • Estimate — Deurenberg baseline from your numbers, adjusted ±6% by torso shape ratio
  • Log — save selfie + today's weight; FastAPI writes SQLite + mirrors the image to Azure Blob
  • Track — dual-axis chart plots body fat % and weight, one point per day
  • Learn — the labeled selfie archive becomes training data for a personalized vision model

By the Numbers

  • 33 body landmarks tracked in real time
  • 0 video frames sent to a server for analysis
  • <3s from page load to first estimate
  • 1 labeled data point per day (selfie + weight + estimate)
  • 2 storage tiers: SQLite + Azure Blob mirror
  • $0 inference cost — the model runs on your device

Scan Yourself

Grab the code and run it locally, or deploy your own instance to Railway in one command. Estimates are for personal fitness tracking — not a medical measurement.