Mask Generation
BEN2
Safetensors
BEN2
Dichotomous image segmentation
background remove
background-remove
model_hub_mixin
pytorch_model_hub_mixin
Instructions to use aldigobbler/ben2_30m_test_distilled_e2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- BEN2
How to use aldigobbler/ben2_30m_test_distilled_e2 with BEN2:
import requests from PIL import Image from ben2 import AutoModel url = "https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg" image = Image.open(requests.get(url, stream=True).raw) model = AutoModel.from_pretrained("aldigobbler/ben2_30m_test_distilled_e2") model.to("cuda").eval() foreground = model.inference(image) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,8 +9,14 @@ tags:
|
|
| 9 |
- model_hub_mixin
|
| 10 |
- pytorch_model_hub_mixin
|
| 11 |
---
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
- model_hub_mixin
|
| 10 |
- pytorch_model_hub_mixin
|
| 11 |
---
|
| 12 |
+
# BEN2 pruning test # 1 - distillation (epoch 2)
|
| 13 |
+
Original parameters: 94,134,658
|
| 14 |
|
| 15 |
+
Pruned parameters: 36,275,254
|
| 16 |
+
|
| 17 |
+
Parameter reduction: 61.5%
|
| 18 |
+
|
| 19 |
+
- Swin Transformer depths: [2, 2, 18, 2] → [2, 2, 6, 2]
|
| 20 |
+
- Swin Transformer heads: [4, 8, 16, 32] → [3, 6, 12, 24]
|
| 21 |
+
|
| 22 |
+
distill loss: 0.0001
|