Giter Club home page Giter Club logo

smpl-scene-viewer's Introduction

SMPL Sequences and Scene Visualization Tool

This is a powerful open-source GUI tool designed to quickly and accurately visualize and compare SMPL sequences in large scenes in real-time. Based on Open3D, this tool can be easily run across platforms and on CPU-only computers. However, if you require more advanced rendering capabilities, we recommend using Blender, Unity, or similar software for optimal results.

Features

  • Fast and accurate visualization of SMPL sequences in real-time using only SMPL parameters
  • Comparison of SMPL results across different sequences and scenes
  • Visualizing complex scenes and large datasets
  • Open-source and customizable
  • Save/load the camera path
  • CPU-only compatible
  • Cross-platform compatible
Logo
Some examples

Requirements

  1. Open3D 15.0+
  2. Download the SMPL model basicModel_neutral_lbs_10_207_0_v1.0.0.pkl, basicModel_f_lbs_10_207_0_v1.0.0.pkl, basicModel_m_lbs_10_207_0_v1.0.0.pkl and J_regressor_extra.npy from http://smpl.is.tue.mpg.de and put them in smpl directory.
  3. (Optional) ffmpeg for video processing

Installation

  1. Clone the repository:
git clone https://github.com/climbingdaily/SMPL-Viewer.git
  1. Install the required packages:
conda create --name sviewer python==3.9 -y
conda activate sviewer
pip install numpy open3d matplotlib scipy opencv-python torch paramiko chumpy lzf 
  • If your numpy > 1.23.0, there will be a conflict with Chumpy. You can just comment out the line 11 in chumpy/__init__.py, # from numpy import bool, int, float, complex, object, unicode, str, nan, inf
  1. Run
python GUI_Tool.py

Usage

  • Launch the tool.
  • Select the SMPL sequences (Demo) you wish to visualize and compare.
  • Use the GUI controls to adjust the view, lighting, and other rendering parameters.
  • Compare the SMPL results across different sequences and scenes.
# Function Button
1 .pcd .ply .obj .xyz .xyzn visualization
2 .pcd sequence visualization
3 SMPL sequence (.pkl) visualization
The data structure is detailed at readme
4 Geometry's material editing
5 Camera load/save

Todos

  • Save the video with GUI
  • Add shade and HDR map ...
  • Load video
  • Generate/save camera trajectory
  • Save the video with headless mode

Contributing

Contributions are welcome and encouraged! If you find a bug or have an idea for a new feature, please open an issue or submit a pull request.

License

The codebase is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. You must attribute the work in the manner specified by the authors, you may not use this work for commercial purposes and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same license.

Contact

If you have any questions or comments about the project, please create an issue.

Acknowledgments

We would like to thank the following individuals for their contributions to this project:

  • Lin Xiping, Lin Yitai and Yan Ming for providing valuable feedback and suggestions during development
  • The Open3D development team for their excellent library that powers this tool.
  • ChatGPT for providing assistance with refining the project description and other suggestions, including this readme file.
  • The creators of SMPL for their groundbreaking work in creating a widely-used and versatile body model.

We are also grateful to the broader open-source community for creating and sharing tools and knowledge that make projects like this possible.

Citation

This project is driven by the need for LiDAR-based Human and scene motion capture. If you find this tool useful for your own work, please consider citing the corresponding paper that inspired this project:

@InProceedings{Dai_2022_CVPR,
    author    = {Dai, Yudi and Lin, Yitai and Wen, Chenglu and Shen, Siqi and Xu, Lan and Yu, Jingyi and Ma, Yuexin and Wang, Cheng},
    title     = {HSC4D: Human-Centered 4D Scene Capture in Large-Scale Indoor-Outdoor Space Using Wearable IMUs and LiDAR},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {6792-6802}

@inproceedings{dai2023sloper4d,
    title     = {SLOPER4D: A Scene-Aware Dataset for Global 4D Human Pose Estimation in Urban Environments},
    author    = {Dai, Yudi and Lin, YiTai and Lin, XiPing and Wen, Chenglu and Xu, Lan and Yi, Hongwei and Shen, Siqi and Ma, Yuexin and Wang, Cheng},
    booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2023}
}
}

smpl-scene-viewer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

smpl-scene-viewer's Issues

can not open PKL document.

I can not open PKL document.

I can run GUI_Tools.py directly, but can not open PKL document of AMASS dataset.
the link can open here:

https://drive.google.com/drive/folders/1pKp-C7jUtkgCG2X6dO3_6ee0poHqFPX-

The bug is here:

r/SMPL-Scene-Viewer$ python GUI_Tools.py
FEngine (64 bits) created at 0x558e3345c320 (threading is enabled)
FEngine resolved backend: OpenGL
Loading scene from /home/ubuntu/HumanoidData/SMPL-Scene-Viewer/SMPL-Scene-Viewer/smpl/sample.ply
====> Scene loading comsumed 0.0 s.
[Open3D INFO] [o3d] name: ATUSquat_sync.pkl.
Traceback (most recent call last):
File "/home/ubuntu/HumanoidData/SMPL-Scene-Viewer/SMPL-Scene-Viewer/gui_vis/human_data.py", line 189, in load
self.humans = data_loader.load_pkl(filename)
File "/home/ubuntu/HumanoidData/SMPL-Scene-Viewer/SMPL-Scene-Viewer/util/load_data.py", line 386, in load_pkl
dets = pkl.load(f)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 3: ordinal not in range(128)
Segmentation fault (core dumped)

can you help me to visualize it,thanks

Array size mismatch: SMPL-Scene-Viewer/smpl/smpl.py, line 161

Hi, I tried running your visualizer with smpl_sample.pkl, following the README. However, I encounter a runtime error when opening the file:

File "SMPL-Scene-Viewer/smpl/smpl.py", line 161, in forward
v_posed = v_shaped + torch.matmul(posedirs, lrotmin[:, :, None]).view(-1, 6890, 3)
RuntimeError: The size of tensor a (30720) must match the size of tensor b (1024) at non-singleton dimension 0

The error occurs due to the mismatch in size during addition:

  • posedirs: torch.Size([1024, 20670, 207])
  • lrotmin[:, :, None]: torch.Size([1024, 207])
  • torch.matmul(posedirs, lrotmin[:, :, None]): torch.Size([1024, 20670, 1]), cannot be reshaped in torch.Size([30720, 6890, 3])
  • v_shaped: torch.Size([30720, 6890, 3])

Can you provide me any information on how I can fix this error?
Is it possible that the error occurs due to the V1.1.0 release of the SMPL model? (I had to rename the files in order to make them compatible)

Many thanks for considering my request.

Kind regards,

Guido

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.