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
Make scripted visualizations in blender

Scripted visualizations in blender The goal of this project is to script 3D scientific visualizations using blender. To achieve this, we aim to bring

Praneeth Namburi 10 Jun 01, 2022
JSNAPY example: Validate NAT policies

JSNAPY example: Validate NAT policies Overview This example will show how to use JSNAPy to make sure the expected NAT policy matches are taking place.

Calvin Remsburg 1 Jan 07, 2022
A streamlit component for bi-directional communication with bokeh plots.

Streamlit Bokeh Events A streamlit component for bi-directional communication with bokeh plots. Its just a workaround till streamlit team releases sup

Ashish Shukla 123 Dec 25, 2022
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
Define fortify and autoplot functions to allow ggplot2 to handle some popular R packages.

ggfortify This package offers fortify and autoplot functions to allow automatic ggplot2 to visualize statistical result of popular R packages. Check o

Sinhrks 504 Dec 23, 2022
eoplatform is a Python package that aims to simplify Remote Sensing Earth Observation by providing actionable information on a wide swath of RS platforms and provide a simple API for downloading and visualizing RS imagery

An Earth Observation Platform Earth Observation made easy. Report Bug | Request Feature About eoplatform is a Python package that aims to simplify Rem

Matthew Tralka 4 Aug 11, 2022
Extensible, parallel implementations of t-SNE

openTSNE openTSNE is a modular Python implementation of t-Distributed Stochasitc Neighbor Embedding (t-SNE) [1], a popular dimensionality-reduction al

Pavlin Poličar 1.1k Jan 03, 2023
This is my favourite function - the Rastrigin function.

This is my favourite function - the Rastrigin function. What sparked my curiosity and interest in the function was its complexity in terms of many local optimum points, which makes it particularly in

1 Dec 27, 2021
Matplotlib tutorial for beginner

matplotlib is probably the single most used Python package for 2D-graphics. It provides both a very quick way to visualize data from Python and publication-quality figures in many formats. We are goi

Nicolas P. Rougier 2.6k Dec 28, 2022
2D maze path solver visualizer implemented with python

2D maze path solver visualizer implemented with python

SS 14 Dec 21, 2022
Boltzmann visualization - Visualize the Boltzmann distribution for simple quantum models of molecular motion

Boltzmann visualization - Visualize the Boltzmann distribution for simple quantum models of molecular motion

1 Jan 22, 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
Design your own matplotlib stylefile interactively

Tired of playing with font sizes and other matplotlib parameters every time you start a new project or write a new plotting function? Want all you plots have the same style? Use matplotlib configurat

yobi byte 207 Dec 08, 2022
paintable GitHub contribute table

githeart paintable github contribute table how to use: Functions key color select 1,2,3,4,5 clear c drawing mode mode on turn off e print paint matrix

Bahadır Araz 27 Nov 24, 2022
A programming language built on top of Python to easily allow Swahili speakers to get started with programming without ever knowing English

pyswahili A programming language built over Python to easily allow swahili speakers to get started with programming without ever knowing english pyswa

Jordan Kalebu 72 Dec 15, 2022
基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。

COVID-19-Epidemic-Map 基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。 觉得项目还不错的话欢迎给一个star! 项目的源码可以正常运行,各个库的版本、数据库的建表语句、运行过程中遇到的坑以及解决方式在笔记.md中都

31 Dec 15, 2022
A GUI for Pandas DataFrames

About Demo Installation Usage Features More Info About PandasGUI is a GUI for viewing, plotting and analyzing Pandas DataFrames. Demo Installation Ins

Adam Rose 2.8k Dec 24, 2022
It's an application to calculate I from v and r. It can also plot a graph between V vs I.

Ohm-s-Law-Visualizer It's an application to calculate I from v and r using Ohm's Law. It can also plot a graph between V vs I. Story I'm doing my Unde

Sihab Sahariar 1 Nov 20, 2021
flask extension for integration with the awesome pydantic package

Flask-Pydantic Flask extension for integration of the awesome pydantic package with Flask. Installation python3 -m pip install Flask-Pydantic Basics v

249 Jan 06, 2023
An open-source tool for visual and modular block programing in python

PyFlow PyFlow is an open-source tool for modular visual programing in python ! Although for now the tool is in Beta and features are coming in bit by

1.1k Jan 06, 2023