WebTools

Remove an image background

Cuts the subject out with a model that runs on your own machine.

Cut the subject out of a photograph and leave the background transparent, or swap it for a solid colour. Good for product shots, portraits and anything that has to sit on top of another design.

A neural network (u2netp) does the work, running on your machine through ONNX Runtime compiled to WebAssembly. The model weighs 4.4 MB and downloads once; after that the photo never leaves the tab.

Do not expect the result of an hour with masks in Photoshop. Do expect a clean, usable cut-out in a few seconds, which for most purposes is exactly what was needed.

How to use it

  1. Drag in the photos.
  2. Choose whether the background goes transparent or takes a colour.
  3. Soft edge for hair and fur; clean edge for objects with a defined outline.

Frequently asked questions

When does it work well and when not?
Very well with a clear subject against a distinct background: people, products, animals. Less well with scenes that have no obvious protagonist, with very thin objects, or when subject and background share a colour.
What is the difference between soft and clean edges?
Soft keeps the partial transparency at the boundary, which is what stops hair looking like a silhouette cut out with scissors. Clean decides for each pixel whether it is in or out, and suits hard-edged objects.
Why is the first run so slow?
Because the inference engine and the model have to be downloaded and compiled. From the second image onwards everything is in memory and it is much faster.

Related tools