add-teaser
#2
by
tomoyukun
- opened
- BiRefNet_config.py +0 -2
- README.md +9 -10
- birefnet.py +1 -3
- model.safetensors +1 -1
BiRefNet_config.py
CHANGED
|
@@ -5,9 +5,7 @@ class BiRefNetConfig(PretrainedConfig):
|
|
| 5 |
def __init__(
|
| 6 |
self,
|
| 7 |
bb_pretrained=False,
|
| 8 |
-
is_encoder_decoder=False,
|
| 9 |
**kwargs
|
| 10 |
):
|
| 11 |
self.bb_pretrained = bb_pretrained
|
| 12 |
-
self.is_encoder_decoder = is_encoder_decoder
|
| 13 |
super().__init__(**kwargs)
|
|
|
|
| 5 |
def __init__(
|
| 6 |
self,
|
| 7 |
bb_pretrained=False,
|
|
|
|
| 8 |
**kwargs
|
| 9 |
):
|
| 10 |
self.bb_pretrained = bb_pretrained
|
|
|
|
| 11 |
super().__init__(**kwargs)
|
README.md
CHANGED
|
@@ -1,25 +1,24 @@
|
|
| 1 |
---
|
| 2 |
-
language: en
|
| 3 |
license: apache-2.0
|
| 4 |
-
|
| 5 |
-
library_name: transformers
|
| 6 |
tags:
|
| 7 |
-
- layer decomposition
|
| 8 |
-
- image segmentation
|
| 9 |
-
- image matting
|
| 10 |
-
- design
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
## LayerD BiRefNet Matting Module
|
| 14 |
|
| 15 |
<div align="left">
|
| 16 |
|
| 17 |
-
[](https://arxiv.org/abs/
|
| 18 |
<a href='https://cyberagentailab.github.io/LayerD/'><img src='https://img.shields.io/badge/Project-Page-Green'></a>
|
| 19 |
|
| 20 |
</div>
|
| 21 |
|
| 22 |
-
This repository contains the code and model weights for the matting module in [LayerD [ICCV'25]](https://arxiv.org/abs/
|
| 23 |
The model in this repository is **intended to be used as a part of the original [LayerD github repository](https://github.com/CyberAgentAILab/LayerD)**.
|
| 24 |
Please visit https://github.com/CyberAgentAILab/LayerD for more information.
|
| 25 |
|
|
@@ -52,4 +51,4 @@ The original BiRefNet is released under the [MIT license](https://huggingface.co
|
|
| 52 |
booktitle={ICCV},
|
| 53 |
year={2025}
|
| 54 |
}
|
| 55 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
+
language: en
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- layer decomposition
|
| 6 |
+
- image segmentation
|
| 7 |
+
- image matting
|
| 8 |
+
- design
|
| 9 |
+
pipeline_tag: image-segmentation
|
| 10 |
---
|
| 11 |
|
| 12 |
## LayerD BiRefNet Matting Module
|
| 13 |
|
| 14 |
<div align="left">
|
| 15 |
|
| 16 |
+
[](https://arxiv.org/abs/)
|
| 17 |
<a href='https://cyberagentailab.github.io/LayerD/'><img src='https://img.shields.io/badge/Project-Page-Green'></a>
|
| 18 |
|
| 19 |
</div>
|
| 20 |
|
| 21 |
+
This repository contains the code and model weights for the matting module in [LayerD [ICCV'25]](https://arxiv.org/abs/), a layer decomposition framework for graphic design images.
|
| 22 |
The model in this repository is **intended to be used as a part of the original [LayerD github repository](https://github.com/CyberAgentAILab/LayerD)**.
|
| 23 |
Please visit https://github.com/CyberAgentAILab/LayerD for more information.
|
| 24 |
|
|
|
|
| 51 |
booktitle={ICCV},
|
| 52 |
year={2025}
|
| 53 |
}
|
| 54 |
+
```
|
birefnet.py
CHANGED
|
@@ -7,8 +7,6 @@ from transformers import PretrainedConfig
|
|
| 7 |
|
| 8 |
class Config(PretrainedConfig):
|
| 9 |
def __init__(self) -> None:
|
| 10 |
-
self.is_encoder_decoder = False
|
| 11 |
-
|
| 12 |
# PATH settings
|
| 13 |
self.sys_home_dir = os.path.expanduser('~') # Make up your file system as: SYS_HOME_DIR/codes/dis/BiRefNet, SYS_HOME_DIR/datasets/dis/xx, SYS_HOME_DIR/weights/xx
|
| 14 |
|
|
@@ -55,7 +53,7 @@ class Config(PretrainedConfig):
|
|
| 55 |
}[self.task]
|
| 56 |
][1] # choose 0 to skip
|
| 57 |
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
|
| 58 |
-
self.size =
|
| 59 |
self.num_workers = max(4, self.batch_size) # will be decrease to min(it, batch_size) at the initialization of the data_loader
|
| 60 |
|
| 61 |
# Backbone settings
|
|
|
|
| 7 |
|
| 8 |
class Config(PretrainedConfig):
|
| 9 |
def __init__(self) -> None:
|
|
|
|
|
|
|
| 10 |
# PATH settings
|
| 11 |
self.sys_home_dir = os.path.expanduser('~') # Make up your file system as: SYS_HOME_DIR/codes/dis/BiRefNet, SYS_HOME_DIR/datasets/dis/xx, SYS_HOME_DIR/weights/xx
|
| 12 |
|
|
|
|
| 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 = 512
|
| 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
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 884878824
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:28416acdaedc3fbee0f80f888893a2fdca60ae81b1b27a41433a4e791598e330
|
| 3 |
size 884878824
|