Image Segmentation
BiRefNet
swift-object-cutout
background-removal
image-matting
dichotomous-image-segmentation
core-ai
apple-silicon
macos
Instructions to use arraypress/cutout-birefnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use arraypress/cutout-birefnet with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("arraypress/cutout-birefnet", 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("arraypress/cutout-birefnet") - Notebooks
- Google Colab
- Kaggle
Download NOTICE from arraypress/cutout-birefnet: direct link, hf CLI and curl.
- Browser
- Download file 610 Bytes
-
https://huggingface.co/arraypress/cutout-birefnet/resolve/main/NOTICE
- Command line
-
hf download hf://arraypress/cutout-birefnet/NOTICE
-
curl -L -o NOTICE https://huggingface.co/arraypress/cutout-birefnet/resolve/main/NOTICE
610 Bytes
| cutout-birefnet: BiRefNet general (ZhengPeng7/BiRefNet at revision | |
| e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4), MIT, Copyright (c) 2024 ZhengPeng. | |
| See LICENSE. | |
| Changed for Core AI, in export_birefnet.py: | |
| - torchvision's deform_conv2d is computed from gathers and matrix products | |
| (identical result: max |alpha difference| 4.6e-6 in float32 on the CPU). | |
| - The ImageNet normalisation and the final sigmoid are inside the graph; only | |
| the last, full-size prediction is returned. | |
| - Weights and arithmetic are float16; the input and output stay float32. | |
| The trained weights are otherwise the authors', unmodified. | |