1. The announcement (primary source)
remove.bg states on its own site that background removal is moving to Canva and that the standalone website will no longer be available from 1 December 2026. We archive that banner so the date and wording are verifiable — this article is not affiliated with Canva or remove.bg.

2. The product problem: infra and cost
High-quality background removal is usually a GPU-backed API: upload → rented accelerator → PNG. Excellent at scale — expensive at “free forever, no signup, unlimited.”
Mentr Tools already ship browser-first (PDF, worksheets) on Vercel + a light API. We do not run a GPU fleet for tools today. A metered remove-bg-style API on every free visit would burn cash or force caps, login walls, or watermarks.
Constraint: inference must live on the user's device, under a commercial-friendly license, without freezing the tab.
3. Technical approach (summary)
On-device ONNX
BiRefNet_lite @ 512² via Transformers.js / ORT Web — WebGPU first, WASM fallback.
Crop-and-refine
Second pass zooms the subject into the 512 window so edges/hair get more pixels.
Guided alpha stack
Soft matte + image-guided refine + hole fill + color decontamination — not a hard mask.
Cached weights
~94 MB fp16 from Mentr CDN once; browser cache on return visits.
4. Shipped specs (accurate as of this article)
Configuration facts from production code — not marketing percentages.
- Pipelinebg-pipeline-0.3
- ModelBiRefNet_lite (512-fp16+refine)
- Weightsbirefnet-lite-512
- LicenseMIT
- Model size~94 MB fp16 (same-origin /models)
- Inference grid512 × 512 (×2 passes when useful)
- Working long side≤ 2560px (≤1280 mobile)
- RuntimePhones: WASM-first · Desktop: WebGPU → WASM
- ThreadDedicated Web Worker
- AlphaContinuous [0,1] soft matte
- PostGuided refine · hole fill · decontaminate
- Upload to MentrNever (Mode A)
5. System flowchart
Mode A (local) as shipped in bg-pipeline-0.3. HD / server Mode B stays out of scope until cost and privacy disclosure are separate decisions.
Mode A · on-device · bg-pipeline-0.3
No Mentr upload · weights cached · soft alpha preserved · MIT weights
Figure 2. Local Mode A — including the detail (crop-refine) pass.
6. Pipeline steps (technically accurate)
- 1
Validate & normalize
Reject empty / oversized / undecodable files. Sniff JPEG/PNG/WEBP magic bytes. EXIF via createImageBitmap({ imageOrientation: "from-image" }). Cap longest side at 2560px while preserving aspect ratio.
- 2
Web Worker handoff
UI thread only orchestrates. Worker loads Transformers.js, runs inference, returns Float32 alpha + RGBA with transferable buffers so the page stays interactive.
- 3
Load BiRefNet_lite 512 (cached)
Model id birefnet-lite-512 — browser ONNX export of ZhengPeng7/BiRefNet_lite (MIT). WebGPU + fp16 first; WASM + fp32 on failure or degenerate masks.
- 4
Coarse segmentation → soft alpha
Processor → 512² ImageNet-normalized tensor. Logits → sigmoid → continuous α ∈ [0,1]. Smoothstep upsample to working resolution (not hard 0/1).
- 5
Crop-and-refine (detail pass)
Foreground bbox + padding. If the subject does not already fill most of the frame, crop and re-infer so 512² focuses on edges/hair. Feather paste back into the full matte.
- 6
Post-process on main thread
Remove tiny FG speckles, fill small interior holes, image-guided bilateral alpha refine, edge-aware contrast on strong photo edges, then color decontamination on semi-transparent fringes.
- 7
Compose & download
Alpha → PNG A channel. Object URLs revoked on reset. No watermark bytes injected.
7. Why crop-and-refine matters
A single 512² pass on a full-frame photo spends most of its capacity on empty background. After a coarse matte, we locate the subject, pad ~12%, and run the same MIT model again on the crop. That is a real quality gain without switching to non-commercial weights or a paid GPU API.
We skip the second pass when the subject already covers most of the frame (little to gain) or when the box is tiny (noise).
8. Caching, mobile path, and first-load behavior
Weights are served same-origin from /models/birefnet-lite-512 (not Hugging Face live). ORT wasm lives under /ort/. Browser cache + long Cache-Control keep return visits fast. Phones use WASM-first, skip the detail pass, and cap at 1280px to avoid “Failed to create pipeline” OOMs.
Desktop prefers WebGPU then WASM. Degenerate GPU masks trigger an automatic WASM retry. The model is not loaded on the /tools hub — only on `/tools/background-remover` (warmed on page open). Work runs in a Web Worker, so switching tabs mid-run is safe — the job keeps going until you close the page.
9. Version log (what changed and why)
bg-pipeline-0.3 · September 2026 · mobile reliability
- Same-origin weights — production phones were timing out on Hugging Face (~94 MB) and then failing with “Failed to create pipeline.” Model + ORT wasm now ship from Mentr CDN on build.
- Mobile runtime path — WASM-first (skip flaky phone WebGPU), working long side ≤1280px, skip crop-and-refine on phones, always fp16 (never the 192 MB fp32 graph).
- Same quality model on purpose — we evaluated a much smaller fallback (e.g. MODNet / U²-NetP). Edge quality dropped enough that it was not “the same cutout, just faster.” For free forever + reliable, we keep BiRefNet_lite and make the runtime lighter, not the weights weaker.
- Warm-up on tool open, load retries + cache purge, and a Retry control when setup fails mid-download.
bg-pipeline-0.2 · crop-and-refine + guided alpha
Second-pass subject crop, soft matte, guided refine, hole fill, color decontamination — quality ceiling without changing the MIT model.
bg-pipeline-0.1 · initial Mode A ship
BiRefNet_lite 512 in a Web Worker, soft alpha export, no watermark / no signup product path.
10. Licensing choices
Mentr's product is MIT. An AGPL background-removal SDK in a hosted SaaS without a commercial grant is a copyleft risk we avoid. BRIA RMBG-2.0 self-host is CC BY-NC / paid API — fine for eval or future Mode B, not unpaid self-host.
Production Mode A uses BiRefNet_lite MIT ONNX (birefnet-lite-512). See docs/ml/MODEL-LICENSES.md.
11. Honest limits
- Base inference is 512² (plus a subject crop pass) — not a 1024 server GPU model.
- Low-memory phones may use WASM and take longer; we show friendly progress, not raw engine names.
- We do not claim “same as remove.bg” or “better than Canva” without a documented same-image study.
- HD 2× upscaling is not enabled until a licensed, costed path exists.
12. Try it — free forever
Need a dedicated cutout utility that is not folded into a full design suite? Upload, preview, download PNG — no watermark, no mandatory account, unlimited on-device use within your device limits.
