(db_joint, db_joint_from_fit, joint_valid)
| 463 | |
| 464 | |
| 465 | def get_fitting_error_3D(db_joint, db_joint_from_fit, joint_valid): |
| 466 | # mask coordinate |
| 467 | db_joint = db_joint[np.tile(joint_valid, (1, 3)) == 1].reshape(-1, 3) |
| 468 | db_joint_from_fit = db_joint_from_fit[np.tile(joint_valid, (1, 3)) == 1].reshape(-1, 3) |
| 469 | |
| 470 | db_joint_from_fit = db_joint_from_fit - np.mean(db_joint_from_fit, 0)[None, :] + np.mean(db_joint, 0)[None, |
| 471 | :] # translation alignment |
| 472 | error = np.sqrt(np.sum((db_joint - db_joint_from_fit) ** 2, 1)).mean() |
| 473 | return error |
| 474 | |
| 475 | |
| 476 | def load_obj(file_name): |
nothing calls this directly
no outgoing calls
no test coverage detected