Inspiration
Virtual try-on solves the visualization step, but the shopper still has to judge whether the result is trustworthy. A generated image can look polished while changing the person's appearance, losing garment color, or smoothing away textile detail. Those problems matter when someone is deciding what to buy and what they may later return.
FitLens adds a review layer after generation. It keeps the image useful while exposing the parts a shopper should inspect.
What it does
A shopper uploads one photo and a garment reference, then chooses the garment category. FitLens securely uploads both images through the YouCam File API, creates an AI Clothes V3 task, polls until completion, and retrieves the result.
The server then analyzes three images: the shopper photo, garment reference, and generated result. It calculates four bounded metrics and combines them into a purchase-confidence score. The interface shows:
- A draggable original-versus-result comparison
- Identity, color, presentation, and detail scores
- A return-risk signal with explicit limitations
- A ranked shortlist that retains multiple completed looks
- Provider, engine, and task-status evidence
The verified demo loads immediately, so judges can inspect a real YouCam result without spending API units. Live API mode accepts new JPG and PNG inputs.
How we built it
The application uses Next.js 16, React 19, TypeScript, Sharp, and the YouCam AI Clothes V3 API.
The API flow has four server-side stages:
- Initialize two uploads with
POST /s2s/v2.0/file/cloth-v3. - Send each file to its returned pre-signed URL.
- Create and poll an AI Clothes V3 task.
- Fetch the result and run the FitLens image-analysis pipeline.
The YouCam key stays in a server-only Vercel environment variable. Uploaded images remain in request memory. FitLens adds no application-level image storage.
The scoring model weights identity continuity at 34%, color fidelity at 28%, presentation at 22%, and detail retention at 16%. The repository documents each heuristic and its limits.
Challenges
The File API call only initializes an upload. The image bytes must then be sent to the exact pre-signed URL and headers before task creation. Treating initialization as the upload produces opaque downstream failures, so the integration validates every stage separately.
Async execution was another constraint. FitLens uses a bounded 50-second polling loop, reports engine errors directly, and consumes units only when YouCam returns a successful result.
The scoring layer also needed a narrow claim. Global image statistics are useful for visual review but cannot predict physical fit. The interface states that limitation beside every result instead of hiding it in documentation.
Accomplishments
- Completed the YouCam Clothes V3 workflow with real task evidence
- Added a measurable decision layer after virtual try-on
- Built multi-look ranking rather than a single-result demo
- Kept the API credential out of browser code and the public repository
- Verified the deployed desktop and mobile interfaces with zero console errors or warnings
- Ran the full production flow successfully, including cloud image analysis
What we learned
Virtual try-on quality is easier to trust when users can inspect specific continuity signals. A single overall score is too opaque. Showing the metric components and the original image keeps the decision reviewable.
We also found that product honesty improves the workflow. FitLens calls its output purchase confidence, not size confidence. That distinction leaves room for retailer measurement data while still making the generated image more useful.
What's next
The next version would accept retailer SKU feeds, retain shortlists across sessions, and compare the same garment across colors. With product measurements available, a separate sizing model could sit beside the current visual-confidence model without mixing the two claims.
Built With
- ai-clothes-v3
- lucide
- next.js
- react
- sharp
- typescript
- vercel
- youcam-api
Log in or sign up for Devpost to join the conversation.