Update README.md
Browse files
README.md
CHANGED
|
@@ -121,12 +121,10 @@ FALCON can be used to predict action based on the vision and language input. FAL
|
|
| 121 |
|
| 122 |
```python
|
| 123 |
import torch
|
| 124 |
-
import json, functools
|
| 125 |
from PIL import Image
|
| 126 |
-
from copy import deepcopy
|
| 127 |
from falcon.train.base_trainer import BaseTrainer
|
| 128 |
-
from falcon.data.data_utils import preprocess_image
|
| 129 |
-
from falcon.data.data_utils import get_text_function
|
| 130 |
from falcon.model.policy_head.esm_utils.vggt.utils.load_fn import load_and_preprocess_images_square_new
|
| 131 |
|
| 132 |
configs = josn.load(open('configs/falcon-esm-fc-calvin-abc.json', 'r'))
|
|
@@ -147,7 +145,7 @@ text_tensor, attention_mask = text_fn([prompt])
|
|
| 147 |
for step in range(MAX_STEPS):
|
| 148 |
image: Image.Image = get_from_side_camera(...)
|
| 149 |
# get inputs for esm
|
| 150 |
-
image_vggt = deepcopy(image)
|
| 151 |
image = image_fn([image]).unsqueeze(0)
|
| 152 |
|
| 153 |
esm_target_size = 224
|
|
|
|
| 121 |
|
| 122 |
```python
|
| 123 |
import torch
|
| 124 |
+
import json, functools, copy
|
| 125 |
from PIL import Image
|
|
|
|
| 126 |
from falcon.train.base_trainer import BaseTrainer
|
| 127 |
+
from falcon.data.data_utils import preprocess_image, get_text_function
|
|
|
|
| 128 |
from falcon.model.policy_head.esm_utils.vggt.utils.load_fn import load_and_preprocess_images_square_new
|
| 129 |
|
| 130 |
configs = josn.load(open('configs/falcon-esm-fc-calvin-abc.json', 'r'))
|
|
|
|
| 145 |
for step in range(MAX_STEPS):
|
| 146 |
image: Image.Image = get_from_side_camera(...)
|
| 147 |
# get inputs for esm
|
| 148 |
+
image_vggt = copy.deepcopy(image)
|
| 149 |
image = image_fn([image]).unsqueeze(0)
|
| 150 |
|
| 151 |
esm_target_size = 224
|