una-dinosauria/3d-pose-baseline

Data prerocessing - zero-centering data around hip joint

Closed this issue · 3 comments

It is mentioned in the paper in the data preprocessing section that "since we do not predict the global position of the 3d prediction, we zero-center the 3d pose around the hip joint"

I don't understand how and where is that done in the code? Does this also need to be done for the 2d predictions?

Thank you!

I don't understand how and where is that done in the code?

def postprocess_3d( poses_set ):
"""
Center 3d points around root
Args
poses_set: dictionary with 3d data
Returns
poses_set: dictionary with 3d data centred around root (center hip) joint
root_positions: dictionary with the original 3d position of each pose
"""
root_positions = {}
for k in poses_set.keys():
# Keep track of the global position
root_positions[k] = copy.deepcopy(poses_set[k][:,:3])
# Remove the root from the 3d position
poses = poses_set[k]
poses = poses - np.tile( poses[:,:3], [1, len(H36M_NAMES)] )
poses_set[k] = poses
return poses_set, root_positions

Does this also need to be done for the 2d predictions?

You could, but we do not do that

Thank you for your response.

I got the 3d coordinates.. However I was expecting to get the Hip coordinates to be (0,0,0) since it is supposed to be centered around the hip, yet it isn't. Still a little lost as to what reference system is used to calculate the 3d coordinates? I probably need to manually call this function to obtain coordinates that are centered around the hip, but if I don't. what is the (0,0,0) point in this case.

Closing for lack of activity. Please reopen if the issue is still ongoing.