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
File size: 610 Bytes
5a64a48 | 1 2 3 4 5 6 7 8 9 10 11 12 | 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.
|