FLEX icon indicating copy to clipboard operation
FLEX copied to clipboard

Forward kinematics used to convert angles to joints

Open UsamaShaikh1 opened this issue 2 years ago • 1 comments

Hello, since i am using a custom dataset with different number of joints i was wondering whether i can use a different forward kinematics code to compute joints after predicting angles, of course i would first convert those quaternion angles to euler then use them but can this function of forward kinematics be replaced

fake_pose_3d = self.fk_layer.forward(self.parents, skeleton.repeat(_input.shape[2], 1, 1), fake_full_rotations_list[i].contiguous().view(-1, self.config.arch.n_joints, self.rotation_number)).view(_input.shape[0], _input.shape[2], -1) this is the method i am talking about, in model.py

@BrianG13

UsamaShaikh1 avatar May 11 '23 14:05 UsamaShaikh1

Yes, for sure you can use another FK layer, you just need to keep it diferentiable and that can work with the network outputs: bone lengths + quaternion angles.

If you are using different # of keypoints you should change the S branch as well to output the correct number of bones and change the FK layer with your body topology (As commented at: https://github.com/BrianG13/FLEX/issues/20)

BrianG13 avatar Jun 24 '23 11:06 BrianG13