Salient object detection · U-2-Net

Remove the background from any image

Upload a photo and a neural network will produce a transparent PNG with the foreground subject cleanly cut out. The model is U-2-Net, an open-source salient object detector that has become the de facto standard for this task. Free, unlimited, no account.

What this tool actually does

Removing a background from a photo is, in computer vision terms, a binary segmentation problem: for every pixel in the image, decide whether it belongs to the subject or to the surrounding scene. The output is a grayscale mask the same size as the input, where each pixel is between 0 (definitely background) and 1 (definitely foreground). That mask becomes the alpha channel of the output PNG, so when you download it the background is transparent.

The model that produces the mask is U-2-Net, published in 2020 by Qin et al. The name nests two ideas: it borrows the encoder–bottleneck–decoder shape of U-Net (originally designed for biomedical imaging), and replaces each block with a smaller U-Net of its own. The result is a network that reasons about both fine detail (a strand of hair, the edge of an earring) and overall composition (where the subject sits in the frame) in a single forward pass.

What it is good at

U-2-Net was trained on the DUTS-TR dataset, which contains roughly 10,000 images of various salient subjects: people, animals, products, vehicles, food, household objects. Because of that training distribution, the tool generally does well on:

Where it struggles

Worth knowing before you upload:

Tips for cleaner cutouts

Some practical suggestions, in order of impact:

  1. Start with a sharp source. Soft focus on the subject's edge produces a soft mask. The model can only be as decisive as the image is.
  2. Make the subject the obvious focal point. Centred, in focus, larger than other elements in the frame.
  3. Avoid same-colour backgrounds. A red shirt on a red wall is harder than a red shirt on a white wall, even though it sounds counter-intuitive.
  4. Mind the lighting. Rim light around the subject helps. Heavy shadows that match the background colour confuse the edge detection.
  5. Crop in close. If your image is 4000×3000 with the subject occupying the centre 800×600, crop first. The 512px downscale we apply will otherwise leave very little resolution on the subject itself.

What you can do with the result

The output is a regular PNG with an alpha channel — usable anywhere transparency is supported. Common uses:

Privacy

Your image is sent over HTTPS to our processing server. It lives in a temporary directory just long enough to be fed through the model and the result returned to your browser. We do not log image bytes, retain copies, or use uploads for any kind of model training. The full privacy policy covers the details.