8000 GitHub - HiPolicy/HiPolicy · GitHub
[go: up one dir, main page]

Skip to content
HiPolicyPublic

About

No description, website, or topics provided.

Resources

Stars

14 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

HiPolicy

English | 简体中文

HiPolicy: Hierarchical Multi-frequency Action Chunking for Policy Learning — ECCV 2026

HiPolicy combines action chunks at multiple temporal frequencies with entropy-guided execution. This repository provides DP + HiPolicy for RGB observations and DP3 + HiPolicy for point clouds on RoboTwin V1 and V2. Project page.

Run the commands below from the repository root unless stated otherwise.

Setup · Training · Evaluation · Short trial run · Licenses · Citation

Repository layout

README.md / README.zh-CN.md    # English / Chinese documentation
policy/diffusion_policy/      # Shared DP package
policy/diffusion_policy_3d/   # Shared DP3 package
policy/hipolicy_compat/       # Benchmark-specific datasets and trainers
benchmarks/robotwin_v1/       # V1 simulation, tasks and data tools
benchmarks/robotwin_v2/       # V2 simulation, tasks and data tools
configs/                     # Four active 14D training profiles
execution/                   # CLI, checkpoint loading and entropy selection
scripts/                     # CLI, environment and asset helpers
requirements/                # Separate benchmark dependency sets

Environment setup

Use Linux, Python 3.8, an NVIDIA GPU, a compatible CUDA 12.1 toolchain, Vulkan and FFmpeg for simulation. Check nvidia-smi and vulkaninfo before proceeding.

Use the corresponding RoboTwin version's official setup instructions for the system, simulator and extension prerequisites:

Keep HiPolicy's dependency constraints when following those instructions. The latest RoboTwin setup has evolved and is not a drop-in environment for this checkout. In particular, Numba 0.56.4 requires NumPy below 1.24; PyTorch/torchvision, diffusers, Zarr 2, numcodecs, OpenCV and MoviePy also have compatibility constraints in the supplied requirements.

Install HiPolicy in the selected environment

git clone https://github.com/HiPolicy/HiPolicy.git
cd HiPolicy
HIPOLICY_ROOT="$PWD"

sudo apt install libvulkan1 mesa-vulkan-drivers vulkan-tools ffmpeg unzip
conda create -n hipolicy-v1 python=3.8
conda activate hipolicy-v1
python -m pip install 'pip>=22,<25'
python -m pip install -r requirements/robotwin_v1.txt
python -m pip install -e .
python scripts/patch_sim_dependencies.py --benchmark robotwin_v1

For V2, create and activate hipolicy-v2, then use requirements/robotwin_v2.txt and --benchmark robotwin_v2.

V1: install the official simplified PyTorch3D

After installing the V1 requirements, obtain the extension from the official RoboTwin V1 source:

mkdir -p third_party
git clone --branch RoboTwin-1.0 https://github.com/RoboTwin-Platform/RoboTwin.git third_party/robotwin-v1
git -C third_party/robotwin-v1 checkout 65a6f5bb74794ba193c6bf17d8eae3b74fc2df70
python -m pip install -e third_party/robotwin-v1/third_party/pytorch3d_simplified --no-build-isolation

V2: install its point-cloud and planning extensions

The supplied V2 setup used the following upstream references:

python -m pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'
git clone https://github.com/NVlabs/curobo.git benchmarks/robotwin_v2/envs/curobo
python -m pip install -e benchmarks/robotwin_v2/envs/curobo --no-build-isolation

Download assets and check rendering

python scripts/download_assets.py --benchmark robotwin_v1
python scripts/download_assets.py --benchmark robotwin_v2

These download the original ZanxinChen/RoboTwin_asset and TianxingChen/RoboTwin2.0 Hugging Face datasets.

Run the matching rendering check in each environment:

python scripts/hipolicy.py render --benchmark robotwin_v1 --policy dp --task block_hammer_beat
python scripts/hipolicy.py render --benchmark robotwin_v2 --policy dp3 --task place_bread_basket

Collect, convert and train

Activate the matching environment and select one row. --policy selects both the observation modality and the corresponding training implementation.

Route BENCHMARK POLICY Example TASK Environment
V1 DP + HiPolicy robotwin_v1 dp block_hammer_beat hipolicy-v1
V1 DP3 + HiPolicy robotwin_v1 dp3 block_hammer_beat hipolicy-v1
V2 DP + HiPolicy robotwin_v2 dp place_bread_basket hipolicy-v2
V2 DP3 + HiPolicy robotwin_v2 dp3 place_bread_basket hipolicy-v2

Run the following Bash commands from the repository root:

HIPOLICY_ROOT="$PWD"
BENCHMARK=robotwin_v1
POLICY=dp
TASK=block_hammer_beat
DATA_ROOT="$HIPOLICY_ROOT/data"
OUTPUT_ROOT="$HIPOLICY_ROOT/outputs"

COMMON=(--benchmark "$BENCHMARK" --policy "$POLICY" --task "$TASK"
        --camera D435 --task-config demo_randomized --episodes 100 --seed 0
        --gpus 0 --data-root "$DATA_ROOT" --output-root "$OUTPUT_ROOT")

python "$HIPOLICY_ROOT/scripts/hipolicy.py" collect "${COMMON[@]}"
python "$HIPOLICY_ROOT/scripts/hipolicy.py" convert "${COMMON[@]}"
python "$HIPOLICY_ROOT/scripts/hipolicy.py" train   "${COMMON[@]}"

After HIPOLICY_ROOT is set, these absolute-path invocations work from any directory. Use --dry-run to inspect paths without importing the simulator.

Data and output layout

Paths below are relative to the repository root:

data/<benchmark>/<policy>/raw/<task>_<camera>_pkl/          # V1
data/<benchmark>/<policy>/raw/<task>/<task-config>/data/   # V2
data/<benchmark>/<policy>/processed/<task>_<setting>_100.zarr
outputs/<benchmark>/<policy>/<task>/<setting>/demos100/seed0/checkpoints/<epoch>.ckpt

<setting> means the camera (D435) for V1 and task configuration for V2.

Training configuration

Setting DP + HiPolicy DP3 + HiPolicy
Epochs 600 3,000
Batch per process 128 128
AdamW learning rate 1e-4 1e-4
AdamW betas / weight decay [0.9, 0.999] / 1e-6 [0.9, 0.999] / 1e-6
Scheduler / inference steps DDPM / 100 DDPM / 100
Prediction target epsilon sample
Diffusion-step embedding 128 64
Action / state dimensions 14 / 14 14 / 14

Evaluation and entropy guidance

Use a real checkpoint file and the benchmark/policy that produced it:

CHECKPOINT=/path/to/epoch.ckpt

# Default: sample once and execute the short eight-step chunk.
python "$HIPOLICY_ROOT/scripts/hipolicy.py" evaluate "${COMMON[@]}" \
  --checkpoint "$CHECKPOINT" --eval-episodes 100

# Entropy guidance: sample 100 candidates together in the model batch.
python "$HIPOLICY_ROOT/scripts/hipolicy.py" evaluate "${COMMON[@]}" \
  --checkpoint "$CHECKPOINT" --eval-episodes 100 --entropy-guidance

Short trial run

Before a full run, use a small collected dataset and separate data/output roots. Set COMMON to the actual demonstration count and matching task setting, then run:

python scripts/hipolicy.py train "${COMMON[@]}" \
  --set training.num_epochs=1 --set training.checkpoint_every=1 \
  --set training.max_train_steps=1 --set training.max_val_steps=1

Evaluate the generated 1.ckpt with --eval-episodes 1, with and without --entropy-guidance. Check videos, resolved configuration, checkpoint loading and episode completion.

Licenses and acknowledgments

HiPolicy is distributed under the MIT License. This release includes source from RoboTwin V1/V2, Diffusion Policy and 3D Diffusion Policy. Their copyright notice 6906 s are retained below; all four use the same MIT permission and warranty terms provided in LICENSE:

Source Copyright holder License text
RoboTwin V1 Copyright (c) 2024 Tianxing Chen (陈天行) MIT
RoboTwin V2 Copyright (c) 2025 Tianxing Chen (陈天行) MIT
Diffusion Policy Copyright (c) 2023 Columbia Artificial Intelligence and Robotics Lab MIT
3D Diffusion Policy Copyright (c) 2024 Yanjie Ze MIT

External datasets, assets, PyTorch3D and cuRobo are downloaded separately and retain their own terms and attribution.

Citation

If you use HiPolicy, please cite the official ECCV 2026 publication:

@inproceedings{zhang2026hipolicy,
  title     = {{HiPolicy}: Hierarchical Multi-frequency Action Chunking for Policy Learning},
  author    = {Zhang, Jiyao and Han, Zimu and Wang, Junhan and Wu, Xionghao and Lin, Shihong and Li, Jinzhou and Fan, Hongwei and Wu, Ruihai and Li, Dongjiang and Dong, Hao},
  booktitle = {Computer Vision -- ECCV 2026},
  series    = {Lecture Notes in Computer Science},
  volume    = {17038},
  pages     = {359--376},
  year      = {2026},
  publisher = {Springer},
  address   = {Cham},
  doi       = {10.1007/978-3-032-37447-9_20}
}

Official ECCV 2026 publication

About

No description, website, or topics provided.

Resources

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0