juba7 commited on
Commit
f735cf3
·
verified ·
1 Parent(s): c17cd98

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +90 -112
README.md CHANGED
@@ -1,112 +1,90 @@
1
- ---
2
- license: apache-2.0
3
- pipeline_tag: image-segmentation
4
- tags:
5
- - BEN
6
- - background-remove
7
- - mask-generation
8
- - Dichotomous image segmentation
9
- - background remove
10
- - foreground
11
- - background
12
- - remove background
13
- - pytorch
14
- ---
15
-
16
- # BEN: Background Erase Network
17
-
18
- [![arXiv](https://img.shields.io/badge/arXiv-2501.06230-b31b1b.svg)](https://arxiv.org/abs/2501.06230)
19
- [![GitHub](https://img.shields.io/badge/GitHub-BEN-black.svg)](https://github.com/PramaLLC/BEN/)
20
- [![Website](https://img.shields.io/badge/Website-backgrounderase.net-104233)](https://backgrounderase.net)
21
- [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/ben-using-confidence-guided-matting-for/dichotomous-image-segmentation-on-dis-vd)](https://paperswithcode.com/sota/dichotomous-image-segmentation-on-dis-vd?p=ben-using-confidence-guided-matting-for)
22
-
23
- ## Overview
24
- BEN (Background Erase Network) introduces a novel approach to foreground segmentation through its innovative Confidence Guided Matting (CGM) pipeline. The architecture employs a refiner network that targets and processes pixels where the base model exhibits lower confidence levels, resulting in more precise and reliable matting results.
25
-
26
- This repository provides the official code for our model, as detailed in our research paper: [BEN: Background Erase Network](https://arxiv.org/abs/2501.06230).
27
-
28
-
29
-
30
- ## BEN2 Access
31
- BEN2 is now publicly available, trained on DIS5k and our 22K proprietary segmentation dataset. Our enhanced model delivers superior performance in hair matting, 4K processing, object segmentation, and edge refinement. Access the base model on Huggingface, try the full model through our free web demo or integrate BEN2 into your project with our API:
32
- - 🤗 [PramaLLC/BEN2](https://huggingface.co/PramaLLC/BEN2)
33
- - 🌐 [backgrounderase.net](https://backgrounderase.net)
34
-
35
- ## Model Access
36
- The base model is publicly available and free to use for commercial use on HuggingFace:
37
- - 🤗 [PramaLLC/BEN](https://huggingface.co/PramaLLC/BEN)
38
-
39
-
40
- ## Contact US
41
- - For access to our commercial model email us at [email protected]
42
- - Our website: https://pramadevelopment.com/
43
- - Follow us on X: https://x.com/PramaResearch/
44
-
45
-
46
- ## Quick Start Code (Inside Cloned Repo)
47
-
48
- ```python
49
- import model
50
- from PIL import Image
51
- import torch
52
-
53
-
54
- device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
55
-
56
- file = "./image.png" # input image
57
-
58
- model = model.BEN_Base().to(device).eval() #init pipeline
59
-
60
- model.loadcheckpoints("./BEN_Base.pth")
61
- image = Image.open(file)
62
- mask, foreground = model.inference(image)
63
-
64
- mask.save("./mask.png")
65
- foreground.save("./foreground.png")
66
- ```
67
-
68
- # BEN SOA Benchmarks on Disk 5k Eval
69
-
70
- ![Demo Results](demo.jpg)
71
-
72
-
73
- ### BEN_Base + BEN_Refiner (commercial model please contact us for more information):
74
- - MAE: 0.0270
75
- - DICE: 0.8989
76
- - IOU: 0.8506
77
- - BER: 0.0496
78
- - ACC: 0.9740
79
-
80
- ### BEN_Base (94 million parameters):
81
- - MAE: 0.0309
82
- - DICE: 0.8806
83
- - IOU: 0.8371
84
- - BER: 0.0516
85
- - ACC: 0.9718
86
-
87
- ### MVANet (old SOTA):
88
- - MAE: 0.0353
89
- - DICE: 0.8676
90
- - IOU: 0.8104
91
- - BER: 0.0639
92
- - ACC: 0.9660
93
-
94
-
95
- ### BiRefNet(not tested in house):
96
- - MAE: 0.038
97
-
98
-
99
- ### InSPyReNet (not tested in house):
100
- - MAE: 0.042
101
-
102
-
103
-
104
- ## Features
105
- - Background removal from images
106
- - Generates both binary mask and foreground image
107
- - CUDA support for GPU acceleration
108
- - Simple API for easy integration
109
-
110
- ## Installation
111
- 1. Clone Repo
112
- 2. Install requirements.txt
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-segmentation
4
+ tags:
5
+ - BEN
6
+ - background-remove
7
+ - mask-generation
8
+ - Dichotomous image segmentation
9
+ - background remove
10
+ - foreground
11
+ - background
12
+ - remove background
13
+ - pytorch
14
+ ---
15
+
16
+
17
+
18
+ ## Model Provided by ParmaLLC
19
+ The base model is publicly available and free to use for commercial use on HuggingFace:
20
+ - 🤗 [PramaLLC/BEN](https://huggingface.co/PramaLLC/BEN)
21
+
22
+
23
+
24
+ ## Quick Start Code (Inside Cloned Repo)
25
+
26
+ ```python
27
+ import model
28
+ from PIL import Image
29
+ import torch
30
+
31
+
32
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
33
+
34
+ file = "./image.png" # input image
35
+
36
+ model = model.BEN_Base().to(device).eval() #init pipeline
37
+
38
+ model.loadcheckpoints("./BEN_Base.pth")
39
+ image = Image.open(file)
40
+ mask, foreground = model.inference(image)
41
+
42
+ mask.save("./mask.png")
43
+ foreground.save("./foreground.png")
44
+ ```
45
+
46
+ # BEN SOA Benchmarks on Disk 5k Eval
47
+
48
+ ![Demo Results](demo.jpg)
49
+
50
+
51
+ ### BEN_Base + BEN_Refiner (commercial model please contact us for more information):
52
+ - MAE: 0.0270
53
+ - DICE: 0.8989
54
+ - IOU: 0.8506
55
+ - BER: 0.0496
56
+ - ACC: 0.9740
57
+
58
+ ### BEN_Base (94 million parameters):
59
+ - MAE: 0.0309
60
+ - DICE: 0.8806
61
+ - IOU: 0.8371
62
+ - BER: 0.0516
63
+ - ACC: 0.9718
64
+
65
+ ### MVANet (old SOTA):
66
+ - MAE: 0.0353
67
+ - DICE: 0.8676
68
+ - IOU: 0.8104
69
+ - BER: 0.0639
70
+ - ACC: 0.9660
71
+
72
+
73
+ ### BiRefNet(not tested in house):
74
+ - MAE: 0.038
75
+
76
+
77
+ ### InSPyReNet (not tested in house):
78
+ - MAE: 0.042
79
+
80
+
81
+
82
+ ## Features
83
+ - Background removal from images
84
+ - Generates both binary mask and foreground image
85
+ - CUDA support for GPU acceleration
86
+ - Simple API for easy integration
87
+
88
+ ## Installation
89
+ 1. Clone Repo
90
+ 2. Install requirements.txt