Skip to content
/ DGTR Public
forked from iSEE-Laboratory/DGTR

Official Code for Dexterous Grasp Transformer (CVPR 2024)

License

Notifications You must be signed in to change notification settings

wyl2077/DGTR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dexterous Grasp Transformer

Guo-Hao Xu*, Yi-Lin Wei*, Dian Zheng, Xiao-Ming Wu, Wei-Shi Zheng

-

(CVPR 2024) Official repository of paper "Dexterous Grasp Transformer".

Installation

  1. Create a new conda environment
conda create -n dgtr python=3.8
  1. Install pytorch
conda install pytorch==1.10.0 torchvision==0.11.0 cudatoolkit=11.3 -c pytorch -c conda-forge
  1. Install pytorch3d
  • Download source code of pytorch3d 0.7.2 from link and unzip it.
cd pytorch3d && pip install -e .
  1. Install other dependencies
conda install -c plotly 
conda install -c conda-forge trimesh pyyaml tqdm plyfile multimethod
conda install scipy
conda install -c anaconda lxml
conda install tensorboard
  1. Install pytorch_kinematics
cd thirdparty/pytorch_kinematics
pip install -e .
  1. Install CSDF
cd thirdparty/CSDF
pip install -e .
  1. Install pointnet2
cd thirdparty/pointnet2
python setup.py install
  1. Install knn
cd thirdparty/knn
python setup.py install
  1. Install rtree
pip install rtree
  1. If you have encountered setuptools-related error, this may help:
pip install setuptools==59.5.0

Usage

Train

  1. Train DGTR in Dynamic Match Training phase for 15 epochs.
CUDA_VISIBLE_DEVICES="0" python train.py --train_cfg config/dgtr.yaml
  1. Train DGTR in Static Match Warm-up Training phase for 5 epochs.
CUDA_VISIBLE_DEVICES="0" python train.py \
--train_cfg config/dgtr.yaml \
-r \
-c <checkpoint of epoch 15> \
--override assignments \"static\" data.train.assignment \"./Experiments/dgtr/assignment_epoch_15.json\"
  1. Train DGTR in Static Matching Penetration Training phase for 5 epochs.
CUDA_VISIBLE_DEVICES="0" python train.py \
--train_cfg config/dgtr.yaml \
-r \
-c <checkpoint of epoch 20> \
--override assignments \"static\" data.train.assignment \"./Experiments/dgtr/assignment_epoch_15.json\"

Inference

python ./test.py \
--train_cfg config/dgtr.yaml \
--test_cfg ./config/test_default.yaml \
--override model.checkpoint_path \"<checkpoint of epoch 25>\"

Evaluation

python ./tools/evaluate.py -r <the path of raw_results.json> --gpus <GPU_ID>

TODO

  • Release the code of AB-TTA
  • Release the training code of DGTR
  • Release the inference code of DGTR

Acknowledgements

The code of this repository is based on the following repositories. We would like to thank the authors for sharing their works.

Contact

  • Email: {xugh23, weiylin5}@mail2.sysu.edu.cn

Citation

Please cite it if you find this work useful.

@inproceedings{xu2024dexterous,
 title = {Dexterous Grasp Transformer},
 author = {Xu, Guo-Hao and Wei, Yi-Lin and Zheng, Dian and Wu, Xiao-Ming and Zheng, Wei-Shi},
 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
 year = {2024}
 }

About

Official Code for Dexterous Grasp Transformer (CVPR 2024)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%