Guide · Updated October 2026
How to Fix Rough Edges, Hair, and Glass in Cutouts
Automatic background removal gets you 95% of the way on most photos. This guide is about the other 5%: why edges fail, what can actually be fixed, and the honest limits of what any automatic tool can do.
Why edges fail
A segmentation model classifies every pixel as subject or background. Most pixels are easy — clearly shirt, clearly wall. Edge pixels are the hard ones: a pixel on the boundary of a sleeve is half sleeve, half wall, and the model must pick one. Motion blur, similar colors, and fine detail multiply these ambiguous pixels, and wrong guesses show up as ragged edges, nibbled outlines, or chunks of background clinging to the subject.
Understanding this sets expectations correctly: edge problems are usually missing information, not software bugs. A blurry boundary cannot be sharpened into a correct one — the true edge was never recorded. Some fixes below recover the situation; some cases just need a better source photo (see our shooting guide).
Hair and fur
Fine hair is the hardest case in background removal, and you should know the honest limit first: no automatic tool preserves every strand. A single hair is often thinner than a pixel, so the sensor itself blended it with the background. What the tool gives you is the best statistical guess — good on solid masses of hair, approximate on flyaways.
What actually helps, in order of effectiveness:
- Re-shoot with contrast. Dark hair on a light background (or the reverse) gives the model the separation it needs. This fixes more hair problems than any software.
- Kill the backlight. Hair glowing from behind turns translucent and unrecoverable. Front or side lighting keeps strands opaque.
- Accept minor losses. Losing a few flyaway strands is normal and invisible at listing or profile size. Zooming to 400% to inspect individual hairs is how you turn a finished image into an unfinished one.
For hair that must be preserved — a salon portfolio, for example — manual masking is the answer. Load the cutout into a free editor (see manual cleanup below) and paint the hair back in on a layer mask with a soft brush at low opacity. Ten minutes of touch-up beats an hour of fighting automatic settings.
Halos and color fringing
A halo is a faint outline of the old background clinging to the subject — a light outline around a dark jacket, or a greenish fringe where foliage was behind. It happens because boundary pixels were blends of subject and background, and the model kept the blended color.
Fixes:
- Defringe. Most editors have a defringe or "remove halo" function (in Photopea: Select > Modify > Defringe, or Layer > Matting > Defringe). It replaces edge-pixel colors with colors sampled from inside the subject. One click, and mild halos disappear.
- Contract the selection slightly. Shrinking the mask by 1–2 pixels cuts off the contaminated outer ring. You lose a pixel of edge, which is invisible at normal sizes.
- Prevent it next time. Halos are worst when the old background was a strong color. Shooting on a background close to the final backdrop color (white product on white sweep for a white listing) makes any residual fringe invisible.
Glass and transparent objects
Glass breaks the core assumption of segmentation: that each pixel is either subject or background. A pixel showing a glass bottle is both — the bottle and whatever is behind it. The model sees the background through the glass and classifies those pixels as background, cutting holes straight through the object.
Practical approaches:
- Shoot on the final background color. A glass photographed on white, destined for a white listing, barely needs cutting out — the "background" inside the glass already matches. This is the standard product-photography solution and it sidesteps the problem entirely.
- Mask glass by hand. For glass on varied backgrounds, automatic tools will not do it. Trace the outline manually (pen tool) and keep the interior untouched — you want the transparency of the original photo, not a cutout.
- Do not expect AI to understand refraction. Bent and distorted background visible through glass is genuinely ambiguous. Manual work is not a workaround here; it is the correct method.
Shadows: keep or remove
Decide deliberately. A soft shadow grounds a product and looks natural on a lifestyle-style listing; marketplaces with pure-white image requirements usually want it gone. The mistake is the accidental half-shadow — a gray smudge that survived removal and looks like dirt.
To remove: if the shadow is separate from the subject, manual masking takes it out cleanly. If it touches the subject, defringe-style cleanup plus a slight mask contraction usually handles it. To keep: do not cut so tight that the shadow gets clipped mid-fade — either include the full soft shadow or remove it entirely.
Manual cleanup: the actual workflow
Deback does automatic removal — one click, no manual tools. When a cutout needs hand-finishing, use a free editor. Photopea runs in the browser and opens PSD, XCF, and PNG files; GIMP is the free desktop alternative. The workflow:
- Open the cutout. Load your transparent PNG. Add a temporary solid background layer behind it (bright red works well) so edge problems are visible.
- Add a layer mask to the cutout layer if it does not have one. You will paint on the mask, not the image — black hides, white reveals. Mistakes are reversible.
- Fix large errors with a hard brush. Missing chunk of a strap, leftover background blob — paint black or white at 100% opacity. Work at 100–200% zoom.
- Fix hair and soft edges with a soft brush at low opacity. 20–30% opacity, build up gradually. You are sculpting the edge, not stamping it.
- Defringe. Run the editor's defringe on the layer to kill color halos in one pass.
- Check on multiple backgrounds. Toggle your temporary background between white, black, and mid-gray. Problems hide on one and show on another.
- Delete the temporary background and export the PNG.
Most cleanup jobs take five to fifteen minutes. If you are spending longer, the source photo is the problem — re-shooting is faster than another hour of mask painting.
When to trace by hand instead
Automatic removal is the wrong tool for some subjects, and recognizing them saves time:
- Hard-edged geometric products — boxes, books, phones. A pen-tool path gives a perfectly crisp edge in two minutes; AI gives a slightly wobbly one.
- Glass and transparency — covered above. Manual, always.
- Subjects the model was not trained on — unusual objects, abstract shapes. If the first attempt is wildly wrong, it will not get better with retries.
The professional workflow is hybrid, not ideological: automatic removal for the 95% it handles well, manual tools for the rest. Knowing which 5% you are looking at is the actual skill — and now you know what to look for.