Remove Background

How background removal works

An AI model decides, pixel by pixel, how much of each pixel belongs to the subject. The rest is cut away and becomes transparent.

What the model does

A background removal model looks at the whole photo and works out what the subject is: the person, the product, the pet. For every pixel it then gives a number between 0 and 1, where 0 means background and 1 means subject. Most pixels end up at 0 or 1. The pixels along hair, fur and soft edges get values in between, and those in-between values are what keep the edge soft instead of jagged.

That map of numbers is called an alpha mask. A PNG stores it next to the colours as its transparency channel, which is why the result is a PNG: a JPG has nowhere to keep it.

What happens to your photo here

  1. Your browser makes the photo Full HD if it is larger (1920 × 1080, or 1080 × 1920 upright; up to 5% more is sent as it is). An iPhone HEIC photo becomes a JPG first.
  2. Our server passes the photo to fal.ai, which runs BiRefNet v2. The model looks at the photo at 1024 × 1024 pixels and draws the mask at the photo's own size.
  3. BiRefNet then cleans the colours along the edge with the mask, so a little of the old background does not show through hair as a coloured fringe.
  4. The PNG comes straight back to your browser. Our server does not keep it, and we ask fal.ai not to keep it either.

Why hair, fur and glass are hard

A single hair is often thinner than one pixel at the size the model looks at, so the model has to guess how see-through each edge pixel is. Fur in grass adds a second problem: blades of grass cross the fur, and the model has to decide which of them belong to the animal. Glass and smoke let the background show through, so there is no clear line to draw at all.

The other common mistake is an object touching the subject. In our test photo of puppies in a meadow, some models kept a flower petal at a puppy's paw, because nothing in the photo says the petal is not part of the dog. The model comparison shows these cases side by side.

Why the result is Full HD

The model works at 1024 × 1024 pixels whatever size the photo is, so sending a 12-megapixel photo would make the upload slower without making the outline more precise. Full HD keeps enough pixels for web pages, marketplace listings and slides, and prints sharply up to about 16 × 9 cm at 300 dpi.

Why it is free, and why there is a daily limit

Each photo costs us a fraction of a cent on fal.ai. That is what makes the tool free to use without an account. The limit of 20 photos a day per visitor keeps it that way: it stops automated scripts from running up the bill.

Remove a background now