def pose_mse(gt, output):
    """
        The simple version of MSE between two poses, where invalid/failed pose is considered to be all (0, 0)
    """
    total_mse = 0
    cnt = 0
    for idx, joint in enumerate(gt):
        if output is not None:
            output_joint = output[idx]
        else:
            output_joint = (0, 0)

        if joint[2] > 0:
            t = ( ( (joint[0] - 127.5)/127.5  - (output_joint[0]-63.5) / 63.5)  **2 + ((joint[1] - 127.5) / 127.5 - (output_joint[1]-63.5) / 63.5) **2 ) / 2  # normalize to [-1, 1] and then compute distance
            total_mse += t
            cnt += 1

    total_mse /= cnt

    return 'succ', total_mse