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
- Drag in the photos.
- Choose whether the background goes transparent or takes a colour.
- 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
Convert imagesPNG, JPG, WebP and AVIF in any direction, in batches.
Compress imagesCut the weight by quality, or down to a size you pick.
Resize imagesWidth and height with fit control, and no upscaling by default.
Crop imagesDraw the crop on the picture and apply it to the whole batch.
Rotate and flipQuarter turns, and horizontal or vertical flips.