We're building AI background removal that runs entirely in your browser. Here's what we've learned about WebGPU, model size, and the trade-offs between speed and quality.
Background removal used to be a Photoshop task. Then it became a server-side AI task (remove.bg, Canva, Adobe). Now it's becoming a browser task — AI models that run on your device, with no upload.
We're building this for pictoolkit. The principle is straightforward but the engineering has real trade-offs. Here's what we've learned.
Background removal works by training a neural network to identify the "foreground" pixels of an image — the subject — and produce a mask. Pixels in the mask become transparent; pixels outside it are preserved.
Several excellent open-source models exist:
For automated background removal, BiRefNet or RMBG-1.4 are the strongest open options. We're testing both.
The biggest constraint of browser AI is download size. Users won't wait for a 500 MB model. They might tolerate 50 MB. Anything more, and they bounce.
RMBG-1.4 is about 80 MB. BiRefNet is bigger — over 200 MB in its full form. Both need to be downloaded once and cached, but that initial download is friction.
Mitigations we're trying:
Realistic target: get a high-quality model to under 50 MB.
Once downloaded, the model needs to run in reasonable time. Users tolerate ~3 seconds for a single image. More than that feels broken.
On a recent laptop with WebGPU, RMBG-1.4 takes about 800ms for a 1024×1024 image. That's acceptable. On a 2018 laptop with only WebGL, it takes 5-8 seconds. That's too slow.
The mitigation is detecting capabilities and choosing models accordingly:
WebGPU is the future of browser AI. It gives JavaScript direct access to GPU compute, similar to what CUDA gives Python. For our use case, it's 5-10× faster than WebGL.
The catch: WebGPU only shipped to all major browsers in 2023. Mobile support is still uneven. Some users have it disabled. The API itself is still evolving.
For now, we treat WebGPU as the preferred path with WebGL fallback. As adoption grows, WebGPU will become the default.
Every neural network model has a quality knob — usually the number of layers, parameters, or input resolution. More of any of these means better quality but slower inference.
We're testing several configurations:
The user picks. Most pick balanced.
AI background removal works great on common cases (people, products on plain backgrounds, clear subjects). It struggles on:
For these cases, traditional interactive tools (where the user manually refines the mask) still beat automated AI. We're considering offering both modes.
Doing this in the browser solves the biggest concern with online background removal: your images stay yours. No server sees them. No model is trained on them. No backup retains them.
This matters more than people realize. Product photos before launch, identity documents, personal photos with sensitive backgrounds — these are exactly the cases where people want background removal but worry about upload services.
Our pitch: same quality as the paid services, completely private.
We're aiming for early 2026. The model size is the main remaining hurdle — we want it under 50 MB without sacrificing quality. As soon as we hit that target, we ship.
Get notified when browser-based background removal launches. In the meantime, explore our other tools.