toolsmith

No upload · everything runs in your browser

How background removal actually works — and when it fails

Nothing is being cut out. A model is guessing, pixel by pixel, how much of each one belongs to the subject. Once you know that, every strange result you have seen makes sense.

Updated

It produces a mask, not a cut-out

The model looks at your photo and outputs a greyscale image the same shape as it: white where it is confident that pixel is the subject, black where it is confident it is background, and every grey in between where it is unsure. That greyscale image becomes the transparency channel of the result.

So there is no outline, no path, and nothing is being traced. What you get back is confidence, rendered as transparency. Hair, fur, motion blur, glass and shadows land in the middle of that range — and the softness you see at those edges is the model being honest rather than the model being bad.

The model is hunting for one obvious thing

U²-Net, which is what runs here, is a salient object detection network. It was trained to answer one question: in this picture, what stands out? A single subject against a reasonably plain background is exactly what it is for.

Give it a picture with no single answer and it does not refuse — it spreads a weak, uncertain mask across everything. We ran twenty-four photographs through it and read the alpha values. The ten with no single subject came back as translucent smears or as nothing at all: an aerial shot of forest produced 0.0% confident pixels while still technically 'succeeding'.

That failure is quiet, which is why the tool now measures the mask and tells you rather than handing you an empty PNG.

  • Works: one person, a product on a table, a pet, a shoe, a bicycle, a mountain against sky.
  • Does not work: crowds, traffic, a field of tulips, a bookshelf, a coral reef, forest from above.
  • In between: a group of similar objects — you may get some of them, half-transparent.

Why edges soften, and why big photos look worse

The model sees your image at 320×320 pixels no matter what size it really is, and the mask comes back at 320×320 too. To apply it, that mask has to be stretched back up to the original dimensions. On a 4000-pixel photo, one mask pixel is covering roughly a dozen real ones, and you can see it along the outline.

Nothing about picking a better photo fixes that — it is the shape of the method. If you plan to use the result small, it will not matter. If you plan to use it large, it will.

There is also a straight quality-for-download trade. The fast model is 4.4 MB and the precise one is 168 MB: forty times apart, and visibly different on the same photograph. The small one tends to leave a faint ghost of the background; the large one separates hair and small props cleanly.

When the model should not be the one choosing

If the photo has several objects, or the thing you want is not the star of the frame, no amount of model quality helps — it was never asked which one you meant.

That is a different tool. Click-based cutout runs a heavy encoder over the picture once, then answers each click almost instantly. We measured 6.0 seconds for the encoder and 0.10 seconds per click on CPU, which is the whole reason it can be a click-and-see interface rather than a wait-and-see one. One point usually gets part of an object; a second point tells it what else belongs.

Save it as PNG, or the transparency disappears

JPG has no transparency channel at all. Save a cut-out as JPG and the transparent region does not stay transparent — it comes back as white or black, and people are frequently surprised by this after the fact. PNG and WebP both carry alpha; use one of those.

One more thing worth saying out loud: the photographs people run through background removal are usually of people. This runs inside the browser tab, so the picture is never sent anywhere — but the model has to be downloaded before it can start, and we tell you the size before you commit to it.

Do it now, without uploading anything

Why did it say it couldn't find a subject?

Because the mask came back weak everywhere rather than strong somewhere. We count confidently-foreground pixels and uncertain ones separately; if there are almost no confident pixels, or they are heavily outnumbered by uncertain ones, the honest answer is that the photo has no single subject to find.

Can I get a clean edge around hair?

Partly. The precise model is much better at hair than the fast one. But the mask is computed at 320×320 and enlarged, so on a high-resolution photo there is a limit to how fine that edge can be — it will never match a mask cut by hand.

It removed the wrong object. Can I choose?

Not with background removal — the model picks what stands out and has no way to know what you wanted. Use the click cutout tool instead: you point at the object you want, and add points to include or exclude parts.

Worth reading