whitealex95 / autorigging-bipedal

26 stars 2 forks source link

Auto-rigging 3D Bipedal Characters in Arbitrary Poses

Pytorch code for the paper Auto-rigging 3D Bipedal Characters in Arbitrary Poses

Jeonghwan Kim, Hyeontae Son, Jinseok Bae, Young Min Kim

Prerequisites

Download Mixamo Dataset

Install Dependencies

# Create conda environment
conda create -n autorigging python=3.7
conda activate autorigging

# Install torch-related
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.6.0+cu101.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.6.0+cu101.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.6.0+cu101.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.6.0+cu101.html
pip install torch-geometric

# Install other packages
pip install -r requirements.txt

Usage

Training

Testing

# Joint position prediction
python test_vox.py -c logs/vox/vox_ori_all_s4.5_HG_mean_stack2_down2_lr3e-4_b4_ce/config.yaml --model=logs/vox/vox_ori_all_s4.5_HG_mean_stack2_down2_lr3e-4_b4_ce/model_epoch_030.pth

# Joint rotation prediction
python test_bvh.py --config logs/bvh/bvh_all_lr1e-3_zeroroot_bn/config.yaml --model logs/bvh/bvh_all_lr1e-3_zeroroot_bn/model_epoch_709.pth --joint_path logs/vox/vox_ori_all_s4.5_HG_mean_stack2_down2_lr3e-4_b4_ce/test

# For calculating geodesic distance based on predicted joint position
## Note, geodesic distance for ground truth joint position is calculated in the dataset
python prepare_vol_geo.py

# Skin weight prediction
python test_skin.py --config logs/skin/b4_tpl_and_euc0.12_lr1e-4_bn/config.yaml --model=logs/skin/b4_tpl_and_euc0.12_lr1e-4_bn/model_epoch_030.pth --vol_geo_dir logs/vox/vox_ori_all_s4.5_HG_mean_stack2_down2_lr3e-4_b4_ce/volumetric_geodesic_ours_final

Evaluation