BiRefNet_lite โ€” ONNX, 512ร—512

An ONNX export of ZhengPeng7/BiRefNet_lite (MIT) with a fixed 512ร—512 input, for in-browser background removal on WebGPU with transformers.js.

The onnx-community 1024ร—1024 export needs a lot of GPU memory and an adapter with 17+ storage buffers per shader stage. This export needs roughly a quarter of the memory, and no op binds more than 7 storage buffers, so it runs on the WebGPU default limits.

File Precision Size
onnx/model.onnx fp32 ~192 MB
onnx/model_fp16.onnx fp16 weights, fp32 input/output ~100 MB

Both files match the PyTorch model's output (max alpha difference โ‰ค 3e-6).

Input / output

  • input_image: float32 [1, 3, 512, 512], RGB normalized with ImageNet mean [0.485, 0.456, 0.406] and std [0.229, 0.224, 0.225].
  • output_image: float32 [1, 1, 512, 512] logits โ€” apply a sigmoid to get the alpha matte.

License

MIT, same as the original BiRefNet. Credit: Zheng Peng et al., Bilateral Reference for High-Resolution Dichotomous Image Segmentation (CAAI AIR 2024).

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

Model tree for shozebDev/birefnet-lite-512-onnx

Quantized
(22)
this model