A real-time computer-vision demo on the Cloudflare Developer Platform. The browser samples device-camera frames and sends compressed JPEGs to Astro API routes on Workers. DETR ResNet-50 finds people and objects; the PPE view crops each detected person and asks editable yes/no, choice, and score questions through Clef Flash, Clef, Clairic, or legacy vision LLMs, drawing a label above every person. Three structured views, contributed by Brady Joslin, go further: Decide scores typed questions in a single Clef Flash forward pass with calibrated probabilities, Extract reads typed values with confidence intervals through Clairic, and Extract + Decide chains both — Clef Flash gates and routes, Clairic measures, and the Worker finishes with deterministic maths for recipes like Drink Check and Watch Reader. Because it is an open, unauthenticated demo, every inference route shares production-grade guardrails: signed sessions, IP and session rate limits, streamed JPEG/PNG validation with Images metadata checks before any provider call, and per-UTC-day provider-call budgets enforced atomically by a Durable Object, all switchable with a single PUBLIC_DEMO_MODE flag. Every inference is recorded in Analytics Engine, and a scheduled Worker emails monthly usage summaries plus daily spike alerts through Cloudflare Email Service.
Browser (camera capture + canvas overlay)
│ sampled JPEG frames over HTTPS
▼
Cloudflare Worker (Astro SSR + custom entrypoint)
├── /api/detect → DETR ResNet-50 (Workers AI)
├── /api/ppe → Clef Flash / Clef / Clairic / vision LLMs per person
├── /api/decide → Clef Flash typed decisions
├── /api/extract → Clairic typed extraction
├── /api/extract-decide → Clef Flash gate → Clairic measure → Worker maths
│ ├── signed session + IP/session rate limits (Rate Limiting)
│ ├── JPEG/PNG bounds + Images.info before provider work
│ ├── per-call daily caps (BudgetCounter Durable Object)
│ └── usage data point → Analytics Engine
└── scheduled() cron → Analytics Engine SQL → Email Service report