Image Segmentation
Transformers
Safetensors
English
layer decomposition
image segmentation
image matting
design
custom_code
Instructions to use cyberagent/layerd-birefnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyberagent/layerd-birefnet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="cyberagent/layerd-birefnet", trust_remote_code=True)# Load model directly from transformers import AutoModelForImageSegmentation model = AutoModelForImageSegmentation.from_pretrained("cyberagent/layerd-birefnet", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update img_size from 512 to 1024
Browse files- birefnet.py +1 -1
birefnet.py
CHANGED
|
@@ -53,7 +53,7 @@ class Config(PretrainedConfig):
|
|
| 53 |
}[self.task]
|
| 54 |
][1] # choose 0 to skip
|
| 55 |
self.lr = (1e-4 if 'DIS5K' in self.task else 1e-5) * math.sqrt(self.batch_size / 4) # DIS needs high lr to converge faster. Adapt the lr linearly
|
| 56 |
-
self.size =
|
| 57 |
self.num_workers = max(4, self.batch_size) # will be decrease to min(it, batch_size) at the initialization of the data_loader
|
| 58 |
|
| 59 |
# Backbone settings
|
|
|
|
| 53 |
}[self.task]
|
| 54 |
][1] # choose 0 to skip
|
| 55 |
self.lr = (1e-4 if 'DIS5K' in self.task else 1e-5) * math.sqrt(self.batch_size / 4) # DIS needs high lr to converge faster. Adapt the lr linearly
|
| 56 |
+
self.size = 1024
|
| 57 |
self.num_workers = max(4, self.batch_size) # will be decrease to min(it, batch_size) at the initialization of the data_loader
|
| 58 |
|
| 59 |
# Backbone settings
|