onnx-community / BiRefNet_lite-ONNX

huggingface.co
Total runs: 19.6K
24-hour runs: 906
7-day runs: 3.3K
30-day runs: 9.5K
Model's Last Updated: October 27 2025
image-segmentation

Introduction of BiRefNet_lite-ONNX

Model Details of BiRefNet_lite-ONNX

Bilateral Reference for High-Resolution Dichotomous Image Segmentation

1 Nankai University 2 Northwestern Polytechnical University 3 National University of Defense Technology 4 Aalto University 5 Shanghai AI Laboratory 6 University of Trento
DIS-Sample_1 DIS-Sample_2

For more information, check out the official repository .

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

You can then use the model for image matting, as follows:

import { AutoModel, AutoProcessor, RawImage } from '@huggingface/transformers';

// Load model and processor
const model_id = 'onnx-community/BiRefNet_lite';
const model = await AutoModel.from_pretrained(model_id, { dtype: 'fp32' });
const processor = await AutoProcessor.from_pretrained(model_id);

// Load image from URL
const url = 'https://images.pexels.com/photos/5965592/pexels-photo-5965592.jpeg?auto=compress&cs=tinysrgb&w=1024';
const image = await RawImage.fromURL(url);

// Pre-process image
const { pixel_values } = await processor(image);

// Predict alpha matte
const { output_image } = await model({ input_image: pixel_values });

// Save output mask
const mask = await RawImage.fromTensor(output_image[0].sigmoid().mul(255).to('uint8')).resize(image.width, image.height);
mask.save('mask.png');
Input image Output mask
image/png image/png
Citation
@article{BiRefNet,
  title={Bilateral Reference for High-Resolution Dichotomous Image Segmentation},
  author={Zheng, Peng and Gao, Dehong and Fan, Deng-Ping and Liu, Li and Laaksonen, Jorma and Ouyang, Wanli and Sebe, Nicu},
  journal={CAAI Artificial Intelligence Research},
  year={2024}
}

Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx ).

Runs of onnx-community BiRefNet_lite-ONNX on huggingface.co

19.6K
Total runs
906
24-hour runs
1.4K
3-day runs
3.3K
7-day runs
9.5K
30-day runs

More Information About BiRefNet_lite-ONNX huggingface.co Model

More BiRefNet_lite-ONNX license Visit here:

https://choosealicense.com/licenses/mit

BiRefNet_lite-ONNX huggingface.co

BiRefNet_lite-ONNX huggingface.co is an AI model on huggingface.co that provides BiRefNet_lite-ONNX's model effect (), which can be used instantly with this onnx-community BiRefNet_lite-ONNX model. huggingface.co supports a free trial of the BiRefNet_lite-ONNX model, and also provides paid use of the BiRefNet_lite-ONNX. Support call BiRefNet_lite-ONNX model through api, including Node.js, Python, http.

onnx-community BiRefNet_lite-ONNX online free

BiRefNet_lite-ONNX huggingface.co is an online trial and call api platform, which integrates BiRefNet_lite-ONNX's modeling effects, including api services, and provides a free online trial of BiRefNet_lite-ONNX, you can try BiRefNet_lite-ONNX online for free by clicking the link below.

onnx-community BiRefNet_lite-ONNX online free url in huggingface.co:

https://huggingface.co/onnx-community/BiRefNet_lite-ONNX

BiRefNet_lite-ONNX install

BiRefNet_lite-ONNX is an open source model from GitHub that offers a free installation service, and any user can find BiRefNet_lite-ONNX on GitHub to install. At the same time, huggingface.co provides the effect of BiRefNet_lite-ONNX install, users can directly use BiRefNet_lite-ONNX installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

BiRefNet_lite-ONNX install url in huggingface.co:

https://huggingface.co/onnx-community/BiRefNet_lite-ONNX

Url of BiRefNet_lite-ONNX

Provider of BiRefNet_lite-ONNX huggingface.co

onnx-community
ORGANIZATIONS

Other API from onnx-community