Inspiration

The American Cancer Society gives people facing cancer treatment a piece of advice that is easy to miss in the weeks after a diagnosis: "If you are able to plan ahead, there are a few steps you can take to fit and match your wig before you lose your hair." Take photos of your current hairstyle. Save a lock from the top front of your head, where the hair is lightest. Compare wig colours to it in natural light. Measure your head, because it "may be up to a size smaller" once the hair is gone. (ACS, Wigs for Hair Loss, last revised Sep 5, 2024)

This matters more than it sounds. Forty-seven percent of women consider hair loss the most traumatic part of chemotherapy, and 8% of patients would decline chemotherapy for fear of it (Trüeb, Curr Opin Support Palliat Care, 2010).

The window for this is short, and those weeks are already full of appointments and fear. Once the hair falls out, there is nothing left to match against. A phone photo doesn't tell a wig fitter the exact colour or the curl, and a lock of hair in an envelope can't be tried on.

Before It Falls turns that advice into something a person can do at home, in one sitting, while their hair is still theirs. It reads the hair as it is today and saves it as a Hair Passport: colour, curl type and length, ready to hand to a wig fitter or a wig shop. The ACS also notes that many insurers cover a "cranial prosthesis" with a letter or prescription from a doctor; the passport gives that conversation an exact description of what to buy (we don't promise any reimbursement). Then it lets you try real wigs on your own face, each scored by how closely it matches you.

We want to make one hard part of treatment a little easier and a little more in the patient's control. We're not doctors, and the app gives no medical advice. It does one practical thing the ACS already recommends, carefully, and stores nothing about you.

What it does

  • Capture. Three photos the way a fitter would want them: front, 45° left, 45° right, and an optional photo of the top of the head. The app asks for daylight, near a window.
  • Read. The person taps three or four spots on their own hair. We read the colour from those strands; YouCam's hair analysis reads the wave from the three angles and the length from the front.
  • Keep. Everything goes onto one Hair Passport tag: colour as numbers and in the words a fitter uses ("≈ level 4, warm"), wave ("2A to 2B, slight to medium wavy"), length, and a line in the person's own words ("I usually tuck it behind my left ear").
  • Try on. Wigs are sorted by how close they are to the passport, and each can be tried on the person's own face with YouCam hair transfer. A red thread splits the photo: drag it, and their hair today sits on one side, the wig on the other, so they compare like with like. Most people want to look like themselves again, so "Close to you" is worked out for each person: the wigs that score close to their passport come first, whether that's a soft wave, tight 4C coils or a short grey crop. "Something new" holds the rest. Every wig shows a score and the reason in plain words.
  • Share. A link for the wig fitter opens with "Hi, this is Dana. This is my hair before treatment", then the tag and the wigs they liked. The link carries measurements and the note only, never photos. The same page prints as a PDF with the try-ons, for the person to bring along. And when it's time to buy, "Ask a wig shop for this" copies one message any online wig shop understands: the colour in the words shops list wigs by, the curl type, the length and the styles they liked.

How we used the YouCam APIs

Step Endpoint What it gives us
Wave POST /s2s/v2.0/task/hair-type-detection (front, right, left) Curl class, e.g. "2A to 2B / Slight to Medium Wavy"
Length POST /s2s/v2.0/task/hair-length-detection e.g. "above chest"
Try-on POST /s2s/v2.1/task/hair-transfer with the wig's product photo as the custom reference The wig on the person's own face
Plumbing POST /s2s/v2.0/file, GET /s2s/v1.0/client/credit Uploads, and a budget guard that pauses live calls under 150 units

We also tried hair-density-detection on a top-of-head photo, because fitters ask about density. It never gave us a level (it turned the head angle down every time), so we left it out of the passport, which just says "not recorded".

The day-one test that decided the project: can hair transfer take a wig product photo (a wig on a mannequin head) and put that exact wig on a person's photo? It can. Cut, colour, parting and bangs carried over, and the face stayed the person's. Our test images, both the wig photos and Dana, are AI-generated; the transfer itself is YouCam's.

How the match works

Every number comes from our code, with no opinions from a model:

  • Colour, 60%: CIEDE2000 between the measured hair colour and the wig's colour. We checked our implementation against the published Sharma, Wu & Dalal reference pairs. A difference of 2 or less looks the same at arm's length.
  • Wave, 25%: the distance between curl classes.
  • Length, 15%: a longer wig costs half as much as a shorter one, because a fitter can trim a wig but can't make it longer. Wig colours are measured from the product photos with the same code as the person's hair, so the comparison is like for like.

Honesty, by design

  • We don't trust one number for colour. On our demo photo, a single analyzer hex came out clearly warmer than the hair really is. So the app reads colour from the strands the person taps (the middle of the lengths, ignoring shine and shadow, lighter strands kept separately), shows the fitter's words next to the numbers, and still repeats the ACS advice to keep a real lock of hair.
  • Cosmetic language only. No medical claims. The ACS is quoted for timing and insurance, not us.
  • Nothing stored. Photos go to YouCam only to be read and tried on. The fitter link holds the data in the URL itself.
  • The example is labelled. "Dana" and the wigs are AI-generated. Her wave and length were read by YouCam on her photos, and every try-on in the example is a real YouCam result, saved once so judges can click through instantly.

Challenges

  • Colour that drifts. Lighting pushes a photo warm or cool. Reading the strands the person chooses, trimming glare and shadow, and naming the level in a fitter's words made the result stable enough to act on.
  • Blonde wigs vs mannequin skin. Colour alone can't tell blonde hair from a mannequin's face, so wig colour is read from where hair sits in a product shot (the crown and the sides) instead.
  • Words that fit the moment. People use this weeks before treatment. Every line is written forward: "your hair, kept", "for the months ahead". Nothing about loss.

What's next

  • Real wig catalogues from wig retailers, measured the same way.
  • A fitter's side that can suggest a wig back into the patient's list.
  • Head-size guidance from the photos, since the ACS notes the head can be up to a size smaller after hair loss.

Try it

Built With

Share this project:

Updates

Submission history