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.

Walk through your gym filming for 20 seconds. Valdez Magic samples the frames, a vision model on Azure AI Foundry identifies the equipment, and a workout engine builds a full longevity program around exactly what you have โ€” sets, reps, muscles, and the why behind every exercise. Then Valdez, the built-in AI coach, answers your questions.

Tech Stack

AI
Azure AI Foundry

GPT-4.1 vision + coach

PY
FastAPI + SQLite

Gyms, plans, OTP auth

WE
Workout Engine

Deterministic program builder

RW
Railway + Azure Blob

Deploy + durable media

The Problem

  • Generic programs assume a fully-equipped gym โ€” most people have a hotel gym, a garage, or a crowded chain with three racks
  • Beginners don't know what a machine is for, so half the equipment never gets used
  • Programs list exercises but never explain why, so people can't adapt when a machine is taken
  • Personal trainers cost $60-120/session; a one-time program PDF goes stale in a week

The Idea

  • Film your gym once โ€” a vision LLM on Azure AI Foundry reads sampled frames and returns a clean equipment list
  • A deterministic workout engine maps equipment โ†’ exercises โ†’ balanced weekly split (3-6 days, longevity / strength / fat-loss)
  • Every exercise ships with primary + secondary muscles, cues, and the reasoning behind it
  • Valdez, the AI coach, chats with your gym + plan as context; a built-in fallback coach answers even with no API key
  • Passwordless email + OTP login; gym videos mirrored to Azure Blob, fail-open if Azure is down

How a Scan Becomes a Program

  • Record โ€” 20s walkthrough in the browser; frames sampled client-side, video uploaded once
  • Detect โ€” up to 6 frames go to the vision model; hallucinated equipment is filtered against a 20-item catalog
  • Confirm โ€” you tick/untick what it found; sparse gyms borrow exercises across categories so no day is empty
  • Generate โ€” choose days, goal, session length; the engine emits a full week with sets, reps, rest and muscle maps
  • Coach โ€” ask Valdez anything: form cues, swaps for a taken machine, protein, rest days, VO2 work
  • Persist โ€” plans and gyms saved per user; DB snapshots and videos mirrored to Azure Blob

By the Numbers

  • 20 equipment types recognised
  • 6 frames per detection call
  • 3-6 training days per plan
  • 74 automated tests ยท 100% coverage
  • 2 AI providers supported (Foundry / Anthropic) + offline coach
  • 0 downtime if Azure fails โ€” Railway local storage is primary

Scan Your Gym

Film your gym, get your program, ask Valdez the rest. Open source โ€” run it locally or deploy your own to Railway in one command.