PhysCap: Physically Plausible Monocular 3D Motion Capture in Real Time

Overview

PhysCap: Physically Plausible Monocular 3D Motion Capture in Real Time

The implementation is based on SIGGRAPH Aisa'20.

Dependencies

  • Python 3.7
  • Ubuntu 18.04 (The system should run on other Ubuntu versions and Windows, however not tested.)
  • RBDL: Rigid Body Dynamics Library (https://rbdl.github.io/)
  • PyTorch 1.8.1 with GPU support (cuda 10.2 is tested to work)
  • For other python packages, please check requirements.txt

Installation

  • Download and install Python binded RBDL from https://github.com/rbdl/rbdl

  • Install Pytorch 1.8.1 with GPU support (https://pytorch.org/) (other versions should also work but not tested)

  • Install python packages by:

      pip install -r requirements.txt
    

How to Run on the Sample Data

We provide a sample data taken from DeepCap dataset CVPR'20. To run the code on the sample data, first go to physcap_release directory and run:

python pipeline.py --contact_estimation 0 --floor_known 1 --floor_frame  data/floor_frame.npy  --humanoid_path asset/physcap.urdf --skeleton_filename asset/physcap.skeleton --motion_filename data/sample.motion --contact_path data/sample_contacts.npy --stationary_path data/sample_stationary.npy --save_path './results/'

To visualize the prediction, run:

python visualizer.py --q_path ./results/PhyCap_q.npy

To run PhysCap with its full functionality, the floor position should be given as 4x4 matrix (rotation and translation). In case you don't know the floor position, you can still run PhysCap with "--floor_known 0" option:

python pipeline.py --contact_estimation 0 --floor_known 0  --humanoid_path asset/physcap.urdf --skeleton_filename asset/physcap.skeleton --motion_filename data/sample.motion --save_path './results/'

How to Run on Your Data

  1. Run Stage I:

    we employ VNect for the stage I of PhysCap pipeline. Please install the VNect C++ library and use its prediction to run PhysCap. When running VNect, please replace "default.skeleton" with "physcap.skeleton" in asset folder that is compatible with PhysCap skeletion definition (physcap.urdf). After running VNect on your sequence, the predictions (motion.motion and ddd.mdd) will be saved under the specified folder. For this example, we assuem the predictions are saved under "data/VNect_data" folder.

  2. Run Stage II and III:

    First, run the following command to apply preprocessing on the 2D keypoints:

     python process_2Ds.py --input ./data/VNect_data/ddd.mdd --output ./data/VNect_data/ --smoothing 0
    

    The processed keypoints will be stored as "vnect_2ds.npy". Then run the following command to run Stage II and III:

     python pipeline.py --contact_estimation 1 --vnect_2d_path ./data/VNect_data/vnect_2ds.npy --save_path './results/' --floor_known 0 --humanoid_path asset/physcap.urdf --skeleton_filename asset/physcap.skeleton --motion_filename ./data/VNect_data/motion.motion --contact_path results/contacts.npy --stationary_path results/stationary.npy  
    

    In case you know the exact floor position, you can use the options --floor_known 1 --floor_frame /Path/To/FloorFrameFile

    To visualize the results, run:

     python visualizer.py --q_path ./results/PhyCap_q.npy
    

License Terms

Permission is hereby granted, free of charge, to any person or company obtaining a copy of this software and associated documentation files (the "Software") from the copyright holders to use the Software for any non-commercial purpose. Publication, redistribution and (re)selling of the software, of modifications, extensions, and derivates of it, and of other software containing portions of the licensed Software, are not permitted. The Copyright holder is permitted to publically disclose and advertise the use of the software by any licensee.

Packaging or distributing parts or whole of the provided software (including code, models and data) as is or as part of other software is prohibited. Commercial use of parts or whole of the provided software (including code, models and data) is strictly prohibited. Using the provided software for promotion of a commercial entity or product, or in any other manner which directly or indirectly results in commercial gains is strictly prohibited.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Citation

If the code is used, the licesnee is required to cite the use of VNect and the following publication in any documentation or publication that results from the work:

@article{
	PhysCapTOG2020,
	author = {Shimada, Soshi and Golyanik, Vladislav and Xu, Weipeng and Theobalt, Christian},
	title = {PhysCap: Physically Plausible Monocular 3D Motion Capture in Real Time},
	journal = {ACM Transactions on Graphics}, 
	month = {dec},
	volume = {39},
	number = {6}, 
	articleno = {235},
	year = {2020}, 
	publisher = {ACM}, 
	keywords = {physics-based, 3D, motion capture, real time}
} 
Comments
  • How to obtain the floor position?

    How to obtain the floor position?

    Thank you for your perfect work.

    I use the openpose to obtain the 2D keypoints. I have a question about how to obtain the floor position? Do I need to use VNect to obtain the floor position?

    Thank you very much.

    opened by Xianjin111 2
  • AttributeError: module 'rbdl' has no attribute 'loadModel'

    AttributeError: module 'rbdl' has no attribute 'loadModel'

    Thank you for sharing this great project. I have been trying to replicate it but keep getting this error when running the demo:

    Stage III running ... Traceback (most recent call last): File "pipeline.py", line 49, in sim_loop(path_dict,floor_known=args.floor_known) File "/home/yang/Yifan/PhysCap_demo_release/stage3.py", line 26, in sim_loop model = rbdl.loadModel(path_dict["humanoid_path"].encode()) AttributeError: module 'rbdl' has no attribute 'loadModel'

    I installed rbdl package according to the official website with no error but it still doesn't work. Hopefully you can give me some suggestion on that.

    opened by artiuntelligence 2
  • Some problems about pd control and tau

    Some problems about pd control and tau

    I have read your paper recently, it's really a nice work. But I have some problem about this code.

    1. The formulation of pd in this code is totally different from your paper, and the parameter of pd is much larger than parameter in paper, which result in unusual accleration(very large) and velocity(always zero), is it reasonable in the pipeline?
    2. I notice the weight of tau in qp_control_hc is 0.00001. When I set the weight to zero, it makes no difference in results. When I increase the weight, the result becomes bad. Does it mean that tau contributes nothing benifits to the results? hope for your reply, thanks!
    opened by AnanasJin 1
  • The joint velocity (qdot) in stage 3 is always zero

    The joint velocity (qdot) in stage 3 is always zero

    Hi @soshishimada,

    Thank you for sharing such an interesting piece of code with the research community. The captured motion looks amazing.

    However, there is something that I do not understand in the implementation.

    It is about the body joint velocity values computed in stage 3. In the code, the velocity for all the joints is always zero. However, the velocity looks like a key value to calculate the estimated pose in eq.(1) and the desired acceleration in eq.(4). It is also part of c matrix computation. Is this a negligible value?

    Moreover, in the same function, the estimated body pose is computed with:

    ...
                """  Pose update """ 
                q =  pre_q + delta_t * qdot + acc*delta_t * delta_t/2
    ...
    
    

    I assume that this is a combination of both functions included in eq. (1). However, the acceleration is divided by 2, but I do not where does it come from.

    Kind regards.

    opened by jgoenetxea 1
  • No floor when running the demo

    No floor when running the demo

    Hi @soshishimada, Thanks for sharing code of the paper. When running the demo of the part Run on the Sample Data, I only get a humanoid jumping up and down, no floor or ground existing in the scene. Is this normal? Hope to hear from you, Thanks

    opened by vra 0
  • A problem of the joint id of RBDL, is it a bug?

    A problem of the joint id of RBDL, is it a bug?

    Many thanks for your great work!!!

    image

    I think these joint id should belong to pybullet, not RBDL. Is it a bug? And if I want to transfer this model to fit SMPL, how can I do that? Would you mind give me some advices?

    opened by hungsing92 0
  • How to get the contact and stationary data?

    How to get the contact and stationary data?

    Hi, thanks for sharing the code, really nice work! In the past few days, I was trying to run the program on my data and was confused by several parameters.

    1. What are the 'contact' and 'stationary' data in the command " python pipeline.py --contact_estimation 1 --vnect_2d_path ./data/VNect_data/vnect_2ds.npy --save_path './results/' --floor_known 0 --humanoid_path asset/physcap.urdf --skeleton_filename asset/physcap.skeleton --motion_filename ./data/VNect_data/motion.motion --contact_path results/contacts.npy --stationary_path results/stationary.npy " and how to get them?
    2. What are the 'motion.motion' and 'ddd.mdd'? Since the VNect is not available to me (I applied for the access but was not approved yet), is it possible to generate these files using other methods?

    Any answers will be highly appreciated.

    opened by catherineytw 0
  •   how to get the predictions (motion.motion and ddd.mdd) if i can not get the vnect lib?

    how to get the predictions (motion.motion and ddd.mdd) if i can not get the vnect lib?

    Hi, thanks for your share! i followed the steps in README, but I could not have access to the VNect C++ library. can you tell me the meaning of the predictions (motion.motion and ddd.mdd) ? if I can get the 2ds.npy(formats like your example but the points position different from your dataset ) by other method, how to get the correspond physcap.skeleton?

    opened by chunniunai220ml 2
Owner
soratobtai
soratobtai
This Artificial Intelligence program can take a black and white/grayscale image and generate a realistic or plausible colorized version of the same picture.

Colorizer The point of this project is to write a program capable of taking a black and white / grayscale image, and generating a realistic or plausib

Maitri Shah 1 Jan 6, 2022
EasyMocap is an open-source toolbox for markerless human motion capture from RGB videos.

EasyMocap is an open-source toolbox for markerless human motion capture from RGB videos. In this project, we provide the basic code for fitt

ZJU3DV 2.2k Jan 5, 2023
dataset for ECCV 2020 "Motion Capture from Internet Videos"

Motion Capture from Internet Videos Motion Capture from Internet Videos Junting Dong*, Qing Shuai*, Yuanqing Zhang, Xian Liu, Xiaowei Zhou, Hujun Bao

ZJU3DV 98 Dec 7, 2022
Motion and Shape Capture from Sparse Markers

MoSh++ This repository contains the official chumpy implementation of mocap body solver used for AMASS: AMASS: Archive of Motion Capture as Surface Sh

Nima Ghorbani 135 Dec 23, 2022
A minimal solution to hand motion capture from a single color camera at over 100fps. Easy to use, plug to run.

Minimal Hand A minimal solution to hand motion capture from a single color camera at over 100fps. Easy to use, plug to run. This project provides the

Yuxiao Zhou 824 Jan 7, 2023
Differential rendering based motion capture blender project.

TraceArmature Summary TraceArmature is currently a set of python scripts that allow for high fidelity motion capture through the use of AI pose estima

William Rodriguez 4 May 27, 2022
Code for "NeuralRecon: Real-Time Coherent 3D Reconstruction from Monocular Video", CVPR 2021 oral

NeuralRecon: Real-Time Coherent 3D Reconstruction from Monocular Video Project Page | Paper NeuralRecon: Real-Time Coherent 3D Reconstruction from Mon

ZJU3DV 1.4k Dec 30, 2022
ICCV2021 Paper: AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection

ICCV2021 Paper: AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection

Zongdai 107 Dec 20, 2022
Unofficial PyTorch implementation of "RTM3D: Real-time Monocular 3D Detection from Object Keypoints for Autonomous Driving" (ECCV 2020)

RTM3D-PyTorch The PyTorch Implementation of the paper: RTM3D: Real-time Monocular 3D Detection from Object Keypoints for Autonomous Driving (ECCV 2020

Nguyen Mau Dzung 271 Nov 29, 2022
Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities

ORB-SLAM2 Authors: Raul Mur-Artal, Juan D. Tardos, J. M. M. Montiel and Dorian Galvez-Lopez (DBoW2) 13 Jan 2017: OpenCV 3 and Eigen 3.3 are now suppor

Raul Mur-Artal 7.8k Dec 30, 2022
Real-Time-Student-Attendence-System - Real Time Student Attendence System

Real-Time-Student-Attendence-System The Student Attendance Management System Pro

Rounak Das 1 Feb 15, 2022
Official implementation of the network presented in the paper "M4Depth: A motion-based approach for monocular depth estimation on video sequences"

M4Depth This is the reference TensorFlow implementation for training and testing depth estimation models using the method described in M4Depth: A moti

Michaël Fonder 76 Jan 3, 2023
This repository contains the code for the paper "Hierarchical Motion Understanding via Motion Programs"

Hierarchical Motion Understanding via Motion Programs (CVPR 2021) This repository contains the official implementation of: Hierarchical Motion Underst

Sumith Kulal 40 Dec 5, 2022
Exploring Versatile Prior for Human Motion via Motion Frequency Guidance (3DV2021)

Exploring Versatile Prior for Human Motion via Motion Frequency Guidance This is the codebase for video-based human motion reconstruction in human-mot

Jiachen Xu 5 Jul 14, 2022
Official repository for "Restormer: Efficient Transformer for High-Resolution Image Restoration". SOTA for motion deblurring, image deraining, denoising (Gaussian/real data), and defocus deblurring.

Restormer: Efficient Transformer for High-Resolution Image Restoration Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan,

Syed Waqas Zamir 906 Dec 30, 2022
TCNN Temporal convolutional neural network for real-time speech enhancement in the time domain

TCNN Pandey A, Wang D L. TCNN: Temporal convolutional neural network for real-time speech enhancement in the time domain[C]//ICASSP 2019-2019 IEEE Int

凌逆战 16 Dec 30, 2022
Capture all information throughout your model's development in a reproducible way and tie results directly to the model code!

Rubicon Purpose Rubicon is a data science tool that captures and stores model training and execution information, like parameters and outcomes, in a r

Capital One 97 Jan 3, 2023
This is the official code release for the paper Shape and Material Capture at Home

This is the official code release for the paper Shape and Material Capture at Home. The code enables you to reconstruct a 3D mesh and Cook-Torrance BRDF from one or more images captured with a flashlight or camera with flash.

null 89 Dec 10, 2022
Code for Deterministic Neural Networks with Appropriate Inductive Biases Capture Epistemic and Aleatoric Uncertainty

Deep Deterministic Uncertainty This repository contains the code for Deterministic Neural Networks with Appropriate Inductive Biases Capture Epistemic

Jishnu Mukhoti 69 Nov 28, 2022