Downloads · 30 days
0
emrikol/birefnet-matting-onnx
birefnet-matting-onnx is a image segmentation model from emrikol. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for onnx. The card lists the license as mit.
ONNX export of ZhengPeng7/BiRefNet-matting, part of the MIT-licensed BiRefNet project. This repo contains only a format conversion (PyTorch → ONNX); all weights and credit belong to the original authors.
Downloads · 30 days
0
Access
Public
Updated Jun 30, 2026
Repo size
941 MB
Likes
0
Public
Click a slice to open those files.
.onnx941 MB · 100%
From the Hugging Face model README
ONNX export of ZhengPeng7/BiRefNet-matting, part of the MIT-licensed BiRefNet project. This repo contains only a format conversion (PyTorch → ONNX); all weights and credit belong to the original authors.
BiRefNet uses torchvision::deform_conv2d (deformable convolution), which neither the legacy nor
the dynamo ONNX exporter supports. This export replaces that op with a mathematically equivalent
implementation built from grid_sample (validated numerically against torchvision.ops.deform_conv2d
to < 1e-3), so the model runs in ONNX Runtime / Core ML EP.
| Input | input_image, float32, shape [1, 3, 1024, 1024], NCHW |
| Normalization | ImageNet — mean [0.485, 0.456, 0.406], std [0.229, 0.224, 0.225] |
| Output | output_image, [1, 1, 1024, 1024] logits — apply sigmoid for the alpha matte |
| Precision | fp32 (~897 MB) · opset 16 |
MIT, following the upstream BiRefNet project
(© Peng Zheng et al.). The original PyTorch model is ZhengPeng7/BiRefNet-matting.
@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}
}