Image Segmentation
Transformers.js
ONNX
BiRefNet
swin
background-removal
matting
webgpu
alpha-matting
image-matting
foreground-extraction
salient-object-detection
dichotomous-image-segmentation
client-side
transformers-js
fp16
Instructions to use studioludens/birefnet-lite-512 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use studioludens/birefnet-lite-512 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-segmentation', 'studioludens/birefnet-lite-512'); - BiRefNet
How to use studioludens/birefnet-lite-512 with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("studioludens/birefnet-lite-512", trust_remote_code=True)# Option 2: use with BiRefNet # Install from https://github.com/ZhengPeng7/BiRefNet from models.birefnet import BiRefNet model = BiRefNet.from_pretrained("studioludens/birefnet-lite-512") - Notebooks
- Google Colab
- Kaggle
Commit ·
962e679
1
Parent(s): 4a3c40c
Add MIT LICENSE file and License section (#3)
Browse files- Add MIT LICENSE file and License section (e8fb76f39d0a4a2364dca266bb75182b3d79eb67)
LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 ZhengPeng
|
| 4 |
+
Copyright (c) 2026 Studio Ludens V.O.F.
|
| 5 |
+
|
| 6 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 7 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 8 |
+
in the Software without restriction, including without limitation the rights
|
| 9 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 10 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 11 |
+
furnished to do so, subject to the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be included in all
|
| 14 |
+
copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 17 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 18 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 19 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 20 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 21 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 22 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -160,6 +160,17 @@ For full-image matting at 1024×1024, prefer the upstream PyTorch model or serve
|
|
| 160 |
- Adapters with fewer than ~10 storage buffers per shader stage fall back to WASM; the model still runs, just slower.
|
| 161 |
- No INT8 quantization yet. A quantized variant could roughly halve the fp16 size but hasn't been validated.
|
| 162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
## Citation
|
| 164 |
|
| 165 |
```bibtex
|
|
|
|
| 160 |
- Adapters with fewer than ~10 storage buffers per shader stage fall back to WASM; the model still runs, just slower.
|
| 161 |
- No INT8 quantization yet. A quantized variant could roughly halve the fp16 size but hasn't been validated.
|
| 162 |
|
| 163 |
+
## License
|
| 164 |
+
|
| 165 |
+
Everything in this repository — the ONNX weights (`onnx/model.onnx`, `onnx/model_fp16.onnx`), the config files and this model card — is released under the [MIT License](LICENSE). Commercial use, redistribution and modification are allowed, including serving the model files to run in your users' browsers.
|
| 166 |
+
|
| 167 |
+
The weights are a converted copy of [ZhengPeng7/BiRefNet_lite](https://huggingface.co/ZhengPeng7/BiRefNet_lite), which is itself MIT-licensed ([code](https://github.com/ZhengPeng7/BiRefNet/blob/main/LICENSE), [weights](https://huggingface.co/ZhengPeng7/BiRefNet_lite)). The only condition is that the copyright notice and permission text in [`LICENSE`](LICENSE) travel with any copy you redistribute:
|
| 168 |
+
|
| 169 |
+
```
|
| 170 |
+
Copyright (c) 2024 ZhengPeng
|
| 171 |
+
Copyright (c) 2026 Studio Ludens V.O.F.
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
## Citation
|
| 175 |
|
| 176 |
```bibtex
|