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, which run Meta's DETR ResNet-50 for object detection and a selectable multimodal model (Llama 3.2 Vision, LLaVA, or Gemma) for PPE headwear compliance; results are drawn back over the live video. Because it is hosted as an open, unauthenticated demo, it ships production-grade cost controls: per-session rate limits via the Workers Rate Limiting binding and a global per-UTC-day budget cap enforced 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)
│ ~1 fps compressed JPEG over HTTPS
▼
Cloudflare Worker (Astro SSR + custom entrypoint)
├── /api/detect → DETR ResNet-50 (Workers AI)
├── /api/ppe → Llama Vision / LLaVA / Gemma (Workers AI)
│ ├── per-session rate limit (Rate Limiting binding)
│ ├── global daily cap (BudgetCounter Durable Object)
│ └── usage data point → Analytics Engine
└── scheduled() cron → Analytics Engine SQL → Email Service report