Case Study · E-commerce · Computer Vision

AI Mirror

A camera "mirror" that reads a shopper's face and points them to the sunglasses that actually suit them — turning "which pair is right for me?" into a guided path to checkout.

Role
Founder & Developer
Timeline
2026
Domain
Shopify D2C · Bangladesh
Stack
React · MediaPipe
Overview

Where it started

Choshmish sells sunglasses online, and online is exactly where buying glasses gets hard — a customer can't try anything on, can't tell which frames flatter their face, and often bounces rather than guess.

AI Mirror closes that gap: a lightweight camera experience that reads face shape and fit, then recommends the frames that work — no measuring, no guessing.

AI Mirror widget
Find Your Style · launcheradd ai-mirror-hero.jpg
A floating launcher that opens a full-screen camera mirror.
The problem

Buying eyewear online is a guessing game

Before

  • Shoppers can't judge which frames suit their face online
  • Choice paralysis across a large catalog — drop-off follows
  • Wrong-fit purchases drive returns and support load
  • No guidance layer between browsing and buying

After

  • A 10-second camera scan reads face shape and fit
  • Shoppers are routed straight to frames that suit them
  • Confidence up, guesswork down
  • A guidance layer that lives right on the storefront
How it works

From camera to checkout in four steps

A floating launcher opens a full-screen camera overlay. From there, everything happens in the browser — landmarks in, tags out — before routing the shopper to frames that fit.

Capture
Live camera
Mirrored canvas
→
Detect
MediaPipe FaceMesh
468 landmarks
→
Analyse
Face shape · height : width
Fit size · pupil distance
→
Recommend
Tag-filtered search
Runs entirely in the browser — nothing leaves the device
The analysis

Turning landmarks into a recommendation

MediaPipe FaceMesh hands back 468 facial landmarks in real time. AI Mirror doesn't need all of them — just enough geometry to make two simple calls, then a third to turn them into something shoppable.

Face shape
The face's height-to-width ratio classifies it as Oval, Round, or Square.
Fit size
Pupil distance relative to face width maps to Wide, Narrow, or Standard.
The match
Shape + fit become tags — tag:oval AND tag:standard — that filter the live catalog, so results are always in-stock, real products.
Features

What the widget does

01 · Launcher

Find Your Style button

One floating button that drops into any storefront page — no redesign required.

02 · Live mirror

Feels like a mirror

Real-time FaceMesh overlay drawn on a mirrored canvas, so the camera reads naturally.

03 · Face shape

Oval, Round, Square

Derived straight from facial geometry — the height-to-width ratio of the detected face.

04 · Fit sizing

Wide, Narrow, Standard

Pupil distance relative to face width maps directly to frame fit.

05 · Recommendations

Straight to the right frames

A result card routes the shopper to a tag-filtered search — always in-stock, real products.

06 · On-device

Private by default

All processing happens in the browser — no camera frame is ever uploaded or stored.

Screens

Inside the mirror

Find Your Style launcher
Launcheradd ai-mirror-launcher.jpg
The launcher
Live camera mirror with face mesh
Live mirroradd ai-mirror-scan.jpg
Live mirror + mesh
Result and recommendations
Resultadd ai-mirror-result.jpg
Result & recommendations
Stack

Built to drop into an existing storefront

React 18 (CDN)
UI via createElement, no build step
Tailwind CSS
Styling
MediaPipe FaceMesh
468-landmark face tracking
Camera + Drawing Utils
Video feed & mirrored mesh overlay
Shopify
Storefront host & tag-based product search
Embed
Self-mounting into #ai-mirror-app
Engineering

Rebuilt for accuracy, privacy, and security

The first version worked but was rough. I rewrote it end to end: tightened the face-shape classification beyond the original two-threshold approach, moved all processing on-device so no camera frame ever leaves the browser, and closed the security gaps in how the widget loaded and mounted.

A symmetry score sits in the result as a light UX flourish — not a biometric measurement — for a touch of delight without overstating what the camera can tell you.

Impact

From guesswork to a guided pick

Turns a large catalog into a guided, personal shortlist.
Removes the biggest friction in buying eyewear online — uncertainty about fit.
Private by design — nothing uploaded, which also keeps it fast.
A reusable pattern any Shopify eyewear store could adopt.
Real numbers (scan → add-to-cart rate, conversion lift, return rate) can drop straight into this section.
More case studies

More work

See the rest of the work.