How removing a background works in your browser
Most background removers upload your photo to a server, process it there and send back the result. ChobiKit's background remover does the whole job on your own phone or computer. This guide explains how that works, and how to get the cleanest cut-out.
What the AI actually does
Removing a background is a question asked of every pixel: is this part of the subject, or part of what's behind it? An AI model answers with a mask, a greyscale picture the same size as your photo, white where the subject is, black where the background is, and shades of grey along soft edges such as hair.
The mask is then used to make the background transparent, or to put a new colour behind the subject. The shades of grey matter: they are what lets strands of hair blend into a new background instead of ending in a hard, cut-out line.
Two models for two jobs
ChobiKit uses two open-source models:
- For a person, MODNet. It was trained to find people and to tell hair and edges apart from what is behind them. It is about 12 MB.
- For an object, U²-Net. It was trained to find the main subject of any picture: a product, a pet, a toy. Its small version is about 4 MB.
You choose Person or Object. A model made for one kind of picture usually beats a general one on that kind.
Running on your device
Your browser downloads the model from ChobiKit the first time and keeps it, so later runs start sooner. The model runs with WebAssembly, and on browsers that support WebGPU the object model can use your device's graphics chip, which is faster. Your photo is read by the browser and never leaves it.
This is why a first run on a phone takes a little longer: the model has to arrive first. After that, the work is done on the phone itself.
Cleaner edges
A photo's edge pixels mix the subject's colour with the old background's. Put on a new background, a light wall can leave a pale outline. ChobiKit works out the subject's own colours along the edge, without the old background, so the outline doesn't show.
Getting a good result
- One clear subject: a person, or a single thing.
- The subject apart from the background, not the same colour as it. A white shirt against a white wall is hard for any model.
- Even light, without a strong shadow on the wall or table behind.
- Enough pixels: at least a few hundred across.
If a piece of background stays, or a strand of hair goes, use Erase and Restore in the Cutout view to fix it by hand, with Undo if you go too far.
Saving the result
- Transparent background: saved as PNG, for designs, slides and documents.
- White or a colour: saved as JPG, ready for forms, CVs and shops. For a form, resize or compress it to the form's size next.
There is no watermark and no sign-up, because nothing passes through a server that would need paying for.