Add some content to the readme
Browse files
README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
base_model: ZhengPeng7/BiRefNet
|
| 4 |
+
tags:
|
| 5 |
+
- background-removal
|
| 6 |
+
- mask-generation
|
| 7 |
+
- Dichotomous Image Segmentation
|
| 8 |
+
- vision.cpp
|
| 9 |
+
pipeline_tag: image-segmentation
|
| 10 |
---
|
| 11 |
+
# GGUF models for BiRefNet
|
| 12 |
+
|
| 13 |
+
BiRefNet is a model for dichotomous image segmentation (background removal). The
|
| 14 |
+
weights in this repository are converted for lightweight inference on consumer hardware
|
| 15 |
+
with [vision.cpp](https://github.com/Acly/vision.cpp).
|
| 16 |
+
|
| 17 |
+
* Original repository: [ZhengPeng7/BiRefNet (Github)](https://github.com/ZhengPeng7/BiRefNet)
|
| 18 |
+
* Original weights: [ZhengPeng7/BiRefNet (HuggingFace)](https://huggingface.co/ZhengPeng7/BiRefNet)
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
## Run
|
| 22 |
+
|
| 23 |
+
Example inference with [vision.cpp](https://github.com/Acly/vision.cpp):
|
| 24 |
+
|
| 25 |
+
#### CLI
|
| 26 |
+
```sh
|
| 27 |
+
vision-cli birefnet -m BiRefNet-F16.gguf -i input.png -o mask.png --composite comp.png
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
#### C++
|
| 31 |
+
```c++
|
| 32 |
+
image_data image = image_load("input.png");
|
| 33 |
+
backend_device device = backend_init();
|
| 34 |
+
birefnet_model model = birefnet_load_model("BiRefNet-F16.gguf", device);
|
| 35 |
+
image_data mask = birefnet_compute(model, image);
|
| 36 |
+
image_save(mask, "mask.png");
|
| 37 |
+
```
|