Fixing Tricky Hair Edges in Portraits

Published: August 29, 2026Updated: August 29, 2026

Maya stared at her screen, zoomed in to 400% on the edge of her client’s curly hair. The background was gone, but so were chunks of individual strands. Instead of a clean silhouette, the portrait looked like it had been eaten by moths. She needed this image for an e-commerce product page by tomorrow morning, and the current result was unusable.

This is the most common point of failure when working with automated background removal: fine details. Specifically, hair. Whether it is loose curls, flyaways, or frizzy ends, these elements blend into the background in ways that confuse even decent algorithms. Maya is a freelance graphic designer who handles product photography retouching for small online shops. Her workflow usually involves batch-processing images, but today she hit a wall with one specific hero shot.

The Initial Attempt

Maya started with the standard procedure. She opened the high-resolution JPG file, which weighed in at about 6MB, well within the limits of most web-based tools. She dragged the file into CutBG background remover. The interface was minimal, just a drop zone and a preview window. No sign-up, no credit card, just upload and wait.

The AI processed the image in seconds. It returned a PNG with a transparent background. On the first glance, it looked perfect. The model’s face was sharp, the clothing edges were crisp, and the lighting matched the original photo. Maya downloaded the file and placed it onto her white canvas in Photoshop. That is when she saw the problem. The left side of the model’s head, where the curls extended outward against a light gray studio backdrop, had lost significant definition. The algorithm had interpreted the thin, light-colored hairs as part of the background because their contrast was too low.

Diagnosing the Failure

When an AI tool fails on hair, it is rarely a bug; it is a limitation of contrast detection. If the hair color is close to the background brightness, the edge becomes ambiguous. In Maya’s case, the blonde highlights in the brown hair matched the off-white wall behind them.

She considered going back to manual masking. For a single image, drawing a path around every strand would take twenty minutes. But she had twelve similar shots to process. Manual work was not scalable. She needed a hybrid approach: use the speed of automation for the bulk of the work, then fix the specific edge cases quickly.

The Fix-It Workflow

Maya decided to adjust her source material before processing. This is often overlooked. You cannot always fix bad input with good output settings.

  1. Increase Contrast in Source: She took the original JPG and applied a subtle curves adjustment in Photoshop. She darkened the shadows slightly without touching the mid-tones. This made the boundary between the hair and the light background more distinct.
  2. Re-upload: She saved this adjusted version as a new JPG. Then, she uploaded it to CutBG again.
  3. Compare Results: The second pass was better. The AI caught more of the outer curls. However, some internal gaps remained—tiny holes inside the hair mass where the background had bled through incorrectly.

Cleaning Up the Artifacts

Now came the actual repair. Maya imported the newly generated PNG into Photoshop. Because the background was already removed, she did not need to mask anything. She only needed to paint back what was missing.

She created a new layer beneath the hair layer. Using a hard brush set to 100% opacity, she painted the background color (white) onto the areas where the hair was too sparse. Wait, that sounds counterintuitive. Let me clarify.

If the AI removed too much hair, you have holes. To fix this, you do not paint hair back; you paint the missing parts using a clone stamp or healing brush from a nearby area of intact hair.

However, if the AI left too much background attached to the hair (common with dark hair on light backgrounds), you need to erase. Maya used a small, soft eraser brush. She zoomed in to 300%. She gently erased the halo effect around the curls. The key here is patience. Fast strokes create jagged edges. Slow, deliberate taps remove the unwanted pixels while preserving the natural flow of the hair.

For the stubborn spots where the hair was completely gone, she used a technique called "fringe cleanup." She selected the edge of the hair mask, feathered it by 1 pixel, and then inverted the selection. This allowed her to delete only the very outermost ring of pixels, which often contained semi-transparent background artifacts.

Finalizing the Image

After ten minutes of targeted cleanup, the portrait looked professional. The hair had texture. The edges were soft, not plastic. Maya repeated this quick check-and-fix loop for the remaining eleven images. Most required only minor erasing. Two needed the contrast boost step. None required full manual masking.

She exported the final files as PNGs to preserve transparency. When she uploaded them to the client’s Shopify store, they loaded quickly and displayed correctly against various colored section backgrounds.

Lessons Learned

Automated tools are powerful, but they are not magic. They excel at clear boundaries: solid objects against contrasting backgrounds. They struggle with semi-transparency and low-contrast edges.

If you find yourself fighting the software, change the input. Adjusting the contrast of your original photo before uploading can save you hours of manual editing later. And remember, you do not need to redo the entire mask. Just fix the broken parts.

Next time you encounter a difficult portrait, try boosting the shadow contrast in your source file before processing. It is a small step that makes a large difference in the quality of your hair edges.