VitaLens: a live X-ray mirror in your browser
Point a laptop or phone camera at yourself and see your skeleton, organs, brain, muscles and blood vessels move with you in real time. Tap any part for an AI explanation, or show the camera a rash or a sore throat for careful, structured AI guidance.
- ~1,200rigged anatomy parts
- 46bones solved per frame
- 9languages
- 18.5 → 3.5 MBanatomy download
Open VitaLens (opens in new tab) · Try the demo without a camera (opens in new tab)
Two tools in one app
| X-ray mirror | AI health check | |
|---|---|---|
| You | Stand in front of the camera | Show the camera a rash, a red eye, a sore throat |
| You get | 7 anatomy layers drawn on your body, following you live | What the AI sees, possible causes, home care, OTC options and an urgency level |
| Runs | Entirely on your device; video is never uploaded | One photo, only when you choose to send it |
How the mirror works, frame by frame
- Track. MediaPipe finds 33 body points, 478 face points, 21 points per hand and a body outline. An adaptive schedule spends the time budget where it matters: the face while you face the camera, the hands while they’re raised.
- Smooth. A One-Euro filter keeps still poses steady and fast moves responsive.
- Solve the rig. Landmarks become 46 bone transforms. The jaw hinges at the real jaw joint, and at a laptop, where only your shoulders are visible, the pelvis is estimated from your posture.
- Draw. The GPU skins about 1,200 BodyParts3D parts onto the bones with custom X-ray shaders. The camera image inside your outline becomes an inverted X-ray film, and anatomy is clipped to your silhouette.
- Label. The most important visible structures get atlas-style callouts that never cover the controls.
The hard parts
- A perspective-correct head. The skull is solved for a real pinhole camera, so it stays on your face when you lean in close or turn sideways, instead of sliding off like a flat overlay.
- Fast on weak devices. Tracking runs in a background Web Worker with a main-thread fallback. The anatomy download is meshopt-compressed from 18.5 MB to 3.5 MB, repeat visits load from an offline cache, and a power saver steps in when the frame rate drops.
- An asset pipeline. Python (trimesh, numpy, scipy) simplifies, re-orients and rigs the raw BodyParts3D models into seven layers the browser can stream.
A careful AI health check
The health check sends one photo, only on request, to Claude with a safety-focused system prompt, and gets back a schema-validated answer: what’s visible, possible causes with likelihood, home care, over-the-counter options (each with a caution) and when to see a doctor.
- Five urgency levels with conservative thresholds for children, older adults, pregnancy and eyes. During follow-up questions, urgency and red flags can only go up, never down.
- Signed conversations. Follow-ups must carry a server signature of the conversation so far, so earlier AI replies can’t be forged by the client.
- Cost and abuse limits shared through Upstash Redis: per-person and global daily caps, a token ceiling per answer, and a fallback to a tenth of the budget if Redis is down.
- Guidance, not diagnosis. OTC options only, never prescription drugs, and a consent screen before first use.
More than a demo
Posture and joint-angle readings (measured on the device, with no AI cost), a narrated anatomy tour and quiz in 9 languages, photo and 8-second clip sharing, a back-camera mode for X-raying someone else, on-device history to compare a rash over days, and a PDF report to share with a doctor.
Privacy and security
The camera feed never leaves the device. The API accepts same-origin JSON only, checks size and JPEG format, allowlists anatomy questions, and the app ships a Content Security Policy, HSTS and anti-framing headers.