Image · 55 tools · nothing uploads

Remove portrait background

Cut a person out of a photo and leave the background transparent, using the MODNet portrait model served from this site, on your device. A product shot or a photo with no person in it will not cut out cleanly: the model only knows people.

Input

Options

Remove portrait background runs the MODNet matting model over your photo and returns a transparent PNG named with a -nobg suffix. MODNet is trained on people only: feed it a product shot or an empty room and the cutout comes back empty or wrong. The 37MB model downloads only once you tick the box, and this app keeps no copy of it.

Questions

Does my photo get sent to a server to be cut out?

No. The matting runs on your device with ONNX Runtime through transformers.js, inside a Web Worker in this tab. The model file is fetched from this site, never from a third party: remote model loading in transformers.js is switched off, and the WebAssembly runtime path is pinned to this origin so nothing can silently fall back to a CDN.

Why do I have to tick a download box first?

Because the model is a 37MB download and the tool refuses to start one you did not ask for. Until you enable the download option it stops with "Removing an image background needs a 37MB model downloaded to this device", and the same message says it is served from this site and is not part of the offline bundle. That gate applies on every surface, including the command line.

Is the model saved so the next run is free?

The app itself stores it nowhere. It is kept out of the service-worker precache and the transformers.js browser cache is turned off, so the file is requested again on every run. In practice your browser HTTP cache answers the repeat, measured at 416 bytes of revalidation against 37MB the first time. This tool does not work offline, unlike the tools with no model.

Which model is doing the work, and what is it good at?

MODNet, in its half-precision ONNX form, run at a reduced size internally and scaled back up to your original dimensions. It is trained on people only, and nothing else: a product shot or an empty room will not cut out cleanly, since there is no person in it for the model to find. The report then says 0% of the image kept as subject when nothing looked like a person at all.

Why is the result always a PNG?

Because JPEG has no alpha channel, so keeping your input format would hand you a cutout pasted onto black. The output is a lossless PNG named with a -nobg.png suffix. Existing transparency is respected: the matte is multiplied into the alpha you already had rather than replacing it, so a partly transparent PNG cannot gain opacity.

Is there a size limit?

No cap here. The model runs at a fixed internal size no matter what you drop in, capped at 512 pixels on the short side and 1536 on the long side, so a large photo costs no more model time than a small one; a 6000x4000 PNG was measured at about 5.7 seconds. Upscale image is the tool with a hard megapixel limit, because its cost scales with the input.

Compare

ToolRuns on the CLILive as you type
Remove portrait backgroundYesNo
Upscale imageYesNo
Image to text (OCR)YesNo

Related Image tools