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
Parallel t-SNE implementation with Python and Torch wrappers.

Multicore t-SNE This is a multicore modification of Barnes-Hut t-SNE by L. Van der Maaten with python and Torch CFFI-based wrappers. This code also wo

Dmitry Ulyanov 1.7k Jan 09, 2023
A Scheil-Gulliver simulation tool using pycalphad.

scheil A Scheil-Gulliver simulation tool using pycalphad. import matplotlib.pyplot as plt from pycalphad import Database, variables as v from scheil i

pycalphad 6 Dec 10, 2021
Gesture controlled media player

Media Player Gesture Control Gesture controller for media player with MediaPipe, VLC and OpenCV. Contents About Setup About A tool for using gestures

Atharva Joshi 2 Dec 22, 2021
A program that analyzes data from inertia measurement units installed in aircraft and generates g-exceedance curves.

A program that analyzes data from inertia measurement units installed in aircraft and generates g-exceedance curves.

Pooya 1 Dec 02, 2021
Because trello only have payed options to generate a RunUp chart, this solves that!

Trello Runup Chart Generator The basic concept of the project is that Corello is pay-to-use and want to use Trello To-Do/Doing/Done automation with gi

Rômulo Schiavon 1 Dec 21, 2021
Library for exploring and validating machine learning data

TensorFlow Data Validation TensorFlow Data Validation (TFDV) is a library for exploring and validating machine learning data. It is designed to be hig

688 Jan 03, 2023
Simple python implementation with matplotlib to manually fit MIST isochrones to Gaia DR2 color-magnitude diagrams

Simple python implementation with matplotlib to manually fit MIST isochrones to Gaia DR2 color-magnitude diagrams

Karl Jaehnig 7 Oct 22, 2022
Flow-based visual scripting for Python

A simple visual node editor for Python Ryven combines flow-based visual scripting with Python. It gives you absolute freedom for your nodes and a simp

Leon Thomm 3.1k Jan 06, 2023
Draw tree diagrams from indented text input

Draw tree diagrams This repository contains two very different scripts to produce hierarchical tree diagrams like this one: $ ./classtree.py collectio

Luciano Ramalho 8 Dec 14, 2022
Create a visualization for Trump's Tweeted Words Using Python

Data Trump's Tweeted Words This plot illustrates twitter word occurences. We already did the coding I needed for this plot, so I was very inspired to

7 Mar 27, 2022
A dashboard built using Plotly-Dash for interactive visualization of Dex-connected individuals across the country.

Dashboard For The DexConnect Platform of Dexterity Global Working prototype submission for internship at Dexterity Global Group. Dashboard for real ti

Yashasvi Misra 2 Jun 15, 2021
Param: Make your Python code clearer and more reliable by declaring Parameters

Param Param is a library providing Parameters: Python attributes extended to have features such as type and range checking, dynamically generated valu

HoloViz 304 Jan 07, 2023
Automatically Visualize any dataset, any size with a single line of code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.

AutoViz Automatically Visualize any dataset, any size with a single line of code. AutoViz performs automatic visualization of any dataset with one lin

AutoViz and Auto_ViML 1k Jan 02, 2023
Sprint planner considering JIRA issues and google calendar meetings schedule.

Sprint planner Sprint planner is a Python script for planning your Jira tasks based on your calendar availability. Installation Use the package manage

Apptension 2 Dec 05, 2021
Simple Inkscape Scripting

Simple Inkscape Scripting Description In the Inkscape vector-drawing program, how would you go about drawing 100 diamonds, each with a random color an

Scott Pakin 140 Dec 27, 2022
Fast scatter density plots for Matplotlib

About Plotting millions of points can be slow. Real slow... 😴 So why not use density maps? ⚡ The mpl-scatter-density mini-package provides functional

Thomas Robitaille 473 Dec 12, 2022
JupyterHub extension for ContainDS Dashboards

ContainDS Dashboards for JupyterHub A Dashboard publishing solution for Data Science teams to share results with decision makers. Run a private on-pre

Ideonate 179 Nov 29, 2022
A python script and steps to display locations of peers connected to qbittorrent

A python script (along with instructions) to display the locations of all the peers your qBittorrent client is connected to in a Grafana worldmap dash

62 Dec 07, 2022
Parse Robinhood 1099 Tax Document from PDF into CSV

Robinhood 1099 Parser This project converts Robinhood Securities 1099 tax document from PDF to CSV file. This tool will be helpful for those who need

Keun Tae (Kevin) Park 52 Jun 10, 2022
Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js

pivottablejs: the Python module Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js Installation pip install pivot

Nicolas Kruchten 512 Dec 26, 2022