# Background Remover

> Remove the background from photos and save a transparent PNG. Detection runs on your device, the photo is not uploaded.

- Open in browser: https://pockettoolbox.org/en/background-remover
- Runs entirely in your browser; files and input are never uploaded.

## How it works

Detects the subject with a neural network and makes the background transparent.

Drop a photo and the subject is cut out after a few seconds. Fix spots that are off with the brush: Erase removes leftover background, Restore brings back parts that were cut off. Backgrounds can be transparent, a color or the blurred original. Save as PNG, WebP or JPG, cropped to the subject if you like.

Model: IS-Net (DIS, general use, Apache 2.0) with 1024 × 1024 input, weights stored as float16 (about 90 MB instead of 178 MB) and expanded to float32 on load. Inference with ONNX Runtime Web in a Web Worker, via WebGPU on the graphics card or WebAssembly with several threads. Model and runtime are served by pockettoolbox.org and kept in the browser Cache Storage, nothing is downloaded again from the second image on. The mask is scaled up to the original size and the edge is adjusted with a smoothstep curve.

## FAQ

### Why does the first image take longer?

The first time, the browser downloads the detection model, about 120 MB in total. It stays stored in the browser afterwards, so every further image is done in a few seconds, even offline.

### How well does it handle hair?

For portraits in front of a calm background, usually very well. Single loose hairs in front of a busy background sometimes leave traces. Set the edge to "Soft" and erase rough spots by hand.

## Popular tasks

- [Remove the Background](https://pockettoolbox.org/en/remove-background)

---
PocketToolbox (https://pockettoolbox.org/en)
