Beom0 commited on
Commit
b5cd4a6
Β·
verified Β·
1 Parent(s): 4fd4897

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +63 -1
README.md CHANGED
@@ -1,4 +1,5 @@
1
  ---
 
2
  title: ZIM demo with SAM
3
  emoji: πŸ“ˆ
4
  colorFrom: yellow
@@ -11,4 +12,65 @@ python_version: 3.10.12
11
  short_description: ZIM demo comparison with SAM
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-4.0
3
  title: ZIM demo with SAM
4
  emoji: πŸ“ˆ
5
  colorFrom: yellow
 
12
  short_description: ZIM demo comparison with SAM
13
  ---
14
 
15
+ # ZIM: Zero-Shot Image Matting for Anything
16
+
17
+ ## Introduction
18
+
19
+ πŸš€ Introducing ZIM: Zero-Shot Image Matting – A Step Beyond SAM! πŸš€
20
+
21
+ While SAM (Segment Anything Model) has redefined zero-shot segmentation with broad applications across multiple fields, it often falls short in delivering high-precision, fine-grained masks. That’s where ZIM comes in.
22
+
23
+ 🌟 What is ZIM? 🌟
24
+
25
+ ZIM (Zero-Shot Image Matting) is a groundbreaking model developed to set a new standard in precision matting while maintaining strong zero-shot capabilities. Like SAM, ZIM can generalize across diverse datasets and objects in a zero-shot paradigm. But ZIM goes beyond, delivering highly accurate, fine-grained masks that capture intricate details.
26
+
27
+ πŸ” Get Started with ZIM πŸ”
28
+
29
+ Ready to elevate your AI projects with unmatched matting quality? Access ZIM on our [project page](https://naver-ai.github.io/ZIM/), [Arxiv](https://huggingface.co/papers/2411.00626), and [Github](https://github.com/naver-ai/ZIM).
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ pip install zim_anything
35
+ ```
36
+
37
+ or
38
+
39
+ ```bash
40
+ git clone https://github.com/naver-ai/ZIM.git
41
+ cd ZIM; pip install -e .
42
+ ```
43
+
44
+
45
+ ## Usage
46
+
47
+ 1. Make the directory `zim_vit_l_2092`.
48
+ 2. Download the [encoder](https://huggingface.co/naver-iv/zim-anything-vitl/resolve/main/zim_vit_l_2092/encoder.onnx?download=true) weight and [decoder](https://huggingface.co/naver-iv/zim-anything-vitl/resolve/main/zim_vit_l_2092/decoder.onnx?download=true) weight.
49
+ 3. Put them under the `zim_vit_b_2092` directory.
50
+
51
+ ```python
52
+ from zim_anything import zim_model_registry, ZimPredictor
53
+
54
+ backbone = "vit_l"
55
+ ckpt_p = "zim_vit_l_2092"
56
+
57
+ model = zim_model_registry[backbone](checkpoint=ckpt_p)
58
+ if torch.cuda.is_available():
59
+ model.cuda()
60
+
61
+ predictor = ZimPredictor(model)
62
+ predictor.set_image(<image>)
63
+ masks, _, _ = predictor.predict(<input_prompts>)
64
+ ```
65
+
66
+ ## Citation
67
+
68
+ If you find this project useful, please consider citing:
69
+
70
+ ```bibtex
71
+ @article{kim2024zim,
72
+ title={ZIM: Zero-Shot Image Matting for Anything},
73
+ author={Kim, Beomyoung and Shin, Chanyong and Jeong, Joonhyun and Jung, Hyungsik and Lee, Se-Yun and Chun, Sewhan and Hwang, Dong-Hyun and Yu, Joonsang},
74
+ journal={arXiv preprint arXiv:2411.00626},
75
+ year={2024}
76
+ }