AIBoy1993 commited on
Commit
f98db89
1 Parent(s): 9bc47e3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -12
README.md CHANGED
@@ -1,12 +1,41 @@
1
- ---
2
- title: Segment Anything Webui
3
- emoji: 🔥
4
- colorFrom: blue
5
- colorTo: gray
6
- sdk: gradio
7
- sdk_version: 3.24.1
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Segment Anything WebUI
2
+
3
+ [[`Paper`](https://ai.facebook.com/research/publications/segment-anything/)] [[`Project`](https://segment-anything.com/)] [[`Demo`](https://segment-anything.com/demo)] [[`Dataset`](https://segment-anything.com/dataset/index.html)] [[`Blog`](https://ai.facebook.com/blog/segment-anything-foundation-model-image-segmentation/)]
4
+
5
+ 本项目是 Meta 最新成果 [Segment Anything Model](https://segment-anything.com/) 的简单 WebUI,基于 [Gradio](https://gradio.app/)。虽然官方有很好的 [demo](https://segment-anything.com/demo),但也算是通过这么个简单的 UI 熟悉一下这个成果的用法。目前只实现了自动分割。
6
+
7
+ ![](./images/20230408023615.png)
8
+
9
+ ## **用法:**
10
+
11
+ - 安装 Segment Anything([其他安装方式](https://github.com/facebookresearch/segment-anything#installation)):
12
+
13
+ ```
14
+ pip install git+https://github.com/facebookresearch/segment-anything.git
15
+ ```
16
+
17
+ - `git clone` 本仓库:
18
+
19
+ ```
20
+ git clone https://github.com/5663015/segment_anything_webui.git
21
+ ```
22
+
23
+ - 在项目目录下新建 `checkpoints` 文件夹,将下载的模型文件放进去。模型文件下载:
24
+
25
+ - **`default` or `vit_h`: [ViT-H SAM model.](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth)**
26
+
27
+ - `vit_l`: [ViT-L SAM model.](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth)
28
+
29
+ - `vit_b`: [ViT-B SAM model.](https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth)
30
+
31
+ - 运行:
32
+
33
+ ```
34
+ python app.py
35
+ ```
36
+
37
+ **注意:** 默认模型是 `vit_b`,笔记本 CPU 可运行。运行硬件默认是 `cuda`。
38
+
39
+ ## TODO
40
+
41
+ - 增加 segmentation prompt