MCPcopy Create free account
hub / github.com/MotrixLab/ADHMR / get_fitting_error_3D

Function get_fitting_error_3D

HMR-Scorer/common/utils/preprocessing.py:819–827  ·  view source on GitHub ↗
(db_joint, db_joint_from_fit, joint_valid)

Source from the content-addressed store, hash-verified

817
818
819def get_fitting_error_3D(db_joint, db_joint_from_fit, joint_valid):
820 # mask coordinate
821 db_joint = db_joint[np.tile(joint_valid, (1, 3)) == 1].reshape(-1, 3)
822 db_joint_from_fit = db_joint_from_fit[np.tile(joint_valid, (1, 3)) == 1].reshape(-1, 3)
823
824 db_joint_from_fit = db_joint_from_fit - np.mean(db_joint_from_fit, 0)[None, :] + np.mean(db_joint, 0)[None,
825 :] # translation alignment
826 error = np.sqrt(np.sum((db_joint - db_joint_from_fit) ** 2, 1)).mean()
827 return error
828
829
830def load_obj(file_name):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected