Official codebase for:
BiPreManip: Learning Affordance-Based Bimanual Preparatory Manipulation through Anticipatory Collaboration
arXiv:2603.21679
BiPreManip studies bimanual preparatory manipulation, where one arm first performs preparatory actions to make the other arm’s goal-directed manipulation feasible. BiPreManip uses an affordance-based anticipatory reasoning framework: it first envisions the primary arm’s intended interaction, then guides the assistant arm to perform complementary preparatory manipulation, and finally executes the goal-directed action. This design enables asymmetric coordination and long-horizon reasoning across diverse objects and tasks.
.
├── code/ # training, evaluation, and model code
├── data/ # datasets directory
├── logs/ # pretrained checkpoints
├── results/ # evaluation outputs and visualizations
├── stats/ # dataset splits and object metadata
├── images/ # README assets
└── readme.mdThis codebase has been tested on:
- Ubuntu 22.04
- CUDA 10.1
- Python 3.6
- PyTorch 1.7.0
pip install http://storage1.ucsd.edu/wheels/sapien-dev/sapien-0.8.0.dev0-cp36-cp36m-manylinux2014_x86_64.whlTo install PointNet++, first run the following commands:
git clone --recursive https://github.com/erikwijmans/Pointnet2_PyTorch
cd Pointnet2_PyTorch
# [IMPORTANT] comment these two lines of code:
# https://github.com/erikwijmans/Pointnet2_PyTorch/blob/master/pointnet2_ops_lib/pointnet2_ops/_ext-src/src/sampling_gpu.cu#L100-L101
pip install -r requirements.txt
pip install -e .
Finally, run the following to install other packages.
# make sure you are at the repository root directory
pip install -r requirements.txt
Before training or evaluation, please download all required resources here.
-
Preprocessed datasets: place the processed ShapeNet, PartNet, and PartNet-Mobility datasets under
data/. The processed datasets used in our paper are provided inobject_dataset_release.zip. -
Pretrained checkpoints: place the pretrained checkpoints under
logs/. They are provided inlogs.zip. -
Evaluation data: we also provide pre-collected test data for evaluation. Please place them under
data/. They are provided indata.zip.
This section provides a workflow from setup to data collection, training, and evaluation.
To collect data, for example for the articulated manipulation task, run:
cd code
sh scripts/run_collect_all_categories_articulated.shYou can switch between collecting data for the training object set and the novel (unseen) object set by setting the mode argument to train or test, respectively.
To train BiPreManip, for example on the articulated manipulation task, run:
cd code
sh scripts/run_train_Articulated.shTo evaluate a pretrained model and visualize the results on the articulated manipulation task, run:
cd code
python scripts/run_eval_articulated.pyFor convenience, we also provide a testing dataset that includes both training instances and novel instances:
Testing dataset: data.zip in this folder
Please note that due to randomness in data collection, the released testing set may not be exactly identical to the one used in the paper. As a result, reproduced numbers may differ slightly, while remaining broadly comparable.
If you find this project useful in your research, please cite:
@article{shen2026bipremanip,
title = {BiPreManip: Learning Affordance-Based Bimanual Preparatory Manipulation through Anticipatory Collaboration},
author = {Shen, Yan and Jiang, Feng and He, Zichen and Li, Xiaoqi and Liu, Yuchen and Li, Zhiyu and Wu, Ruihai and Dong, Hao},
journal = {arXiv preprint arXiv:2603.21679},
year = {2026}
}This repository builds on DualAfford’s codebase structure. Please also cite DualAfford if it is relevant to your use:
@inproceedings{zhao2023dualafford,
title = {DualAfford: Learning Collaborative Visual Affordance for Dual-gripper Manipulation},
author = {Zhao, Yan and Wu, Ruihai and Chen, Zhehuan and Zhang, Yourong and Fan, Qingnan and Mo, Kaichun and Dong, Hao},
booktitle = {International Conference on Learning Representations},
year = {2023}
}