Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
## Quick Start
|
3 |
+
|
4 |
+
### Install
|
5 |
+
|
6 |
+
1. Clone this repository and navigate to IVM folder
|
7 |
+
|
8 |
+
```bash
|
9 |
+
git clone https://github.com/2toinf/IVM.git
|
10 |
+
cd IVM
|
11 |
+
```
|
12 |
+
|
13 |
+
2. Install Package
|
14 |
+
|
15 |
+
```bash
|
16 |
+
conda create -n IVM python=3.10 -y
|
17 |
+
conda activate IVM
|
18 |
+
pip install -e .
|
19 |
+
```
|
20 |
+
|
21 |
+
### Usage
|
22 |
+
|
23 |
+
```python
|
24 |
+
from IVM import load
|
25 |
+
from PIL import Image
|
26 |
+
|
27 |
+
model = load(ckpt_path, low_gpu_memory = False) # Set `low_gpu_memory=True` if you don't have enough GPU Memory
|
28 |
+
|
29 |
+
image = Image.open("image/demo/robot.jpg")
|
30 |
+
instruction = "pick up the red cup"
|
31 |
+
|
32 |
+
result = model.forward_batch([image], [instruction])
|
33 |
+
'''
|
34 |
+
result content:
|
35 |
+
'soft': heatmap
|
36 |
+
'bbox': crop bbox
|
37 |
+
'blur_image': rbg
|
38 |
+
'highlight_image': rbg
|
39 |
+
'cropped_blur_img': rgb
|
40 |
+
'cropped_highlight_img': rgb
|
41 |
+
'alpha_image': rgba
|
42 |
+
'''
|
43 |
+
|
44 |
+
|
45 |
+
```
|