README
CutItOut is a privacy-first, in-browser background remover, cutout tool and collage maker. It is 100% client-side — images never leave your device. It's a static site with no build step and no server.
Privacy model
There is no upload. When you open an image it is decoded into a canvas in your browser's memory and discarded when you close the tab. The AI model is downloaded to your device and runs there; your pixels are never transmitted anywhere. The full detail is in the privacy policy.
How the cutting works
Editing happens on stacked canvases in image-pixel space, so zoom never affects output quality.
Magic Erase
A 4-connected flood fill over squared RGB distance from the pixel you click. Pixels comfortably inside the tolerance become fully transparent; pixels just past the threshold get partial transparency, so edges come out anti-aliased instead of jagged.
Smart Lasso
The interesting one. Draw a rough loop and it snaps to the object's real edges:
- Crop the loop's padded bounding box and run matting on just that crop — the loop tells the AI which object you mean, the AI supplies the edge.
- Multiply the AI's alpha by a feathered version of your drawn loop, so the final edge follows the object's contour rather than your shaky hand.
- Flood-fill outward through AI-foreground pixels to recover parts the loop accidentally clipped — a chin, hair, an ear.
- If the model can't load, fall back to colour-based region growing rather than the raw polygon.
Undo history
History stores the alpha channel only as a Uint8Array.
Every edit touches alpha and nothing else, and the pristine RGB is kept
separately, so alpha alone fully describes a state — at a quarter of the memory
of full RGBA snapshots.
The first time you use an AI tool
Because the AI runs on your device rather than on a server, your browser has to fetch it once before the first cutout. It's a sizeable one-time download, after which it's cached — every cutout after that is fast and works offline.
Credits
Subject detection uses BiRefNet (MIT) running via Transformers.js (Apache-2.0). Both are open source and run entirely on your device.