BiRefNet
High-resolution dichotomous segmentation — state-of-the-art background removal.
- Star 数
- 4.3K
- Fork 数
- 338
- 未关闭 Issue
- 33
- 最近提交
- 2026-10-11
数据来自 GitHub API · 更新于 2026-10-15
BiRefNet 是什么?
BiRefNet is a segmentation model that produces very clean cut-outs at high resolution, including hair and thin structures. It is available on Hugging Face and integrated into rembg and ComfyUI nodes.
主要功能
- High-resolution, detailed foreground masks
- Pretrained weights for general, portrait and matting use
- Hugging Face transformers loading
系统要求
- 平台
- Windows · macOS · Linux
- 显卡
- NVIDIA recommended
- Python
- 3.9+
如何安装 BiRefNet
根据项目 README 整理。开源项目更新很快,请以 GitHub 页面上的最新说明为准。
Python
- 1Clone and install.
git clone https://github.com/ZhengPeng7/BiRefNet.git cd BiRefNet pip install -r requirements.txt - 2Or load it directly from Hugging Face in your own code.
from transformers import AutoModelForImageSegmentation model = AutoModelForImageSegmentation.from_pretrained("ZhengPeng7/BiRefNet", trust_remote_code=True)
优势
- Best-in-class edge quality
- Permissive license
不足
- Research code; easiest via rembg or ComfyUI
BiRefNet 替代品对比
| 软件 | Star 数 | 许可证 | 平台 | 显存 |
|---|---|---|---|---|
| BiRefNet High-resolution dichotomous segmentation — state-of-the-art background removal. | 4.3K | MIT | — | |
| rembg Remove image backgrounds from the command line, Python or an HTTP server. | 25.1K | MIT | — | |
| Segment Anything (SAM) Meta’s promptable segmentation model — click to cut out any object. | 55K | Apache-2.0 | — | |
| Upscayl Free desktop app that upscales images with AI. | 50.6K | AGPL-3.0 | — | |
| Real-ESRGAN Practical image and video super-resolution models. | 37.1K | BSD-3-Clause | — | |
| GFPGAN Blind face restoration for old and low-quality photos. | 37.7K | Apache-2.0 | — |
常见问题
BiRefNet 免费吗?
是的——BiRefNet 是开源软件,采用 MIT 许可证。商用前请确认软件及模型权重的许可条款。
BiRefNet 支持 Windows、Mac 和 Linux 吗?
BiRefNet 支持:Windows, macOS, Linux。
运行 BiRefNet 需要什么配置?
NVIDIA recommended
如何安装 BiRefNet?
1. Clone and install. 2. Or load it directly from Hugging Face in your own code.
BiRefNet 有哪些好的替代品?
常见替代品包括 rembg, Segment Anything (SAM), Upscayl, Real-ESRGAN,详见本页对比表。
可以不安装、在线使用 BiRefNet 吗?
如果只想要结果,AiLoft 可在浏览器中运行 GPT Image 2.5、Nano Banana Pro 等顶级图像模型,无需显卡和配置。
不想安装?直接在浏览器里生成图片
无需显卡、驱动或 Python。在线使用 GPT Image 2.5 和 Nano Banana Pro,并排对比效果。