1. Initialise ORMBG locally
Why ORMBG matters (Apache-2.0 vs CC-BY-NC-4.0):
schirrmacher/ormbg brings the same 1024×1024 IS-Net
foreground-matting workflow as briaai/RMBG-1.4 under a permissive
Apache-2.0 license. Inference executes off the main thread in a FIFO Web
Worker via shared @huggingface/transformers@3.7.5 on CPU WASM
q8 (44.32 MB, ~5 s per 1024×1024 pass) so the UI stays responsive and INP
stays low.
2. Pick a photo or drop your own image
Initialise ORMBG above, then click Remove Background to generate a live alpha cutout.
Active image: Domestic Cat (1200×1600 · Smirkybec · CC BY-SA 4.0)
Cutout View & Before/After Wipe
See inside — 1024×1024 IS-Net pipeline & alpha histogram
ORMBG preprocesses every frame through ViTFeatureExtractor to a fixed
1024×1024 RGB tensor, runs an IS-Net encoder-decoder with
deep supervision to predict a continuous foreground probability map, upsamples back to the
original pixel dimensions, and outputs a RawImage [H, W, 4] RGBA cutout. A
clean cutout concentrates pixels at 0 (transparent background) and
255 (opaque subject), with a narrow semi-transparent transition band along
fur, hair, and anti-aliased edges.
Alpha Distribution Histogram (16 bins · 0 → 255)
Run background removal above to populate the live 0..255 pixel alpha distribution.
ONNX Artifact Breakdown (onnx-community/ormbg-ONNX)
| File | Precision | Size | Role |
|---|---|---|---|
onnx/model_quantized.onnx |
q8 (int8/uint8) |
44.32 MB | Active WASM default |
onnx/model_fp16.onnx |
fp16 |
88.12 MB | Half-precision export |
onnx/model.onnx |
fp32 |
176.12 MB | Reference full precision |
Use-case ladder — go deeper with ORMBG
Alpha Matte & Edge Anatomy Explorer
Inspect the raw grayscale alpha channel, adjust threshold, softness, and feather radius live without re-running inference, probe exact pixel alpha values, and read the worker code.
PracticalBatch E-Commerce & Asset Cutout Pipeline
Queue product photos and local uploads, auto-crop to tight subject bounding boxes with uniform studio padding and aspect ratios, and export PNGs plus JSON and formula-safe CSV manifests.
WildDie-Cut Sticker & Depth-Backdrop Studio
Dilate the live matte via an O(W·H) Euclidean distance transform into crisp dual-layer die-cut vinyl sticker borders, cast drop shadows, swap procedural backdrops, and export PNGs.
Multi-modelApache-2.0 Matting Arena: ORMBG vs MODNet
Benchmark general-purpose 1024×1024 IS-Net ORMBG head-to-head against trimap-free portrait matting MODNet on the exact same photo with live binary IoU, alpha diff, and disagreement heatmap.
At a glance & model reference
| Upstream Model | schirrmacher/ormbg (Open Remove Background · license Apache-2.0 — commercial-safe alternative to non-commercial CC-BY-NC-4.0 briaai/RMBG-1.4) |
|---|---|
| Browser ONNX Repo | onnx-community/ormbg-ONNX |
| Task & Pipeline | image-segmentation via pipeline("background-removal", "onnx-community/ormbg-ONNX") |
| Architecture & I/O | ISNet (family isnet) · 1024×1024 ViTFeatureExtractor input → RawImage [H, W, 4] RGBA cutout |
| Runtime & Backend | Shared @huggingface/transformers@3.7.5 via Web Worker · CPU WASM q8 (44.32 MB default; stays pinned to 3.7.5 where 1024×1024 WASM compilation is fast and clean) |