Instructions to use nobg/BiRefNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use nobg/BiRefNet with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("nobg/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("nobg/BiRefNet") - Notebooks
- Google Colab
- Kaggle
File size: 406 Bytes
d4b93ce 130176e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | {
"dec_channels_inter": 64,
"depths": [
2,
2,
18,
2
],
"drop_path_rate": 0.2,
"embed_dim": 192,
"image_size": 1024,
"mlp_ratio": 4.0,
"nobg_version": "0.2.0",
"num_heads": [
6,
12,
24,
48
],
"num_layers": 4,
"patch_size": 4,
"use_gradient_attention": true,
"use_image_patch_injection": true,
"use_multi_scale_input": true,
"window_size": 12
} |