Run this model with HF Jobs

Run d30social/ormbg-ortweb on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/d30social/ormbg-ortweb. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/d30social/ormbg-ortweb on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers.js library
// npm i @huggingface/transformers
import { pipeline } from '@huggingface/transformers';

// Allocate pipeline
const pipe = await pipeline('image-segmentation', 'd30social/ormbg-ortweb');

ormbg-ortweb

An ONNX export of the Open Remove Background Model (ORMBG) patched to run in the browser with onnxruntime-web (WASM and WebGPU), for client-side image background removal via Transformers.js.

What this is

Same ORMBG model, same weights, same output β€” just an ONNX graph that onnxruntime-web can execute.

Attribution

Modification

The upstream ONNX export sets ceil_mode=1 on all 33 MaxPool nodes. onnxruntime-web does not support runtime ceil-based shape computation for MaxPool, so inference aborts in the browser with:

using ceil() in shape computation is not yet supported for MaxPool

Change made: ceil_mode flipped 1 β†’ 0 on all 33 MaxPool nodes (a pure ONNX graph edit β€” no retraining, no weight changes).

Why it is lossless: the model input is static [1, 3, 1024, 1024], so every pooling stage operates on even dimensions, where ceil-mode and floor-mode produce identical output shapes. Verified bit-identical to the upstream export in full ONNX Runtime: max|diff| = 0 on test images.

Files

  • onnx/model.onnx β€” fp32 (~168 MB)
  • onnx/model_fp16.onnx β€” fp16 (~84 MB; verified ≀1/255 alpha difference vs fp32)

Usage (Transformers.js)

import { pipeline } from '@huggingface/transformers';

const segmenter = await pipeline(
  'image-segmentation',
  'd30social/ormbg-ortweb',
  { device: 'webgpu', dtype: 'fp32', revision: 'main' }, // pin a commit hash in production
);

const [{ mask }] = await segmenter(imageUrlOrBlob); // mask: grayscale foreground matte

License

Apache-2.0 (inherited from the base model). See LICENSE.

Downloads last month
255
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for d30social/ormbg-ortweb

Quantized
(9)
this model