Tool description
What it does: Remove the background of one image in your browser and download a transparent PNG (or preview a white-background composite). All processing runs locally in your browser—images are not uploaded to any server.
Key differentiator (visible immediately): "Runs entirely in your browser — no upload, no server-side processing."
Output: transparent-background PNG (long edge limited to 1600 px) and a white-background preview for quick checks.
Quick facts (SEO-ready keywords included)
- Primary keywords: background remover, remove background online, no upload background remover, browser-based background remover, local background removal.
- Model modes: Quick mode (u2netp.onnx, ~4.6 MB, ~1.1s inference after init) and optional Fine mode (isnet-general-use.onnx, ~176 MB, ~8s inference; first-run download time depends on network, typically dozens of seconds).
How to use (step-by-step)
- Upload or drag an image into the file input. Supported formats: PNG, JPEG, WebP. If a non-image file is supplied the UI shows an error (example message: "Only image files are accepted — please upload a PNG/JPEG/WebP.").
- Choose mode (default: Quick). Fine mode is optional and disabled by default — the UI shows file size and estimated first-run cost (e.g. "Fine mode · 176 MB · first use ~30–60s").
- Click Convert. The UI will show staged progress: runtime init → model download (percentage for fine mode) → model initialization → inference.
- Wait for the result canvas. You can toggle preview between transparent background and white background.
- Download the result as a transparent PNG. The exported image is scaled so its long edge ≤ 1600 px.
Required runtime and initialization rules (implementation-sourced; shown for transparency)
- Before initializing ONNX Runtime, set the wasm paths and thread count exactly as required: ort.env.wasm.wasmPaths = '/_assets/'; ort.env.wasm.numThreads = 1. If these are not set, the runtime may try to fetch .wasm from the network and silently fail.
- Do not pre-download large models on page load. Quick mode model (u2netp.onnx, ~4.6 MB) is loaded on-demand when first used. Fine mode (isnet-general-use.onnx, ~176 MB) only downloads after the user explicitly enables it; show download percentage and initialization steps while downloading.
- On any runtime or model load failure, surface an explicit error, disable the download action, and do not produce an output image (avoid silent degradation).
Principle & processing summary (technical overview traced to implementation report)
Pre-flight: Page loads minimal UI assets only. The user action triggers model fetch/initialization.
Preprocessing (Quick mode — u2netp.onnx):
- Resize source image to 320×320 (bilinear).
- Convert to RGB and scale pixels to [0,1].
- Normalize per-channel with mean=[0.485, 0.456, 0.406] and std=[0.229, 0.224, 0.225].
- Reorder to NCHW and feed Float32Array shaped [1,3,320,320]. (u2netp input size is fixed—feeding other sizes will cause an invalid-dim error.)
Model inference (Quick): u2netp.onnx (≈4.6 MB) — typical inference ≈1.1s on representative devices after model init.
Output postprocessing (Quick): min-max normalize the model output to [0,1] to get a coarse alpha mask. Upsample the mask to the target image size, then refine.
Refinement: Use provided matting.js ttMatting API. Generate a gray guidance map with ttMatting.grayFrom(imageData), then call ttMatting.refine(grayGuide, coarseAlpha, W, H) using the parameters recommended for the chosen model. Do not mix refine parameters between Quick and Fine modes — they are tuned for different input resolutions.
Fine mode differences: isnet-general-use.onnx expects 1024×1024 preprocessing and its own recommended refine parameters. Fine mode is optional and cannot be selected by default because it requires a large download (~176 MB) and longer initialization.
Output sizing: final exported PNG is scaled so the long edge ≤ 1600 px to preserve usable edge quality and to satisfy client-side export constraints.
Performance notes: heavy pixel work (large upscales, refine) can block the UI; provide progress updates and, where possible, chunk pixel ops (requestIdleCallback / small timeouts) to keep UI responsive. onnxruntime-web runs with wasm numThreads=1 as specified.
FAQ
-
Does this tool upload my photos to the cloud?
No. All processing (model inference and compositing) happens locally in your browser; images are not uploaded by default.
-
How long does it take to remove a background?
Quick mode (u2netp, ~4.6 MB) typically runs in about 1 second after model initialization. Fine mode (isnet-general-use, ~176 MB) requires downloading the model and may take tens of seconds on first use; display shows download percentage and initialization stages.
-
What formats are supported and what happens with non-image files?
Supported image types: PNG, JPEG, WebP. If a non-image file is submitted the app will show a clear, operation-triggered error (for example: "Only image files are accepted — please upload a PNG/JPEG/WebP.").
-
Can I get a white background instead of transparency?
Yes. The app provides a white-background preview; downloads are transparent PNGs. If you need a white JPEG, you can composite the transparent PNG on a white canvas client-side and export as JPEG.
-
Should I use Fine mode on mobile?
Generally no. Fine mode downloads ~176 MB and runs longer; it is intended for desktop use where the large model and CPU cost are acceptable. Default Quick mode is faster and recommended for mobile.
-
What happens if the model or runtime fails to load?
If the runtime (onnxruntime-web) or model fails to load, the app shows an explicit error message, disables the download, and does not produce a result image. This prevents silent failure modes found in some local-only tools.
Notes: Numbers and process details (model names, sizes, expected inference times, preprocessing and refine steps, required runtime settings) are taken from the implementation research report and model manifest used for this product.