Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use custom pose 2D key-points? #47

Open
Harsh-Vavaiya opened this issue Apr 28, 2022 · 12 comments
Open

How to use custom pose 2D key-points? #47

Harsh-Vavaiya opened this issue Apr 28, 2022 · 12 comments

Comments

@Harsh-Vavaiya
Copy link

@Shimingyi @kfiraberman I need "proper" guidance on, how can I use 2d points? because I have tried inserting it but the BVH file generated is not showing any movement while on your examples it's a working fine.

Note: "I've converted points into h36m format than given to the model."

Screenshot (37)

@Shimingyi
Copy link
Owner

@Harsh-Vavaiya
You can use the following code because your input is not a square. And also, refer to #43, the current output is in camera space so you should rotate it by yourself, I am going to fix it with tricks in next commit (around 1st, May).

IMAGE_WIDTH = 480
IMAGE_HEIGHT = 270
...
    poses_2d = np.concatenate(pose_batch, axis=0)
    poses_2d[:, np.arange(0, poses_2d.shape[-1], 2)] /= (IMAGE_WIDTH*1)    
    poses_2d[:, np.arange(1, poses_2d.shape[-1], 2)] /= (IMAGE_HEIGHT*1)   

@Harsh-Vavaiya
Copy link
Author

Harsh-Vavaiya commented Apr 28, 2022

Ok, It didn't work.

I didn't mean the rotations in 3D, I've dealt with it. I meant pose of 3D structure. It should be 3D T-pose but it has lots of deformities.

Screenshot (38)

@Shimingyi
Copy link
Owner

@Harsh-Vavaiya
You mentioned you have converted points into h36m format, so have you compared your format with ours? There are 17 joints and ordered with following:

H36M_NAMES = [''] * 32
H36M_NAMES[0] = 'Hip'
H36M_NAMES[1] = 'RHip'
H36M_NAMES[2] = 'RKnee'
H36M_NAMES[3] = 'RFoot'
H36M_NAMES[6] = 'LHip'
H36M_NAMES[7] = 'LKnee'
H36M_NAMES[8] = 'LFoot'
H36M_NAMES[12] = 'Spine' 
H36M_NAMES[13] = 'Thorax'
H36M_NAMES[14] = 'Neck/Nose' 
H36M_NAMES[15] = 'Head'
H36M_NAMES[17] = 'LShoulder'
H36M_NAMES[18] = 'LElbow'
H36M_NAMES[19] = 'LWrist'
H36M_NAMES[25] = 'RShoulder'
H36M_NAMES[26] = 'RElbow'
H36M_NAMES[27] = 'RWrist'

@Harsh-Vavaiya
Copy link
Author

Yes it is same

@Shimingyi
Copy link
Owner

I have no idea. Maybe you can just post the video here so I can share me processing steps.

@Harsh-Vavaiya
Copy link
Author

@Harsh-Vavaiya
Copy link
Author

@Shimingyi Any update?

@Shimingyi
Copy link
Owner

@Harsh-Vavaiya No I am busy in few ddls, so pls wait me for a while. (1-2 days)

@Harsh-Vavaiya
Copy link
Author

@Shimingyi are you available?

@Shimingyi
Copy link
Owner

@Harsh-Vavaiya I ran the code but got a bad result on your video:
First frame looks like:
image

Wrong rotation problem: it should be clockwise but counterclockwise in our outputs.
GIF 2022-5-5 20-27-03

We must recognize the limitation of the current method and training data. And until now, there is no planning to improve it in this version, and we need to wait for a new version that includes more features and robustness on camera view and input data format. But I hope the neural FK module can bring some inspiration to you.

@Harsh-Vavaiya
Copy link
Author

@Shimingyi sure and thank you. also, can you tell me the procedure to train with a custom dataset? and have you updated the code on 1st May?

@anas-zafar
Copy link

@Harsh-Vavaiya were you able to train the model on your custom dataset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants