Skinstric — Real-Time Browser-Based Face Capture Module

Giannis Roussos
Published

0
  • Project creator

AI selfie-capture module built during a paid software engineering internship at Skinstric. Iterated from naive pixel-based detection to a production-grade implementation that ships well beyond the original Figma spec.

The technical core
A real-time visual feedback ring of 36 independent arc segments around an oval, each lighting up as the user’s face aligns with it. Built from first principles — no library handles this specific combination of geometry, smoothing, and rendering.

Implementation details

  • BlazeFace bounding box geometry with mirror correction for the front-facing camera (scaleX(-1) on the video element flips raw coordinates — corrected before segment math runs)
  • Per-segment confidence calculation: angle the segment occupies, find the corresponding point on the oval and on the face bounding-box ellipse, measure normalized distance, convert to confidence
  • Centering score multiplier so segments only fully illuminate when the face is both well-sized and well-centered
  • Asymmetric temporal smoothing (0.4 rising, 0.25 falling) and spatial smoothing across neighboring segments for a fluid 30fps animation
  • Rendered as a conic-gradient built from 36 per-segment RGBA values, masked with a radial gradient so only the 4px border ring shows color
  • Firebase Cloud Storage integration for capture upload and admin dashboard

Stack: TypeScript, Next.js, React, MediaPipe BlazeFace, Firebase Cloud Storage, Browser Media API, SVG, Conic Gradients

Live demo: https://www.twine.net/signin
Source: https://www.twine.net/signin