Skip to content

Commit da1a4a6

Browse files
committed
change readme
1 parent 970b17d commit da1a4a6

File tree

4 files changed

+60
-8
lines changed

4 files changed

+60
-8
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
1+
# VLMbench: A Benchmark for Vision-and-Language Manipulation
2+
3+
![task image missing](readme_files/tasks.svg)
4+
5+
**VLMbench** is a robotics manipulation benchmark, which contains various language instructions on categorized robotic manipulation tasks. In this work, we aim to fill the blank of the last mile of embodied agents---object manipulation by following human guidance, e.g., “move the red mug next to the box while keeping it upright.” Meanwhile, we introduce an Automatic Manipulation Solver (**AMSolver**), where modular rule-based task templates are created to automatically generate robot demonstrations with language instructions, consisting of diverse object shapes and appearances, action types, and motion constraints. [Click here for website and paper.](https://sites.google.com/corp/view/rlbench)
6+
17
The implementaions of AMSolver, VLM, and 6D-CLIPort.
28

3-
In order to use the code, you should instill [PyRep](https://github.com/stepjam/PyRep) first. Then, lets install AMSolver:
9+
## AMSolver Install
10+
Users can use AMSolver to run the current tasks in the VLMbench or build new tasks. In order to run the AMSolver, you should install [PyRep](https://github.com/stepjam/PyRep) first. Then, lets install AMSolver:
411

512
```bash
613
pip install -r requirements.txt
714
pip install .
815
```
916

10-
In the vlm folder, we have predefined some task categories and instance tasks for vlmbench dataset. If you want to customize your own task, the scripts in the tools folder can be helpful.
17+
In the vlm folder, we have predefined some task categories and instance tasks for VLMbench. If you want to customize your own task, the scripts in the tools folder can be helpful.
18+
19+
## VLMbench Baselines
20+
21+
The precollected dataset can be found at here: [Dataset](https://drive.google.com/drive/folders/17dEJrIIdlDsDF6T2rn04y7Yy8mUpKfCK?usp=sharing)
22+
23+
The pretrained models can be found at here: [Model](https://drive.google.com/drive/folders/1yFbWhP2iHQvY04q8LNmrpT6_5ctTcZDk?usp=sharing)
24+
25+
To train new 6D-CLIPort models:
26+
```bash
27+
python vlm/scripts/train_baselines.py
28+
```
29+
30+
To test pretrained 6D-CLIPort models:
31+
```bash
32+
python vlm/scripts/cliport_test.py
33+
```

readme_files/tasks.svg

Lines changed: 1 addition & 0 deletions
Loading

tools/assets/task_template.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from typing import List
2+
import numpy as np
3+
import os
4+
from rlbench.backend.task import Task
5+
from pyrep.objects.shape import Shape
6+
from pyrep.objects.proximity_sensor import ProximitySensor
7+
from rlbench.const import colors
8+
from rlbench.backend.conditions import DetectedCondition
9+
from rlbench.backend.spawn_boundary import SpawnBoundary
10+
from amsolver.backend.unit_tasks import T0_ObtainControl, T1_MoveObjectGoal, T2_MoveObjectConstraints, TargetSpace, VLM_Object
11+
12+
class %s(Task):
13+
14+
def init_task(self) -> None:
15+
# TODO: This is called once when a task is initialised.
16+
pass
17+
18+
def init_episode(self, index: int) -> List[str]:
19+
# TODO: This is called at the start of each episode.
20+
return ['']
21+
22+
def variation_count(self) -> int:
23+
# TODO: The number of variations for this task.
24+
return 1
25+
26+
def step(self) -> None:
27+
# Called during each sim step. Remove this if not using.
28+
pass

vlm/scripts/train_baselines.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,17 +428,17 @@ def val(data_loader, model, args, epoch):
428428

429429
parser = argparse.ArgumentParser(description='')
430430
#dataset
431-
parser.add_argument('--data_dir', type=str, default=',,/vlmbench')
431+
parser.add_argument('--data_dir', type=str, default='../vlmbench')
432432
parser.add_argument('--setd', type=str, default='train')
433-
parser.add_argument('--img_size',nargs='+', type=int, default=[256,256])
434-
parser.add_argument('--batch_size', type=int, default=64, metavar='N',
435-
help='input batch size for training (default: 2)')
436-
parser.add_argument('--workers', type=int, default=128)
433+
parser.add_argument('--img_size',nargs='+', type=int, default=[224, 224])
434+
parser.add_argument('--batch_size', type=int, default=8, metavar='N',
435+
help='input batch size for training (default: 8)')
436+
parser.add_argument('--workers', type=int, default=32)
437437
parser.add_argument('--preprocess', action='store_true',
438438
help="whether preprocess the data. Next time can directly use. Add if you don't want it.")
439439
parser.add_argument('--unused_camera_list', nargs='+', default=['left_shoulder', 'right_shoulder', 'overhead','wrist'])
440440
parser.add_argument('--use_fail_cases', action='store_true', help="add if use the fail cases")
441-
parser.add_argument('--sample_numbers', type=int, default=40, help="downsample from total demonstrations")
441+
parser.add_argument('--sample_numbers', type=int, default=0, help="downsample from total demonstrations")
442442
parser.add_argument('--pin_memory', action='store_true', help="do not use if the RAM is small")
443443
parser.add_argument('--train_tasks', nargs='+', type=str, default = None)
444444

0 commit comments

Comments
 (0)