LocalBG

许可证

LocalBG 之后可能商用,因此分割权重和推理运行时都选用宽松许可证。本页记录核对过的来源。

组成部分名称许可证来源
浏览器中使用的权重BiRefNet-lite 512 FP16MIT来源
模型作者ZhengPeng7/BiRefNet + BiRefNet_liteMIT来源
推理运行时onnxruntime-webMIT来源
ZIP 打包fflateMIT来源
站点技术栈Next.js, React, next-intl, Tailwind, shadcn/uiMIT来源

为什么选这个模型

BiRefNet(Zheng Peng,2024)以 MIT 许可证发布,Hugging Face 上 ZhengPeng7/BiRefNet_lite 的模型卡同样标注 MIT。本站运行的是 studioludens/birefnet-lite-512:一份 512×512 的 ONNX 再导出,模型卡声明为 MIT,允许商用,也允许把权重要给浏览器运行。1024 的完整 BiRefNet 导出会撑爆 onnxruntime-web 的内存堆。512 是能在笔记本和手机级 GPU 上实际跑起来的质量与体积折中。

未使用:@imgly/background-removal(AGPL-3.0,对以后可能收费的网页应用不合适),以及 BRIA RMBG-1.4 / RMBG-2.0 权重(非商用)。U²-Net 与 IS-Net 为 Apache-2.0,原本是这份导出无法运行时的备选,当前没有打包进站点。

固定文件:model_fp16.onnx,93.9 MB,Hugging Face 修订号 962e6796。首次下载后保存在 Cache Storage 的 localbg-models-v1 中。

MIT

MIT License

Copyright (c) 2024 ZhengPeng
Copyright (c) 2026 Studio Ludens V.O.F.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ONNX Runtime is licensed under the MIT License by Microsoft and contributors. https://github.com/microsoft/onnxruntime/blob/main/LICENSE