Skip to content
All projects

Computer Vision · 2026

Hairlync

A marketplace for barbers and salons, with AI that analyses your face and hair from a selfie and recommends the haircuts and hairstyles that suit you.

Hairlync screenshot
Role
Lead AI Developer & PM
Timeline
2026
Status
Shipped
Domain
Hair and beauty care

The brief

What it is and why it was hard

Hairlync is a marketplace where clients find barbers and salons, book appointments and get AI hairstyle recommendations, and where professionals manage their profiles, availability and bookings. The AI is my part of it. You upload a selfie and choose your gender, hair length, occasion and whether you want a haircut, a hairstyle or both. A vision model reads your face and hair and returns a structured analysis with personalised recommendations, scores and styling advice.

The problem

A vision model is flexible, and that is the problem. It sometimes returned hairstyles when the user asked for a haircut, added facial-hair advice for users who should not get it, and cut off long answers into invalid JSON.

What I did

I built the AI analysis from the API to the final output: a FastAPI service that takes the upload, sends it to GPT-4o Vision with a detailed prompt and a response schema built for each request, then validates, filters and enriches what comes back.

The system

How the pieces fit together

  1. 1

    Upload and checks

    Accepts JPG, PNG, WebP and GIF, normalises the user's choices, and scores the photo. A blurry or badly framed photo gets a retake message instead of a poor answer.

  2. 2

    Vision analysis

    GPT-4o Vision reads the selfie against a detailed prompt and a JSON schema built for that gender and service type, with fallback to other models.

  3. 3

    Validation and filtering

    Removes sections that do not belong, validates types and scores, drops duplicates, orders the results and limits how many are returned.

  4. 4

    Enrichment

    Adds a stylist-ready request phrase, salon time and price tier, hair-care advice and matching YouTube tutorials.

Choices

Decisions that shaped it

Build the schema for each request

The JSON schema changes with gender and service type, so the model cannot return a section the user should not get.

Never show a bad photo's result

A photo-quality score runs first. If the photo cannot support a reliable analysis, the user is asked to retake it.

Turn a flexible model into a predictable feature

Output is normalised, filtered and validated before anyone sees it, so the product gets reliable data and not generic chatbot text.

Capabilities

What it does

  • Selfie analysis: face shape, proportions, hair texture, density, condition, hairline, curl pattern, colour and skin
  • Haircut and hairstyle recommendations with compatibility scores and reasons
  • Styles to avoid, styling advice and upkeep, with trim frequency
  • Salon time and price tier, plus a request phrase to show your stylist
  • Beard analysis and recommendations for men
  • Photo-quality check with retake guidance
  • Matching YouTube tutorials
  • Recommendation workflows for barbers and stylists

Problems

What went wrong, and what fixed it

Problem

The model returned hairstyles for a haircut request, or facial-hair advice for users who should not get it.

Fix

I normalised the inputs, built the JSON schema from gender and service type, added explicit prompt rules, and removed invalid sections before returning anything.

Problem

Long answers hit the token limit and came back as invalid JSON.

Fix

I limited the number of recommendations, handled truncated responses explicitly, and validated types and scores.

Stack

What it is built with

AI service (mine)

  • Python
  • FastAPI
  • OpenAI GPT-4o Vision
  • OpenAI Chat Completions API
  • JSON Schema
  • Pillow
  • NumPy
  • YouTube Data API

Platform

  • Django
  • Django REST Framework
  • PostgreSQL
  • React
  • Vite
  • Tailwind CSS
  • Docker
  • AWS
  • S3
  • CloudFront
  • GitHub Actions

The result

Live at hairlync.com. The AI service is covered by 50 automated regression tests.

Next project

JobAssist AI

LLM Application

JobAssist AI preview

Have something like this to build?

I work on the AI layer: retrieval, reasoning and the code underneath. I hand it over ready to integrate.

© 2026 Md. Sakibur Rahman