File size: 7,708 Bytes
bd12d90
9ee6f68
 
 
 
bd12d90
9ee6f68
 
 
bd12d90
 
 
9ee6f68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7bcb4d2
 
 
 
 
 
 
 
 
 
 
 
9ee6f68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
title: ManiTaskGen Demo
emoji: 🎯
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.1
app_file: demo/app.py
python_version: "3.10"
pinned: false
---

# ManiTaskGen: A Comprehensive Task Generator for Embodied AI

[![arXiv](https://img.shields.io/badge/arXiv-2505.20726-df2a2a.svg)](https://arxiv.org/abs/2505.20726)
[![Website](https://img.shields.io/badge/Project%20Page-Visit-brightgreen)](https://manitaskgen.github.io/)

ManiTaskGen automatically generates a comprehensive set of mobile-manipulation
tasks for **any given scene**:

- **Process-based tasks** β€” step-by-step move instructions
  (e.g. *"Move the remote to the desk's front-left freespace"*), complete with
  PDDL-style goal expressions.
- **Outcome-based task candidates** β€” goal-state instructions instantiated from
  the ManiTaskOT-200 template set (e.g. *"Organize all books on the shelf by
  height and type"*).

## πŸ–±οΈ Click-and-use web demo (no API key, no VLM, CPU-only)

This repository ships a [Gradio](https://gradio.app) demo at **`demo/app.py`**:

1. **Try the built-in example** β€” a tiny synthetic "demo studio" scene
   (desk, low table, 3-layer shelf, counter + 12 small objects). One click
   generates both task types in a few seconds.
2. **Upload your own `scene.zip`** β€” a Habitat/ReplicaCAD-style scene pack
   (see format below). The scene is parsed in an isolated temp directory and
   the original ManiTaskGen generators run on it directly.

Both paths return two lists of tasks plus a downloadable **`tasks.jsonl`**.
Everything runs offline: **no VLM is called** β€” object renaming and feasibility
voting are skipped, and outcome candidates are exported with
`voting_status: "not_run"`.

### πŸ—³ Optional GLM feasibility voting (text-only)

Generation never calls a VLM, but the UI includes an **optional** voting pass
for outcome candidates: paste an OpenAI-compatible API key (default
Z.AI `glm-5.3-flash`) and click *Run GLM voting*. It votes on a
**template-diverse sample** of candidates with N voters (different personas
and sampling temperatures, majority decides), entirely from the scene-graph
inventory (no rendering). Every vote is recorded with the **real model name**
in `tasks.jsonl` (`votes`, `voter_model`, `voting_status`), unvoted candidates
keep `voting_status: "not_run"`. The key is used for the request only and is
never stored or logged.

### Run it locally

```bash
conda create -n manitaskgen-demo python=3.10 -y
conda activate manitaskgen-demo
pip install -r demo/requirements.txt
python demo/app.py          # open http://127.0.0.1:7860
```

Or deploy the repository as a Hugging Face Space: create a new *Gradio* Space,
upload/push this repository, and it builds straight from the `README.md`
front-matter above (`app_file: demo/app.py`). The demo runs on the **free CPU
Basic** hardware β€” no GPU grant is needed.

### Scene pack format (`scene.zip`)

The archive mirrors the on-disk layout of a Habitat / ReplicaCAD dataset root β€”
exactly what the repository's scene parser consumes:

```
scene.zip
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ scenes/<any-name>.scene_instance.json   ← entry file (Habitat scene instance)
β”‚   └── objects/<template>.object_config.json   ← per-template asset config
β”œβ”€β”€ objects/
β”‚   β”œβ”€β”€ <template>.glb                          ← object meshes (Y-up, like ReplicaCAD)
β”‚   └── convex/<template>_cv_decomp.glb         ← optional collision meshes
β”œβ”€β”€ stages/<stage>.glb                          ← background/stage mesh
└── urdf/<name>/<name>.urdf                     ← optional (articulated objects)
```

- **Entry file**: a `*.scene_instance.json` (searched under
  `configs/scenes/` first, then anywhere in the archive). It lists
  `stage_instance`, `object_instances` (template name, `motion_type`,
  `translation`, `rotation` β€” Habitat convention, quaternion `[w, x, y, z]`)
  and optional `articulated_object_instances`.
- **Coordinates**: translations follow the Habitat convention (Y-up). Meshes
  are stored Y-up (ReplicaCAD convention); the pipeline converts both to its
  internal Z-up representation.
- **Naming matters**: outcome-task categories are derived from the object name
  before the first `_` (`book_red_0` β†’ *book*), and everything before the
  trailing `_index` is the minor category (`book_red`). `door`/`drawer` in a
  template name are skipped by the scene-graph builder.

### Modify the built-in example and re-upload

```bash
# download example_scene.zip from the demo page, then:
unzip example_scene.zip -d my_scene && cd my_scene
# 1. edit configs/scenes/demo_studio.scene_instance.json
#    - move an object: change its "translation"
#    - remove one: delete its entry (and optionally its glb/config files)
# 2. re-zip (keeping the layout) and upload to the demo
zip -r ../my_scene.zip .
```

Results always reflect the uploaded scene β€” tasks referencing removed objects
disappear, because uploaded packs are never cached. Missing assets are
reported with the exact file paths.

## πŸ“„ Paper pipeline (experiments, VLM voting, benchmarking)

The original workflow is unchanged:

```bash
# environment (paper experiments)
conda create -n manitaskgen python=3.10 -y && conda activate manitaskgen
bash install.sh        # installs config/requirements_minimal.txt + VLMEvalKit

# stage 1: parse scene + build scene graph
bash scripts/run_01_preprocessings.sh
# stage 2a: process-based tasks
bash scripts/run_02a_gen_process_tasks.sh
# stage 2b: outcome-based tasks (VLM voting; add --skip_vlm_vote to skip)
bash scripts/run_02b_gen_outcome_tasks.sh
# stage 3: benchmark
bash scripts/run_03_run_benchmark.sh
```

`src/scripts/02b_gen_outcome_based_tasks.py` additionally accepts
`--skip_vlm_vote`, which skips VLM voting and the voting-only SAPIEN render
scene (CPU-only machines) and writes every successfully-bound candidate with
`voting_status: not_run`. See `docs/` for architecture details.

## Repository layout

```
.
β”œβ”€β”€ demo/                  # Gradio demo (click-and-use web app)
β”‚   β”œβ”€β”€ app.py             # UI entry (HF Spaces: app_file)
β”‚   β”œβ”€β”€ pipeline.py        # parse β†’ scene graph β†’ tasks β†’ tasks.jsonl
β”‚   β”œβ”€β”€ scene_pack.py      # safe zip handling + asset verification
β”‚   β”œβ”€β”€ build_example_scene.py  # regenerates demo/assets/example_scene(.zip)
β”‚   └── assets/example_scene.zip
β”œβ”€β”€ config/                # runtime configuration
β”œβ”€β”€ data/templates/        # ManiTaskOT-200 templates + prompt files
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/              # scene graph, process/outcome task generation
β”‚   β”œβ”€β”€ preprocessing/     # scene parsers (ReplicaCAD, SUN-RGBD)
β”‚   β”œβ”€β”€ scripts/           # 01/02a/02b/03 pipeline entry scripts
β”‚   └── vlm_interaction/   # VLM renaming / voting / benchmark (paper pipeline)
β”œβ”€β”€ scripts/               # shell entry points + dataset download helpers
└── docs/                  # design documents
```

## Notes & licenses

- The built-in example scene is generated from primitive geometry
  (`demo/build_example_scene.py`) and freely redistributable.
- [ReplicaCAD](https://aihabitat.org/datasets/replica_cad/) assets
  (CC-BY-NC 4.0, by Meta) are **not** included in this repository; download
  them via `scripts/download_habitat_datasets.py` for paper experiments.
- ManiTaskOT-200 templates are part of the ManiTaskGen project.

## Citation

```bibtex
@article{manitaskgen2025,
  title={ManiTaskGen: A Comprehensive Task Generator for Benchmarking and
         Improving Vision-Language Agents on Embodied Decision-Making},
  journal={arXiv preprint arXiv:2505.20726},
  year={2025}
}
```