Skip to content

xupei0610/basketball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning to Ball: Composing Policies for Long-Horizon Basketball Moves

This is the official implementation for Learning to Ball: Composing Policies for Long-Horizon Basketball Moves. [Webpage] [arXiv] [Youtube] [Bilibili] [SIGGRAPH Asia'25] [TOG]

This implementation is based on

  • Composite Motion Learning with Task Control [arXiv] [Youtube] [webpage]

  • A GAN-Like Approach for Physics-Based Imitation Learning and Interactive Character Control [arXiv] [Youtube] [webpage]

Citation

If you use the code or provided motions for your work, please consider citing our papers:

@article{basketball,
    author = {Xu, Pei and Wu, Zhen and Wang, Ruocheng and Sarukkai, Vishnu and Fatahalian, Kayvon and Karamouzas, Ioannis and Zordan, Victor and Liu, C. Karen},
    title = {Learning to Ball: Composing Policies for Long-Horizon Basketball Moves},
    journal = {ACM Transactions on Graphics},
    publisher = {ACM New York, NY, USA},
    year = {2024},
    volume = {44},
    number = {6},
    doi = {10.1145/3763367}
}

Code Usage

Dependencies

  • Pytorch 2.1.2
  • IsaacGym Pr4

We recommend to install all the requirements through Conda by

$ conda create --name <env> --file requirements.txt -c pytorch -c conda-forge -c nvidia

IsaacGym Pr4 is available from the official site and can be installed through pip.

Policy Training

$ python main.py <configure_file> --ckpt <checkpoint_dir>

We provide our configure files in cfg folder for reference. To reproduce the examples shown in the paper, e.g. shoot, please run the training by

$ python main.py cfg/shoot.py --ckpt ckpt_shoot

The training results (model and log) will be generated in the ckpt_shoot folder.

The training can be done on a single GPU. Use --device option to specify the device used for training (default: 0).

Evaluation

$ python main.py <configure_file> --ckpt <checkpoint_dir> --test

We provide pretrained policy models in pretrained folder. To evaluate a pretrained policy, e.g. shoot, please run

$ python main.py cfg/shoot.py --ckpt pretrained/shoot --test

Please visit our webpage for animated results.

About

[SIGGRAPH Asia 2025] Learning to Ball: Composing Policies for Long-Horizon Basketball Moves

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages