Image Segmentation
Transformers.js
ONNX
BiRefNet
swin
background-removal
dichotomous-image-segmentation
webgpu
onnxruntime-web
Instructions to use CardAnvilModels/BiRefNet-lite-1024-WebGPU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use CardAnvilModels/BiRefNet-lite-1024-WebGPU with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-segmentation', 'CardAnvilModels/BiRefNet-lite-1024-WebGPU'); - BiRefNet
How to use CardAnvilModels/BiRefNet-lite-1024-WebGPU with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("CardAnvilModels/BiRefNet-lite-1024-WebGPU", 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("CardAnvilModels/BiRefNet-lite-1024-WebGPU") - Notebooks
- Google Colab
- Kaggle
File size: 81 Bytes
90abcec | 1 2 3 4 5 6 | {
"model_type": "swin",
"transformers.js_config": {
"dtype": "fp32"
}
} |