The objective of the BiRefNet-Burn project is to adapt the cutting-edge BiRefNet model, which has been developed within the PyTorch framework, for utilisation within the Burn framework.
Note
At the moment, it works with the combination of the BiRefNet Swin v1 backbone and the Burn WebGPU backend.
BiRefNet is a cutting-edge model designed for high-resolution dichotomous image segmentation, as detailed in the paper "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" [1]. This project employs the Burn framework, a unified deep learning framework written in Rust, with the objective of reimplementing BiRefNet in order to achieve enhanced performance and efficiency.
- BiRefNet: ZhengPeng7/BiRefNet
- Burn: tracel-ai/burn
- Rust (latest stable version)
-
Install Rust from https://www.rust-lang.org/tools/install
-
Clone the repository:
git clone https://github.com/nusu-github/BiRefNet-Burn.git cd BiRefNet-Burn -
Build the project:
cargo build --release
To run inference using the Burn-ported BiRefNet model:
cargo run --release -- --helpThis will display available options for running inference on your images.
This project is dual-licensed under both the MIT and Apache-2.0 licenses. You may choose either license when using this project.
[1] Zheng, P., “Bilateral Reference for High-Resolution Dichotomous Image Segmentation”, arXiv e-prints, Art. no. arXiv:2401.03407, 2024. doi:10.48550/arXiv.2401.03407.
[2] Liu, Z., “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”, arXiv e-prints, Art. no. arXiv:2103.14030, 2021. doi:10.48550/arXiv.2103.14030.
For any questions or support, please open an issue.