MCPcopy Index your code
hub / github.com/InternRobotics/UniHSI

github.com/InternRobotics/UniHSI @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
720 symbols 1,770 edges 53 files 118 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Unified Human-Scene Interaction via Prompted Chain-of-Contacts

<a href='https://github.com/xizaoqu/' target='_blank'>Zeqi Xiao</a>&emsp;
<a href='https://tai-wang.github.io/' target='_blank'>Tai Wang</a>&emsp;
<a href='https://scholar.google.com/citations?user=GStTsxAAAAAJ&hl=zh-CN&oi=ao/' target='_blank'>Jingbo Wang</a>&emsp;
<a href='https://www.jinkuncao.com/' target='_blank'>Jinkun Cao</a>&emsp;
<a href='http://zhangwenwei.cn/' target='_blank'>Wenwei Zhang</a>&emsp;
<a href='https://daibo.info/' target='_blank'>Bo Dai</a>&emsp;
<a href='http://dahua.site/' target='_blank'>Dahua Lin</a>&emsp;
<a href='https://oceanpang.github.io/' target='_blank'>Jiangmiao Pang*</a>&emsp;



Shanghai AI Laboratory&emsp;Nanyang Technological University&emsp;Carnegie Mellon University

🏠 About

<img src="https://github.com/InternRobotics/UniHSI/raw/main/assets/teaser.png" alt="Dialogue_Teaser" width=100% >

This paper presents a UNIfied HSI framework, UniHSI, which supports unified control of diverse interactions through language commands. This framework is built upon the definition of interaction as Chain of Contacts (CoC): steps of human joint-object part pairs, which is inspired by the strong correlation between interaction types and human-object contact regions. Based on the definition, UniHSI constitutes a Large Language Model (LLM) Planner to translate language prompts into task plans in the form of CoC, and a Unified Controller that turns CoC into uniform task execution. To facilitate training and evaluation, we collect a new dataset named ScenePlan that encompasses thousands of task plans generated by LLMs based on diverse scenarios. Comprehensive experiments demonstrate the effectiveness of our framework in versatile task execution and generalizability to real scanned scenes.

🔥 News

  • For reproducing the demo, please refer to blender_for_UniHSI
  • [2024-04] The data is released.
  • [2024-03] The code is released.
  • [2024-01] UniHSI is accepted as ICLR 2024 spotlight. Thanks for the recognition!
  • [2023-09] We release the paper of UniHSI. Please check the :point_right: webpage :point_left: and view our demos! :sparkler:;

🔍 Overview

The whole pipeline consists of two major components: the LLM Planner and the Unified Controller. The LLM planner takes language inputs and background scenario information as inputs and outputs multi-step plan in the form of a Chain of Contacts. The Unified Controller then executes task plans step-by-step and output interaction movements.

Installation

Download Isaac Gym from the website, then follow the installation instructions.

Once Isaac Gym is installed, install the external dependencies for this repo:

pip install -r requirement.txt

Data Preparation

PartNet

  1. Download PartNet and ShapeNet V2.

  2. Save them in the following formation

data/
├── partnet_origin
│   ├── obj_id1
│   ├── obj_id2
│   ├── ...
├── shapenet_origin
│   ├── class_id1
│   │    ├── obj_id1
│   │    ├── ...
│   ├── class_id2
│   │    ├── obj_id1
│   │    ├── ...
│   ├── ...
  1. Extract the objects used in sceneplan by
python cp_partnet_train.py
python cp_partnet_test.py

ScanNet

  1. Download ScanNet.

  2. Save them in the following formation

data/
├── scan_origin
│   ├── scans
│   │   ├── scans_1
│   │   ├── scans_2
│   │   ├── ...
  1. Extract the objects used in sceneplan by
python cp_scannet_test.py

Motio Clips

We select and process motion clips from SAMP and CIRCLE.

Training

We adopt step-by-step training.

sh train_partnet_simple.sh
sh train_partnet_mid.sh
sh train_partnet_hard.sh

Demo

sh demo_scannet.sh

Evaluation

sh test_partnet_simple.sh
sh test_partnet_mid.sh
sh test_partnet_hard.sh
sh test_scannet_simple.sh
sh test_scannet_mid.sh
sh test_scannet_hard.sh
Source Success Rate (%) Contact Error Success Steps
Simple Mid Hard Simple Mid Hard Simple Mid Hard
PartNet 85.5 67.9 40.5 0.035 0.037 0.040 2.13 4.11 4.84
ScanNet 73.2 43.1 22.3 0.061 0.072 0.062 2.21 3.47 4.78

The results will be saved in the "output" folder. * There will be ~10% variance due to randomness in sampling.

🔗 Citation

If you find our work helpful, please cite:

@inproceedings{
  xiao2024unified,
  title={Unified Human-Scene Interaction via Prompted Chain-of-Contacts},
  author={Zeqi Xiao and Tai Wang and Jingbo Wang and Jinkun Cao and Wenwei Zhang and Bo Dai and Dahua Lin and Jiangmiao Pang},
  booktitle={The Twelfth International Conference on Learning Representations},
  year={2024},
  url={https://openreview.net/forum?id=1vCnDyQkjg}
}

📄 License

Creative Commons License

This work is under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

👏 Acknowledgements

  • ASE: Our codebase is built upon the AMP implementation in ASE.
  • PartNet and ShapeNet.: We use objects from PartNet for training and evaluation.
  • ScanNet: We use scenarios from ScanNet for evaluation.
  • SAMP: We use motion clips from SAMP for training.
  • CIRCLE: We use motion clips from CIRCLE for training.

Core symbols most depended-on inside this repo

quat_rotate
called by 66
unihsi/poselib/poselib/core/rotation3d.py
clone
called by 58
unihsi/poselib/poselib/skeleton/skeleton3d.py
numpy
called by 53
unihsi/utils/motion_lib.py
format
called by 34
unihsi/utils/logger.py
update
called by 28
unihsi/poselib/poselib/visualization/core.py
tensor_to_dict
called by 13
unihsi/poselib/poselib/core/tensor_utils.py
from_rotation_and_root_translation
called by 13
unihsi/poselib/poselib/skeleton/skeleton3d.py
load
called by 12
unihsi/learning/amp_network_builder.py

Shape

Method 522
Function 138
Class 60

Languages

Python100%

Modules by API surface

unihsi/poselib/poselib/skeleton/skeleton3d.py79 symbols
unihsi/poselib/poselib/visualization/plt_plotter.py44 symbols
unihsi/poselib/poselib/visualization/simple_plotter_tasks.py41 symbols
unihsi/env/tasks/humanoid.py37 symbols
unihsi/poselib/poselib/core/rotation3d.py35 symbols
unihsi/learning/amp_agent.py34 symbols
unihsi/learning/amp_network_builder.py27 symbols
unihsi/env/tasks/unihsi_partnet_train.py27 symbols
unihsi/env/tasks/unihsi_partnet_test.py27 symbols
unihsi/env/tasks/unihsi_partnet.py27 symbols
unihsi/env/tasks/unihsi_scannet_test.py25 symbols
unihsi/env/tasks/unihsi_scannet.py25 symbols

For agents

$ claude mcp add UniHSI \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact