ManiTaskGen / README.md
ManiacWallnut's picture
Deploy ManiTaskGen VLM-free Gradio demo
7bcb4d2 verified
|
Raw History Blame Contribute Delete
7.71 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade
metadata
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 Website

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 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

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

# 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:

# 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 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

@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}
}