Short answer: a background remover produces a mask, and a mask says of every pixel that it is subject or that it is background. Along a shoulder that question has an answer. Along a strand of hair it does not — a single pixel there really is part hair and part wall — so whichever way the model decides, it is throwing away half of what was in that pixel.
This is worth knowing because it changes what you do about it. It is not a bug in one website, and trying four more will not fix it. It is a property of the question, and the fix is upstream, in the photograph.
Deciding versus measuring
There are two different jobs here and they get the same name.
Segmentation draws a line around the subject. Every pixel inside is kept whole, every pixel outside is discarded. It is fast, it is what most background removers do, and on a person against a plain wall it is completely adequate.
Matting asks a harder question: how much of this pixel is subject? The answer is a number between nothing and everything, stored as transparency, and it is the only way a strand thinner than a pixel can survive at all. It is slower, it needs more of the picture to work from, and it is what the expensive tools spend their money on.
Both are guessing. The second one is allowed to guess a fraction, which is why the strands in the right-hand panel above are still there.
The three things that always struggle
- Hair and fur. The classic case, for the reason above. Fine, flyaway strands against a busy background are the worst combination there is.
- Anything transparent. Glass, a veil, tulle, a plastic bottle, sunglasses. Every pixel is partly the object and partly whatever is behind it, all the way through the object rather than only at its edge. There is no correct mask, only a choice.
- Thin structures. Bicycle spokes, chain-link fence, plant stems, chair legs, a microphone stand. Same arithmetic as hair, and they tend to be in front of the very background you are removing.
Motion blur belongs on the list too, for the same reason: a blurred edge is a wide band of pixels that are genuinely part subject and part background.
What actually helps, before you take the photo
Almost everything that improves a cutout happens with the camera, not afterwards.
- Put contrast behind the subject. Dark hair against a pale wall works; dark hair against a dark bookcase is asking the model to find a boundary that is barely there. This single change does more than every other item on this list combined.
- Step away from the wall. A metre is enough. Standing against it puts a hard shadow right where the edge is, and a shadow is exactly the kind of ambiguous pixel that goes wrong.
- More light, flatter light. Facing a window beats a ceiling bulb. Harsh side light carves shadows into the edge you want found.
- Keep still. Motion blur widens every edge into a band of half-pixels.
- Plain beats interesting. A blank wall, a door, a sheet. The busier the background, the more places the model can find an edge that is not the one you meant.
If the shot already exists and cannot be retaken, cropping in before the cutout sometimes helps for a mundane reason: a subject filling more of the frame is a subject at higher resolution, and the strands are then several pixels wide rather than a fraction of one.
When the ragged edge does not matter
Where the cutout is going decides how good it needs to be.
If it is landing on a background of a similar tone, small errors disappear — a slightly chewed dark edge on a dark page is invisible. If it is going onto white and the original background was white-ish, likewise. The cases that expose every flaw are a light subject dropped onto a dark background, or vice versa, at large size.
So if the result looks rough in the preview, look at it on the background it is actually for before deciding it failed. Quite often it has not.
Where a good cutout gets ruined afterwards
The transparency is stored in the file, and only some formats can store it. Save a cutout as a JPG and every transparent pixel has to become some colour — usually white or black — and the work is gone. That is not a bug either; a JPG has no way to say "partly transparent". The JPG or PNG guide covers which to use and when.
The same thing happens in software that flattens: pasting into some documents, some chat apps, and anything that re-encodes on upload. If the cutout matters, keep the PNG, and put the flattened version wherever it needs to go.
Doing it without uploading the photo
Most background removers want the picture on their server. The tool here runs the model in your browser instead — the photo never leaves your machine, which for a portrait or a product shot is the difference between one copy and two.
It also means retrying is free. Try the shot, look at the edge, and if the hair is chewed, take one more photo a metre away from the wall. That second photo will do more than any amount of switching tools.