Skip to main content

SUPR Convertor

A simple tool to convert SMPL-X model parameters to SUPR model parameters.

A teaser video showing an example result of the SMPL-X to SUPR conversion

Installation

  1. Clone the repository and its submodules:

    git clone --recurse-submodules https://github.com/NeelayS/supr_convertor.git
    
  2. Install the PyTorch version of your choice, which is compatible with your GPU, from the official website.

  3. Install the dependencies for this repository:

    cd supr_convertor && python setup.py install
    cd SUPR && python setup.py install && cd ..
    

Usage

  1. Download the SUPR model(s) from the official project website.

  2. Use the generate_smplx_meshes.py to script to generate meshes from SMPL-X parameters and save them as either .ply or .obj files.

    First, install the SMPL-X package, if you don't already have it installed.

    Then, run the script as follows:

    python generate_smplx_meshes.py --params_path <path_to_smplx_params> --model_path <path_to_smplx_model> --output_dir <path_to_output_dir> --output_format <ply/obj>
    

    The smplx_params_path should be a .npz file containing the SMPL-X parameters. The .npz file should contain the different model parameters and metadata such as gender. An example file from the AMASS dataset has been provided in this repository under data/.
    The output_dir should be a directory where the generated meshes will be saved. The output_format can be either ply or obj.

    If you don't have the SMPL-X model file(s), you can download them from the official website.

    Note: You can skip this step if you already have SMPL-X meshes in .ply or .obj format.

  3. Modify the base config file configs/base_config.yaml to suit your needs. In particular, you must specify the following parameters:

    data:
        mesh_dir: <path_to_smplx_meshes>
    
    model:
        gender: <gender_of_supr_body_model>
        path: <path_to_supr_model>
    
    device: <device_to_use>
    out_dir: <path_to_output_dir>
    

    The rest of the parameters can be left as is, or modified as per your requirements.
    To convert the parameters in the least amount of time, set the batch_size to the maximum possible value, constrained by the available device memory.
    The number of iterations of the optimization process for the conversion and the stopping conditions can be modified according to the use case.

    Note: Be careful to use the same gendered SUPR model as the SMPL-X model used to generate the meshes.

  4. Run the convert.py script to convert the parameters.

    python convert.py --cfg <path_to_your_config_file>
    

    The converted SUPR parameters will be saved in the out_dir specified in the config file. Optionally, SUPR meshes obtained from the converted parameters can be saved as well.

Acknowledgment

The code in this repository takes (heavy) inspiration from the SMPL-X repository, developed by Vasileios Choutas. It also relies on the SUPR repository, developed by Ahmed Osman. The author would also like to thank team members Ahmed Osman, Anastasios Yiannakidis, Giorgio Becherini, Jinlong Yang, Peter Kulits, and Vasileios Choutas for their insights and helpful discussions. The animation in this README showing an example conversion result was created by Anastasios Yiannakidis.

Contact

The code in this repository was developed by Neelay Shah at the Max Planck Institute for Intelligent Systems.

If you have any questions about the code or its usage, please create an issue here on GitHub or contact neelay.shah@tuebingen.mpg.de.

For commercial licensing (and all related questions for business applications), please contact ps-licensing@tue.mpg.de.

Metadata

Release files for supr-convertor 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for supr-convertor 0.0.1
File Size Uploaded
supr_convertor-0.0.1.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for supr-convertor 0.0.1
File Interpreter ABI Platform
supr_convertor-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.1 kB

Release files / supr_convertor-0.0.1.tar.gz

Download URL supr_convertor-0.0.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
84612a0145b6e8fb495bb00b925695c91253cca5333ac22551a4316a257cedd6
BLAKE2b-256 checksum
How to use checksums
a28b8b5b0f5ae704fe183f08d11c879d373fd1f82a41592a527d8174783d4cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10

Release files / supr_convertor-0.0.1-py3-none-any.whl

Download URL supr_convertor-0.0.1-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cb4ad28b3ab3ebf30779ec2bf262fc303b3025a5d829edc3e6f699343cc07bc
BLAKE2b-256 checksum
How to use checksums
2a637b56b12065650ea887abf58c463fb9b8ac5d8e6f69af4683dd3cd3ac110a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.7.1 requests/2.26.0 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page