GUI for visualization and interactive editing of SMPL-family body models ie. SMPL, SMPL-X, MANO, FLAME.

Overview

Body Model Visualizer

Introduction

This is a simple Open3D-based GUI for SMPL-family body models. This GUI lets you play with the shape, expression, and pose parameters of SMPL, SMPL-X, MANO, FLAME body models. Features include:

  • Interactive editing of shape, expression, pose parameters
01_model_editing.mp4
  • Visualize body model joints and joint names
02_visualize_joints.mp4
  • Simple IK solver to match an input pose
03_simple_ik.mp4
  • Save edited model parameters
04_save_params.mp4
  • View controls
05_viewing.mp4
  • Lighting controls
06_lighting.mp4
  • Material settings
07_material.mp4

Even though there are existing Blender/Unity plugins for these models, our main audience here is researchers who would like to quickly edit/visualize body models without the need to install a graphics software.

Installation

Clone the repo and install the requirements (use python3.9).

pip install -r requirements.txt

Download the SMPL, SMPL-X, MANO, FLAME body models:

Copy downloaded files under data/body_models, this folder should look like:

data
└── body_models
    ├── flame
    │   ├── FLAME_FEMALE.pkl
    │   ├── FLAME_MALE.pkl
    │   ├── FLAME_NEUTRAL.pkl
    │   ├── flame_dynamic_embedding.npy
    │   └── flame_static_embedding.pkl
    ├── mano
    │   ├── MANO_LEFT.pkl
    │   └── MANO_RIGHT.pkl
    ├── smpl
    │   ├── SMPL_FEMALE.pkl
    │   ├── SMPL_MALE.pkl
    │   └── SMPL_NEUTRAL.pkl
    └── smplx
        ├── SMPLX_FEMALE.npz
        ├── SMPLX_MALE.npz
        └── SMPLX_NEUTRAL.npz

Finally, run:

python main.py

Guidelines

Saved model parameters

File > Save Model Params lets you save the edited body model parameters. Output is a pickled python dictionary with below keys:

dict_keys(['betas', 'expression', 'gender', 'body_model', 
           'joints', 'body_pose', 'global_orient'])
Comments
  • Follow the instructions, encounter segmentation error after running

    Follow the instructions, encounter segmentation error after running "python main.py"

    Hi, thanks for the great work. I set the environment as the instructions. But when I run the main.py file, it reports "Segmentation Fault" Here is the packages I've installed as following

    addict               2.4.0
    anyio                3.4.0
    argon2-cffi          21.3.0
    argon2-cffi-bindings 21.2.0
    attrs                21.2.0
    Babel                2.9.1
    backcall             0.2.0
    bleach               4.1.0
    certifi              2021.10.8
    cffi                 1.15.0
    charset-normalizer   2.0.9
    chumpy               0.70
    cycler               0.11.0
    debugpy              1.5.1
    decorator            5.1.0
    defusedxml           0.7.1
    deprecation          2.1.0
    entrypoints          0.3
    fonttools            4.28.5
    idna                 3.3
    ipdb                 0.13.9
    ipykernel            6.6.0
    ipython              7.30.1
    ipython-genutils     0.2.0
    ipywidgets           7.6.5
    jedi                 0.18.1
    Jinja2               3.0.3
    joblib               1.1.0
    json5                0.9.6
    jsonschema           4.3.2
    jupyter-client       7.1.0
    jupyter-core         4.9.1
    jupyter-packaging    0.11.1
    jupyter-server       1.13.1
    jupyterlab           3.2.5
    jupyterlab-pygments  0.1.2
    jupyterlab-server    2.10.1
    jupyterlab-widgets   1.0.2
    kiwisolver           1.3.2
    loguru               0.5.3
    MarkupSafe           2.0.1
    matplotlib           3.5.1
    matplotlib-inline    0.1.3
    mistune              0.8.4
    nbclassic            0.3.4
    nbclient             0.5.9
    nbconvert            6.3.0
    nbformat             5.1.3
    nest-asyncio         1.5.4
    notebook             6.4.6
    numpy                1.21.5
    open3d               0.14.1
    packaging            21.3
    pandas               1.3.5
    pandocfilters        1.5.0
    parso                0.8.3
    pexpect              4.8.0
    pickleshare          0.7.5
    Pillow               8.4.0
    pip                  21.2.4
    prometheus-client    0.12.0
    prompt-toolkit       3.0.24
    ptyprocess           0.7.0
    pycparser            2.21
    Pygments             2.10.0
    pyparsing            3.0.6
    pyrsistent           0.18.0
    python-dateutil      2.8.2
    pytz                 2021.3
    PyYAML               6.0
    pyzmq                22.3.0
    requests             2.26.0
    scikit-learn         1.0.2
    scipy                1.7.3
    Send2Trash           1.8.0
    setuptools           58.0.4
    six                  1.16.0
    smplx                0.1.28
    sniffio              1.2.0
    terminado            0.12.1
    testpath             0.5.0
    threadpoolctl        3.0.0
    toml                 0.10.2
    tomlkit              0.8.0
    torch                1.10.1
    tornado              6.1
    tqdm                 4.62.3
    traitlets            5.1.1
    typing_extensions    4.0.1
    urllib3              1.26.7
    wcwidth              0.2.5
    webencodings         0.5.1
    websocket-client     1.2.3
    wheel                0.37.0
    widgetsnbextension   3.5.2
    opened by AndyVerne 2
  • Installation error -- no matching distribution found for open3d

    Installation error -- no matching distribution found for open3d

    Running through the installation instructions yields an error in my WSL env:

    (test) [email protected]:~/body-model-visualizer# pip install -r requirements.txt
    Collecting ipdb==0.13.9
      Using cached ipdb-0.13.9.tar.gz (16 kB)
    Collecting joblib==1.1.0
      Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
    Collecting loguru==0.5.3
      Using cached loguru-0.5.3-py3-none-any.whl (57 kB)
    Collecting matplotlib==3.5.1
      Using cached matplotlib-3.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.3 MB)
    Collecting numpy==1.21.5
      Using cached numpy-1.21.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
    ERROR: Could not find a version that satisfies the requirement open3d==0.14.1 (from -r requirements.txt (line 6)) (from versions: 0.10.0.0, 0.11.0, 0.11.1, 0.11.2,0.12.0, 0.13.0)
    ERROR: No matching distribution found for open3d==0.14.1 (from -r requirements.txt (line 6))
    (test) [email protected]:~/body-model-visualizer# 
    

    I can manually run pip install open3d, but that installs version 0.13.0. I assume this has something to do with my janky WSL setup, but I've been trying to debug it for a while and have not had any luck yet. I'm wondering if this is a bug in your repo's latest version?

    opened by domattioli 0
  • How to use saved .pkl parameters file?

    How to use saved .pkl parameters file?

    I have modified the smpl model and saved the pkl file,but i not load it in SMPL code. `def ready_arguments(fname_or_dict):

    if not isinstance(fname_or_dict, dict):
        #dd = pickle.load(open(fname_or_dict))
        dd = pickle.load(open(fname_or_dict,"rb"),encoding='iso-8859-1')
    else:
        dd = fname_or_dict
        
    backwards_compatibility_replacements(dd) `
    

    UnpicklingError invalid load key, '\x27'. File "/home/lrd/data/lrd/body-model-visualizer-filer/SMPL_python_v.1.1.0/smpl/smpl_webuser/serialization.py", line 81, in ready_arguments dd = pickle.load(open(fname_or_dict,"rb"),encoding='iso-8859-1') File "/home/lrd/data/lrd/body-model-visualizer-filer/SMPL_python_v.1.1.0/smpl/smpl_webuser/serialization.py", line 117, in load_model dd = ready_arguments(fname_or_dict) File "/home/lrd/data/lrd/body-model-visualizer-filer/SMPL_python_v.1.1.0/smpl/smpl_webuser/hello_world/hello_smpl.py", line 48, in <module> m = load_model( '/home/lrd/data/lrd/body-model-visualizer-filer/abc.pkl' )

    sometimes,it is other error. I don't konw how to use this saved parameters.

    opened by LRuid 0
  • Not able to load the saved parameters

    Not able to load the saved parameters

    Hi,

    I successfully run the GUI, change the joint rotation, and saved the parameters. However, I cannot load the .pkl file.

    Tried using

    import pickle
    
    file_name = '../subject2_Tpose.pkl'
    
    with open(file_name, 'rb') as f:  
        subject2_Tpose = pickle.load(f)  
        
    

    and

    import torch
    
    subject2_Tpose = torch.load(file_name)
    

    Both return the same error:

    UnpicklingError: A load persistent id instruction was encountered,
    but no persistent_load function was specified.
    

    The torch version is the same as where I ran the main.py. Any solution for this?

    opened by SizheAn 0
  • How can I visualize my own smpl model?

    How can I visualize my own smpl model?

    I already have some smpl pkl file and I want to use this application to view the model. It seems the codes can only modify based on the original smpl model. Thank you so mush if you could help with this!

    opened by kkpetra 0
Releases(v0.1)
Owner
Muhammed Kocabas
Muhammed Kocabas
A GUI for Pandas DataFrames

PandasGUI A GUI for analyzing Pandas DataFrames. Demo Installation Install latest release from PyPi: pip install pandasgui Install directly from Githu

Adam 2.8k Jan 03, 2023
Official Matplotlib cheat sheets

Official Matplotlib cheat sheets

Matplotlib Developers 6.7k Jan 09, 2023
An adaptable Snakemake workflow which uses GATKs best practice recommendations to perform germline mutation calling starting with BAM files

Germline Mutation Calling This Snakemake workflow follows the GATK best-practice recommandations to call small germline variants. The pipeline require

12 Dec 24, 2022
Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

PyDexter Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax. Setup $ pip install PyDexter

D3xter 31 Mar 06, 2021
Cartopy - a cartographic python library with matplotlib support

Cartopy is a Python package designed to make drawing maps for data analysis and visualisation easy. Table of contents Overview Get in touch License an

1.2k Jan 01, 2023
An interactive dashboard built with python that enables you to visualise how rent prices differ across Sweden.

sweden-rent-dashboard An interactive dashboard built with python that enables you to visualise how rent prices differ across Sweden. The dashboard/web

Rory Crean 5 Dec 19, 2021
3D rendered visualization of the austrian monuments registry

Visualization of the Austrian Monuments Visualization of the monument landscape of the austrian monuments registry (Bundesdenkmalamt Denkmalverzeichni

Nikolai Janakiev 3 Oct 24, 2019
Debugging, monitoring and visualization for Python Machine Learning and Data Science

Welcome to TensorWatch TensorWatch is a debugging and visualization tool designed for data science, deep learning and reinforcement learning from Micr

Microsoft 3.3k Dec 27, 2022
HW 02 for CS40 - matplotlib practice

HW 02 for CS40 - matplotlib practice project instructions https://github.com/mikeizbicki/cmc-csci040/tree/2021fall/hw_02 Drake Lyric Analysis Bar Char

13 Oct 27, 2021
matplotlib: plotting with Python

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Check out our home page for more inform

Matplotlib Developers 16.7k Jan 08, 2023
Log visualizer for whirl-framework

Lumberjack Log visualizer for whirl-framework Установка pip install -r requirements.txt Как пользоваться python3 lumberjack.py -l путь до лога -o

Vladimir Malinovskii 2 Dec 19, 2022
Ana's Portfolio

Ana's Portfolio ✌️ Welcome to my Portfolio! You will find here different Projects I have worked on (from scratch) 💪 Projects 💻 1️⃣ Hangman game (Mad

Ana Katherine Cortes Sobrino 9 Mar 15, 2022
trade bot connected to binance API/ websocket.,, include dashboard in plotly dash to visualize trades and balances

Crypto trade bot 1. What it is Trading bot connected to Binance API. This project made for fun. So ... Do not use to trade live before you have backte

G 3 Oct 07, 2022
Automatically generate GitHub activity!

Commit Bot Automatically generate GitHub activity! We've all wanted to be the developer that commits every day, but that requires a lot of work. Let's

Ricky 4 Jun 07, 2022
Data science project for exploratory analysis on the kcse grades dataset (Kamilimu Data Science Track)

Kcse-Data-Analysis Data science project for exploratory analysis on the kcse grades dataset (Kamilimu Data Science Track) Findings The performance of

MUGO BRIAN 1 Feb 23, 2022
This is simply repo for line drawing rendering using freestyle in Blender.

blender_freestyle_line_drawing This is simply repo for line drawing rendering using freestyle in Blender. how to use blender2935 --background --python

MaxLin 3 Jul 02, 2022
A package for plotting maps in R with ggplot2

Attention! Google has recently changed its API requirements, and ggmap users are now required to register with Google. From a user’s perspective, ther

David Kahle 719 Jan 04, 2023
This is a super simple visualization toolbox (script) for transformer attention visualization ✌

Trans_attention_vis This is a super simple visualization toolbox (script) for transformer attention visualization ✌ 1. How to prepare your attention m

Mingyu Wang 3 Jul 09, 2022
A Python-based non-fungible token (NFT) generator built using Samilla and Matplotlib

PyNFT A Pythonic NF (non-fungible token) generator built using Samilla and Matplotlib Use python pynft.py [amount] The intention behind this generato

Ayush Gundawar 6 Feb 07, 2022
Simple spectra visualization tool for astronomers

SpecViewer A simple visualization tool for astronomers. Dependencies Python = 3.7.4 PyQt5 = 5.15.4 pyqtgraph == 0.10.0 numpy = 1.19.4 How to use py

5 Oct 07, 2021