una-dinosauria / human-motion-prediction

Simple baselines and RNNs for predicting human motion in tensorflow. Presented at CVPR 17.
MIT License
406 stars 140 forks source link

Visualization #4

Closed sndler closed 7 years ago

sndler commented 7 years ago

Looking forward to see the visualization. Thanks~

una-dinosauria commented 7 years ago

I'll try to get it done over the weekend.

sndler commented 7 years ago

Thank you very much . I couldn't understand the data format, so I don't know how to visualize the motion.

una-dinosauria commented 7 years ago

It's kind of complicated. The model produces a vector of joint angles in Euler format, so to get a 3d human you have to

  1. convert those angles to rotation matrices
  2. run a kinematic tree with the known bone lengths of subject 5

The Matlab code that comes with Human3.6M does this -- and this is what we used for the videos that we made for the paper. I'm dreading the port to Python but I'll eventually get around to it; otherwise the code is not very attractive by itself.

sndler commented 7 years ago

Thank you very much! However,my H3.6M account is under manually added(waiting a long time....sad). So would you mind sending me a copy of the Matlab Code, my mail address is sndlytp@sjtu.edu.cn. Thank you very much!

una-dinosauria commented 7 years ago

I'm sorry to hear you can't get access to the H3.6m code. Unfortunately, I can't send you a copy either, because I don't own the code. You might want to try emailing Catalin Ionescu: http://catalinionescu.weebly.com/contact.html, or wait a few more days for me to finish porting the visualization code to python.

sndler commented 7 years ago

Thank you very much! Looking forward to seeing your code!

sndler commented 7 years ago

Sorry to bother you again. I have already got the account to H3.6M, and run it's demo_targets.m to understand the data format. But there is too many code file, I don't know how to start . I just want to see the picture of the predict motion using your model. Could you help me? Thank you very much!

una-dinosauria commented 7 years ago

Update: I spent today trying to figure this out, and I haven't been able to reproduce the data preprocessing of Jain et al. I'll look into this tomorrow as well. ^ Sorry, I can't provide support for code that I didn't write.

sndler commented 7 years ago

Thank you very much !!!
image Using your model ,the input is the reprocessing data (the format is exponential map), and the loss is Euler loss, right? I want to using your model ,predict the motion. I want to show the motion like the picture , could you mind providing the code you draw the picture in your paper, really thanks !!!

una-dinosauria commented 7 years ago

Update: First pass of visualization code is available on the viz branch: https://github.com/una-dinosauria/human-motion-prediction/tree/viz. It makes a little animation with the ground truth followed by the prediction. The README has been updated with an example usage. You may wan t to check out that branch if you need the visualization urgently. Hope to finish refactoring and commenting tomorrow.

^ Sorry, I won't be able to reproduce that figure (I relied extensively on keynote.) You might be able to extend it from the code that I'm uploading.

sndler commented 7 years ago

Thank you very much ! but there is some little error in forward_kinematics.py.
(1)line67:offset have defined twice. (2)line 53:offset shape is (96,),so np.reshape(offset[i,:], (1,3)) will raise 'too many indices for array'. I have changed this to offset=offset.reshape(-1,3), then we can use offset[i] .

I have already got the animation,Thank you !!!