GithubHelp home page GithubHelp logo

haojieshi98 / gpat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from real-stanford/gpat

0.0 0.0 0.0 1.8 MB

[CoRL 2023] Rearrangement Planning for General Part Assembly

C++ 14.90% Python 57.77% Cuda 27.33%

gpat's Introduction

Rearrangement Planning for General Part Assembly

1Columbia University, 2Google Deepmind

Project Page | arXiV

teaser


Catalog

Environment

conda env create -f environment.yml
conda activate gpat
pip install -e .

Install other dependencies (chamfer and pointops):

cd utils/chamfer; python setup.py install
cd ../pointops; python setup.py install

Dataset

We create our dataset from PartNet. To recreate our data, first download PartNet v0 to dataset/partnet_raw. Also download PartNet meta data to dataset/partnet_dataset. Then run the following command:

python dataset/preprocess.py

For custom datasets, each data point should have the following files in its folder:

target.npy # (5000, 3), required, target point-cloud.
parts.npy # (K, 1000, 3), required, parts point-clouds.
target_100k.npy # (100000, 3), optional, a dense target point-cloud. Optionally include this for better assembly results.
target_100k_labels.npy # (10000), optional, indicates the nearest neighbor of target_100k.npy in target.npy, with values from [0, 5000). Optionally include this for better assembly results.
poses.npy # (K, 7), optional, GT poses for each part. First three coordinates denote (x, y, z) position, last four coordinates denote a quaternion with real-part first. Optionally include this for correct evaluation.
labels.npy # (5000), optional, GT segmentation label of the target, each index takes a value from [0, K). Optionally include this for correct evaluation of segmentation.
eq_class.npy # (K), optional, equivalence classes of the parts. For example, [0,0,1,2,2,2] means that the first two parts are equivalent, and last three parts are equivalent.  Optionally include this for correct evaluation.

Training and Testing

To re-train GPAT,

python learning/gpat/run.py --mode=train --ratio=0.7 --rand --exp=EXPNAME --cuda=CUDAIND

To evaluate with our pretrained GPAT checkpoint, download the checkpoint to logs/pretrained/gpat.pth.

python learning/assembler.py --eval --cat=CATEGORY --exp=EXPNAME --cuda=CUDAIND

Pass in --ratio=1 to test non-exact parts only (or another ratio from [0, 1] to indicate the probability of testing with non-exact parts). Pass in --rand to test targets at random poses. To evaluate with custom dataset, specify the directory containing all the data folders (instructions) with --eval_dir (note that you cannot directly point to a single data folder). For custom model checkpoints, pass in the model path with --model_path. For other parameters, see init_args() in learning_utils.py.

Acknowledgements

Citation

If you find this codebase useful, feel free to cite our work!

@inproceedings{li2023rearrangement,
	title={Rearrangement Planning for General Part Assembly},
	author={Li, Yulong and Zeng, Andy and Song, Shuran},
	booktitle={Conference on Robot Learning},
	year={2023},
	organization={PMLR}
}

Feel free to contact Yulong if you have any questions or related ideas!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.