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
ipyvizzu - Jupyter notebook integration of Vizzu

ipyvizzu - Jupyter notebook integration of Vizzu. Tutorial · Examples · Repository About The Project ipyvizzu is the Jupyter Notebook integration of V

Vizzu 729 Jan 08, 2023
BGraph is a tool designed to generate dependencies graphs from Android.bp soong files.

BGraph BGraph is a tool designed to generate dependencies graphs from Android.bp soong files. Overview BGraph (for Build-Graphs) is a project aimed at

Quarkslab 10 Dec 19, 2022
Graphical visualizer for spectralyze by Lauchmelder23

spectralyze visualizer Graphical visualizer for spectralyze by Lauchmelder23 Install Install matplotlib and ffmpeg. Put ffmpeg.exe in same folder as v

Matthew 1 Dec 21, 2021
Rubrix is a free and open-source tool for exploring and iterating on data for artificial intelligence projects.

Open-source tool for exploring, labeling, and monitoring data for AI projects

Recognai 1.5k Jan 07, 2023
A toolkit to generate MR sequence diagrams

mrsd: a toolkit to generate MR sequence diagrams mrsd is a Python toolkit to generate MR sequence diagrams, as shown below for the basic FLASH sequenc

Julien Lamy 3 Dec 25, 2021
CPG represent!

CoolPandasGroup CPG represent! Arianna Brandon Enne Luan Tracie Project requirements: use Pandas to clean and format datasets use Jupyter Notebook to

Enne 3 Feb 07, 2022
Keir&'s Visualizing Data on Life Expectancy

Keir's Visualizing Data on Life Expectancy Below is information on life expectancy in the United States from 1900-2017. You will also find information

9 Jun 06, 2022
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
:bowtie: Create a dashboard with python!

Installation | Documentation | Gitter Chat | Google Group Bowtie Introduction Bowtie is a library for writing dashboards in Python. No need to know we

Jacques Kvam 753 Dec 22, 2022
Pglive - Pglive package adds support for thread-safe live plotting to pyqtgraph

Live pyqtgraph plot Pglive package adds support for thread-safe live plotting to

Martin Domaracký 15 Dec 10, 2022
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
Open-questions - Open questions for Bellingcat technical contributors

Open questions for Bellingcat technical contributors These are difficult, long-term projects that would contribute to open source investigations at Be

Bellingcat 234 Dec 31, 2022
a robust room presence solution for home automation with nearly no false negatives

Argos Room Presence This project builds a room presence solution on top of Argos. Using just a cheap raspberry pi zero w (plus an attached pi camera,

Angad Singh 46 Sep 18, 2022
Streamlit-template - A streamlit app template based on streamlit-option-menu

streamlit-template A streamlit app template for geospatial applications based on

Qiusheng Wu 41 Dec 10, 2022
Python implementation of the Density Line Chart by Moritz & Fisher.

PyDLC - Density Line Charts with Python Python implementation of the Density Line Chart (Moritz & Fisher, 2018) to visualize large collections of time

Charles L. Bérubé 10 Jan 06, 2023
Color scales in Python for humans

colorlover Color scales for humans IPython notebook: https://plot.ly/ipython-notebooks/color-scales/ import colorlover as cl from IPython.display impo

Plotly 146 Sep 25, 2022
coordinate to draw the nimbus logo on the graffitiwall

This is a community effort to draw the nimbus logo on beaconcha.in's graffitiwall. get started clone repo with git clone https://github.com/tennisbowl

4 Apr 04, 2022
Bar Chart of the number of Senators from each party who are up for election in the next three General Elections

Congress-Analysis Bar Chart of the number of Senators from each party who are up for election in the next three General Elections This bar chart shows

11 Oct 26, 2021
A Bokeh project developed for learning and teaching Bokeh interactive plotting!

Bokeh-Python-Visualization A Bokeh project developed for learning and teaching Bokeh interactive plotting! See my medium blog posts about making bokeh

Will Koehrsen 350 Dec 05, 2022
Visualize tensors in a plain Python REPL using Sparklines

Visualize tensors in a plain Python REPL using Sparklines

Shawn Presser 43 Sep 03, 2022