{"id":19917984,"url":"https://github.com/danfeix/rpn","last_synced_at":"2025-04-28T14:09:08.773Z","repository":{"id":81492284,"uuid":"217775192","full_name":"danfeiX/RPN","owner":"danfeiX","description":"Code Repository for Regression Planning Networks","archived":false,"fork":false,"pushed_at":"2024-07-25T10:57:09.000Z","size":3586,"stargazers_count":60,"open_issues_count":1,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-28T14:09:01.439Z","etag":null,"topics":["machine-learning","pybullet","pytorch","robotics","robotics-simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danfeiX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-10-26T22:09:39.000Z","updated_at":"2025-04-10T23:56:07.000Z","dependencies_parsed_at":"2023-07-08T08:31:59.612Z","dependency_job_id":null,"html_url":"https://github.com/danfeiX/RPN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfeiX%2FRPN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfeiX%2FRPN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfeiX%2FRPN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danfeiX%2FRPN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danfeiX","download_url":"https://codeload.github.com/danfeiX/RPN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326839,"owners_count":21571636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","pybullet","pytorch","robotics","robotics-simulation"],"created_at":"2024-11-12T21:52:04.618Z","updated_at":"2025-04-28T14:09:08.746Z","avatar_url":"https://github.com/danfeiX.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regression Planning Networks\n![preview](assets/rpn.png)\n\n\nA reference implementation of the [Regression Planning Networks](https://arxiv.org/abs/1909.13072). \n\nThis repo also includes the simulated environments\nused in the paper: GridWorld and Kitchen3D. GridWorld is built on [gym-minigrid](https://github.com/maximecb/gym-minigrid).\nKitchen3D is simulated with [PyBullet](https://github.com/bulletphysics/bullet3/tree/master/examples/pybullet). Most of the PyBullet utilities are adapted from Caelan Garrett's \n[ss-pybullet](https://github.com/caelan/ss-pybullet). The [Appendix](assets/RPN_Appendix.pdf) of the original paper is also included here for reference.\n\nTo cite the code, use bibtex:\n```\n@inproceedings{xu2019rpn,\n  title={Regression Planning Networks},\n  author={Xu, Danfei and Martín-Martín, Roberto and Huang, De-An and Zhu, Yuke and Savarese, Silvio and Fei-Fei, Li},\n  booktitle={Thirty-third Conference on Neural Information Processing Systems (NeurIPS)},\n  year={2019}\n }\n```\n\n\n\n\n![preview](assets/preview.gif)\n## Installation and Setup\nRequirement: Python \u003e= 3.6\n\nNote: The code DOES NOT work with Python 3.5\n\n```\n$ git clone https://github.com/danfeiX/rpn.git\n$ git submodule update --init --recursive\n$ pip install -r requirements.txt\n$ cd rpn\n$ mkdir checkpoints\n$ mkdir data\n```\n\n## Kitchen3D\n\n### Dataset\nTo reproduce the main experiments, first create a demonstration dataset with three ingredients and two dishes \n(`I=3`, `D=2`). \n```\n$ python create_dataset_pb.py --problem pb_cook_meal_3i_2d_3m_iter \\\n    --dataset data/pb_cook_3i_2d_3m_10_s0.group \\\n    --num_episodes 10 --num_tasks -1 --seed 0 \\\n    --teleport --num_chunks 100 --num_workers 10\n```\nThe entire process takes around 3 hours with 10 works (`--num_workers 10`) on a machine with i7-7700K CPU @ 4.20GHz.\n The dataset will be written to `data/pb_cook_3i_2d_3m_10_s0.group`. \n \nTo create a smaller validation set, run:\n```\n$ python create_dataset_pb.py --problem pb_cook_meal_3i_2d_3m_iter \\\n    --dataset data/pb_cook_3i_2d_3m_1_s1.group \\\n    --num_episodes 1 --num_tasks -1 --seed 1 \\\n    --teleport --num_chunks 10 --num_workers 10\n```\n \n### Train\nTo train our full RPN model, run:\n```\n$ python train.py --dataset data/pb_cook_3i_2d_3m_10_s0.group \\\n    --testset data/pb_cook_3i_2d_3m_1_s1.group \\\n    --exp rpn \\\n    --run experiment \\\n    --batch_size 128 \\\n    --eval_batch_size 128 \\\n    --eval_freq 1 --save_freq 1 \\\n    --num_epoch 10 --config configs/pbv_rpn.json \\\n    --num_workers 1\n```\n\nCheckpoints will be written to `checkpoints/rpn/experiment/` each epoch. Both text and tensorboard event will be written\nto `checkpoints/rpn/experiment/log/`.\n\n#### Evaluation\nTo evaluate a trained model on the Kitchen3D task with `I=6` and `D=3`, run:\n\n```\n$ python eval_pb.py --restore_path checkpoints/rpn/experiment/ckpt_ep6.pt \\\n       --problem pb_cook_meal_6i_3d_6m_shuffle \\\n       --num_eval 1000 --seed 1 \\\n       --display\n```\n\nAside: Our naming convention for the cooking tasks is `pb_cook_meal_\u003cI\u003ei_\u003cD\u003ed_\u003cM\u003em_\u003cshuffle/iter\u003e`, where `\u003cI\u003e` is the \nnumber of ingredients involved, `\u003cD\u003e` is the number of dishes to cook, `\u003cM\u003e` is the maximum number of ingredients that\ncan be placed on a plate (usually set to be equal to `\u003cI\u003e`), and `\u003cshuffle/iter\u003e` is whether to shuffle the list of \nall possible tasks under the current task specification. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanfeix%2Frpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanfeix%2Frpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanfeix%2Frpn/lists"}