A toolkit for fitting body models to meshes and converting between body models
-
Clone the repository and its submodules:
git clone --recurse-submodules https://github.com/PerceivingSystems/bomoto
-
Install the PyTorch version of your choice, which is compatible with your GPU, from the official website.
-
Install the dependencies for this repository:
cd bomoto && pip install -e .
Run these commands to install the SUPR and SKEL body models
cd submodules/SUPR && pip install . && cd ../.. cd submodules/SKEL && pip install . && cd ../..
-
Depending on whether you input data is meshes or model parameter files, choose the appropriate config file from
configs/
. -
Edit it to suit your needs.
-
Run the script:
python run.py --cfg configs/<config_file>.yaml
Convert parameters from one body model to another.
- Modify
examples/smpl2smplx/cfg.yaml
. In particular:- replace
input.body_model.path
with the path to your SMPL neutral model - replace
output.body_model.path
with the path to your SMPL-X neutral model
- replace
- Run the following commands
python examples/smpl2smplx/generate_sample_data.py python run.py --cfg examples/smpl2smplx/cfg.yaml
- Check the results (SMPL-X parameters and meshes in obj format) in
examples/smpl2smplx/results
Given a set of meshes, fit body model parameters to them.
- Modify
examples/smpl2smplx/cfg.yaml
. In particular:- replace
output.body_model.path
with the path to your SMPL-X neutral model
- replace
- Run the following commands
python examples/parms_for_smplx/generate_sample_data.py --model_path <path to your SMPL-X neutral model npz file> python run.py --cfg examples/parms_for_smplx/cfg.yaml
- Check the results (SMPL-X parameters and meshes in obj format) in
examples/parms_for_smplx/results