Inspiration
Online beauty and apparel retail faces an USD 816B annual reverse-logistics crisis, with 44.2% return rates in shade-sensitive categories and 62%+ landfill write-offs on opened cosmetics that cannot be restocked. When we investigated why shoppers return items they already previewed online, we uncovered a fundamental blind spot:
Standard Virtual Try-On treats living human skin like flat Photoshop paper.
- It renders a high-silica Ultra-Matte Blue-Crimson lipstick onto a portrait without knowing the shopper's stratum corneum hydration raw score is
55.8(guaranteed perioral micro-flaking within 4 hours) or that bilateral malar redness (54.2) will be visually magnified+21%by cool crimson simultaneous contrast. - It previews opaque titanium-heavy foundations without flagging grey-violet ash cast on Fitzpatrick VI deep warm-golden skin, or acidic chartreuse knitwear that washes out olive and cool-rosy complexions.
- Worst of all, shoppers add incompatible clinical actives (
1.0% Pure Retinol+pH 3.4 10% Glycolic Acid) into the same bag, stripping a reactive skin barrier and triggering product returns.
We built DermAtelier (dermatelier.vercel.app) so Perfect Corp.'s clinical Skin AI actively governs Virtual Try-On, 4-Hour Barrier Wear Forecasting, and Checkout.
What it does
DermAtelier is a closed-loop luxury clinical storefront and B2B2C Return-Shield platform chaining three live-verified Perfect Corp. YouCam S2S v2.0 APIs:
- Stage 01 — 14-Concern Clinical Skin Telemetry + CIE L*a*b* ITA° (
/s2s/v2.0/task/skin-analysis)- Scans a live webcam capture, uploaded portrait, or three unretouched Fitzpatrick II / IV / VI studio twins across 14 standard
dst_actions(wrinkle,pore,texture,acne,redness,oiliness,moisture,age_spot,radiance,dark_circle_v2,firmness,eye_bag,droopy_upper_eyelid,tear_trough). - Computes objective dermatological Individual Typology Angle in CIE L*a*b* color space alongside Perfect Corp's dual consumer
ui_scoreand unmodified clinicalraw_score, Barrier Integrity (/100), Deepgram Aura-2 Neural Audio Briefings, and remapped Spatial Zone Alpha Masks with a 2.2x Clinical Loupe:
- Scans a live webcam capture, uploaded portrait, or three unretouched Fitzpatrick II / IV / VI studio twins across 14 standard
$$\text{ITA}^\circ = \arctan\left(\frac{L^* - 50}{b^*}\right) \times \frac{180}{\pi}$$
Stage 02 — Dermal-Governed Split-Slider VTO +
T+4hWear Forecast (/s2s/v2.0/task/makeup-vto&/s2s/v2.0/task/cloth)- Evaluates every cosmetic and upper-body garment SKU against the shopper's live Skin AI telemetry (
moisturex finish demand,pore/acnex occlusion risk,rednessx simultaneous color contrast,melaninIndexx Fitzpatrick I–VI shade maps). - Intercepts high-return clashes before checkout, auto-selects a Dermal-Calibrated Counterpart, and renders an accessible WAI-ARIA Split-Slider VTO Comparator—complete with a
T+0h Freshvs.T+4h Barrier Weartoggle simulating 4-hour matte micro-creasing, pore ostia pooling, and+0.5shade sebum oxidation vs. ceramide-satin stability.
- Evaluates every cosmetic and upper-body garment SKU against the shopper's live Skin AI telemetry (
Stage 03 — Biochemical Cart Guardrail, Telemetry Passport & Live Shopify PDP Simulator
- Audits the shopping bag for active pH collisions (
1.0% RetinolxpH 3.4 Glycolic/Salicylic Acid) and VTO undertone clashes, offering 1-Click Bag Calibration, an auto-sequenced Wear Now · AM Protect · PM Renew regimen, and a downloadable Dermal Telemetry Passport (.json) bound to the order. - Provides eCommerce VPs with a Merchant Return-Shield Console featuring a dynamically computed SKU x Fitzpatrick II–VI Telemetry Matrix, interactive unit-economics sliders (
USD 238,700/mopreserved margin at 25k monthly orders), and a Live Interactive Shopify PDP Buy-Box Simulator.
- Audits the shopping bag for active pH collisions (
How we built it
- Full-Stack Architecture: Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS v4,
sharp,fflate, Deepgram Aura-2 Neural TTS (/api/youcam/tts), and Vitest, deployed on Vercel. - Dual-Framing Face-ROI & Elliptical VTO Compositing (
src/lib/youcam/image-framing.ts): Automatically extracts a768x906macro face ROI (~70%face width) to satisfy/task/skin-analysisand/task/makeup-vto, while preserving full896x1200upper-torso framing for/task/cloth—inverse-projecting returned PNG alpha masks and cosine-feathered VTO renders seamlessly back onto the full portrait. - Live-Verified YouCam S2S v2.0 Gateway (
src/lib/youcam/client.ts): Implements/s2s/v2.0/file/{service}, presigned AWS S3PUTwith SigV4 header deduplication, async task execution acrossskin-analysis,makeup-vto(foundation,lip_color,blush), andcloth, adaptive polling, and dual JSON/ZIP (fflate) parsing. - SHA-256 Unit-Shield Vault (
src/lib/youcam/cache.ts): Content-addresses every request by(service, sha256(imageBytes), canonicalParams)and persists 2-hour expiring S3 URLs locally so repeat runs consume 0 API units.
Challenges we ran into
- Solving the Dual-Framing Paradox Across Skin AI vs. Clothes VTO: During live integration against
yce-api-01.makeupar.com, we discovered/s2s/v2.0/task/skin-analysisstrictly requires face width>60%of frame (error_src_face_too_small), whereas/s2s/v2.0/task/clothrequires full upper-torso framing (~38%face width). Rather than forcing shoppers to upload two separate photos, we built asharpDual-Framing Pipeline that crops a macro face ROI for Skin AI + Makeup VTO and mathematically inverse-maps returned masks and elliptical-feathered renders onto the896x1200Clothes VTO portrait. - Strict OpenAPI Category Schemas & Expiring S3 Presigned URLs: Each
makeup-vtocategory enforces distinct payload invariants (coverageIntensity/glowIntensitywithouttextureonfoundation,shape+styleonlip_color,pattern: { name: "2colors6" }onblush), and returned S3 masks expire after7200s. We live-verified every category against the production cluster and built immutable local asset persistence. - Objective Dermatological Colorimetry: Instead of naive RGB luminance averages, we implemented sRGB gamma linearization to CIE XYZ (D65) to CIE L*a*b* and $\text{ITA}^\circ$ computation to drive inclusive Fitzpatrick I–VI shade calibration.
Accomplishments that we're proud of
- Live-verifying all three Perfect Corp. YouCam S2S v2.0 APIs (
skin-analysis,makeup-vto,cloth) in one unified consumer + B2B merchant application while preserving 987 / 1,000 hackathon API units via SHA-256 Unit-Shield. - Pioneering
T+4hBarrier Wear Forecasting—bridging static second-zero VTO with dynamic 4-hour dermatological wear physics. - Passing 16/16 automated Vitest unit and Next.js route-handler tests covering CIE L*a*b* $\text{ITA}^\circ$ colorimetry, catalog referential integrity, S2S v2.0 schemas, and zero-unit cache hits.
What we learned
- Clinical skin telemetry becomes exponentially more valuable when treated not as an isolated quiz result, but as a real-time governance layer over generative VTO parameters, shade selection, and cart formulation safety.
- Careful server-side image geometry normalization (
sharp) and content-addressed caching turn multi-second S2S computer vision pipelines into sub-20ms interactive shopping experiences.
What's next for DermAtelier
- Packaging the 1-line Return-Shield
<script>tag as a native Shopify Theme App Extension with webhook-backed return-rate attribution. - Longitudinal multi-week barrier tracking so skincare replenishments automatically titrate retinoid and acid concentrations as
raw_scorehydration and erythema telemetry improve.
Built With
- computer-vision
- deepgram
- docker
- next.js
- node.js
- perfect-corp
- react
- sharp
- tailwindcss
- typescript
- vercel
- vitest
- youcam-api
Log in or sign up for Devpost to join the conversation.