BackgroundReplacer

Guide

Fixing Hair Edges on a Cut-Out

Hair is where a background removal is won or lost. This guide walks through the views and tools in the editor that deal with it, in the order that works best.

The cut-out portrait, originalOriginal
The cut-out portrait, on whiteOn white
The cut-out portrait, on blackOn black
The same cut-out in three of the editor’s views. Check hair on both white and black before you download.

First, look at the edge properly

A cut-out on a checkerboard hides most problems. Switch the view to On white and then On black (the I key cycles through the views). Dark hair that looks fine on white often shows a pale halo of the old background on black; blond hair does the opposite. The Mask view shows the matte itself in black and white, which makes stray specks and holes easy to spot.

The result bar under the canvas reports the edge in one line, and the Cut out stage warns when it counts stray fragments, small holes or an unusually wide soft edge.

Hair detail, everywhere or where you paint

Hair detail is on by default. It refines the edge against the photo itself, pulling the matte toward fine strands where the picture has them and leaving flat areas alone. On most portraits that is all you need.

Sometimes it helps the hair and hurts a shoulder or a collar that should have stayed crisp. Under Refine edge, set Where hair detail applies to Only where I paint, then brush over the hair. The refinement now applies only inside what you painted, and Clear painted areas starts again.

Bring back strands, take out the halo

  • Smart restore paints the subject back but only where the color matches the place you started the stroke, so dragging along a fringe recovers strands without bringing back the wall behind them.
  • Remove fringe takes the old background's color out of semi-transparent edge pixels, which is what a halo usually is.
  • Remove colour cast, in Finish, goes a little further inside the hair, where a green wall or a blue sky has tinted the strands themselves. It only removes color that points the same way as the old background's.
  • Shift edge pulled slightly inward drops a thin rim of background; pushed outward it recovers an edge that was clipped.

When the model got the hair badly wrong

If a whole section of hair is missing, try the Person model rather than Auto or Object; it is trained on people and hands back a softer matte. For a small head in a wide photo, Detect in a box runs the model again on only the area you draw, so the hair gets the model's full input size instead of a corner of it.

If you prefer another program for detail work, Save mask exports the matte as a grayscale PNG at the photo's size, and Load a mask brings the edited one back.

Finish so the new background agrees

Hair looks most natural when the light behind it matches the new background. Light wrap, in Finish, lets a little of the new background's light into the outer edge of the hair. Keep it low; a little goes a long way. Match automatically nudges the subject's brightness and warmth toward the backdrop.

Questions people ask

Why does the hair look fine on white but bad on black?

The pale fringe left over from a light background is invisible on white and obvious on black. Raise Remove fringe, and check again on both views.

Hair detail softened my collar. What do I do?

Set Where hair detail applies to Only where I paint and brush over the hair only. The collar keeps its crisp edge.

Can I edit the mask in another program?

Yes. Save mask writes a grayscale PNG (white is kept) at the photo's size. Edit it and use Load a mask to bring it back.

Does any of this upload my photo?

No. The model, the refinement and every tool here run in your browser on your device.

Try it in the editor