Portrait Cutout

Remove the background from a portrait photo in the browser, with adjustable edge threshold, feather and background colour.

— views
The first run downloads the portrait segmentation model and runtime (about 12 MB, cached afterwards). Your image is never uploaded — everything happens on this device.

Segmentation uses MediaPipe Selfie Segmentation (Apache-2.0). The 249 KB model is served from this site; the runtime comes from jsDelivr. Its output is a per-pixel confidence value, and multiplying that straight into alpha leaves a grey halo around hair — so the value is remapped with a linear band around the threshold: gradients inside the band survive (keeping wispy hair), everything outside is pushed to 0 or 1. Lower the threshold to keep more edge, raise it for a cleaner but possibly balder cut.

About Portrait Cutout

Remove the background from a portrait photo in the browser, with adjustable edge threshold, feather and background colour.

The work happens in your browser: what you paste is never sent to a server, and no account is needed.

Comments

Loading comments…