Image Segmentation
BiRefNet
Safetensors
background-removal
mask-generation
Dichotomous Image Segmentation
Camouflaged Object Detection
Salient Object Detection
pytorch_model_hub_mixin
model_hub_mixin
custom_code
Instructions to use IRPC/frogforge-birefnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BiRefNet
How to use IRPC/frogforge-birefnet with BiRefNet:
# Option 1: use with transformers from transformers import AutoModelForImageSegmentation birefnet = AutoModelForImageSegmentation.from_pretrained("IRPC/frogforge-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("IRPC/frogforge-birefnet") - Notebooks
- Google Colab
- Kaggle
Upload original/BiRefNet_config.py with huggingface_hub
Browse files- original/BiRefNet_config.py +11 -0
original/BiRefNet_config.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
class BiRefNetConfig(PretrainedConfig):
|
| 4 |
+
model_type = "SegformerForSemanticSegmentation"
|
| 5 |
+
def __init__(
|
| 6 |
+
self,
|
| 7 |
+
bb_pretrained=False,
|
| 8 |
+
**kwargs
|
| 9 |
+
):
|
| 10 |
+
self.bb_pretrained = bb_pretrained
|
| 11 |
+
super().__init__(**kwargs)
|