← Projects
avatar-sync — Real-Time Face and Hand Tracking in One HTML File
Product demo
Problem
Face and hand tracking demos come wrapped in a build step, a server, and usually an API key — which puts a wall in front of anyone who just wants to see what the models actually output before building on them.
Business Impact
A zero-setup base for VTuber puppeteering, gesture-controlled interfaces, and attention or drowsiness experiments — the part everyone rebuilds, already working and readable in a single file.
System Approach
- FaceLandmarker gives 478 points, 52 blendshapes, and a head transform matrix
- HandLandmarker gives 21 points per hand plus left/right handedness
- A requestAnimationFrame loop draws the frame, runs both models, and annotates a canvas
- Expression meters read blendshape scores directly — blink, brow, smile, mouth-open, pucker
- Head pose reported as yaw, pitch, and roll in degrees
- Open/closed hand detection from fingertip-versus-knuckle distance to the wrist
- MediaRecorder captures a 10-second webm of the annotated canvas
Key Decisions & Trade-offs
- One HTML file, no build step — the demo's value is how fast you can run it
- On-device models over a cloud vision API; a camera feed is not third-party data
- Show raw model scores rather than an invented confidence, so the numbers mean something
- Threshold-based emotion labels, stated plainly as thresholds, not sold as emotion AI
- Geometry for hand state instead of a second classifier — it is a few lines and it is explainable
Current Status
Public and open source (MIT) at github.com/rohitguta2432/avatar-sync. Face, hands, emotion, pose, expression meters, and recording all working. Serve the directory with any static file server over localhost or https and allow the camera.
Roadmap
- Sample rig binding so blendshapes drive a VRM or Live2D avatar directly
- Gesture event API for downstream UI control
- Per-frame data export for offline analysis
What I'd Improve Next
- Frame-rate and inference-time readout for the tracking loop
- Graceful degradation on devices where one of the two models will not load
Explore More
- TableTalk — Scan, Order, Eat: QR Ordering for Dine-In — Dine-in ordering still means flagging a waiter, squinting at a laminated menu with no photos, and repeating your order across the noise.
- Shoebox — Bill Photo to GST Ledger, Offline — Small shops in India keep supplier bills in a pile until the accountant asks.
- BridgeTrace — Find Where a USDC Transfer Stopped — A USDC transfer between chains can stop at three points: the source burn, Circle's attestation, or the destination receive transaction.
- x402-lab — Test AI-Agent Payments Before They Cost Real Money — AI agents can now pay for APIs over x402 (HTTP 402) in USDC, but there is no safe place to test it.
- All 47 projects — the full catalogue, with live links and repos.