BiRefNet is a research implementation for bilateral-reference image segmentation, including background removal and related vision tasks. Pretrained weights cover general use, matting, DIS, HRSOD, and COD settings.
Overview
BiRefNet implements bilateral reference for high-resolution dichotomous image segmentation. The project ships training and inference code, a model zoo with weights for several task families, and notebooks for local inference and ONNX export.
Weights are loadable from Hugging Face, and hosted inference partners are listed for remote runs. The codebase supports fine-tuning on custom datasets, multiple backbone choices, combined training across datasets, and FP16 inference with reduced GPU memory use.
Beyond academic benchmarks, extended variants target general segmentation, matting, salient and camouflaged object detection, and box-guided segmentation. Third-party applications and ONNX conversion samples build on the same models.
Documentation covers environment setup, dataset layout, resume training from checkpoints, and optional multi-GPU training when hardware allows.
Key features
- High-resolution binary mask prediction
- Model zoo across vision tasks
- Hugging Face weight loading
- Fine-tuning on custom data
- ONNX export path
- FP16 inference option
- Multiple backbone choices
- Box-guided segmentation variant
Use cases
- Background removal pipelines
- Salient object segmentation
- Camouflaged object detection research
- Matting and general segmentation fine-tunes