(vec)
return transform_mat
Converts 6DoF parameters to transformation matrix
    Args:
        vec: 6DoF parameters in the order of [rz, ry, rx, tx, ty, tz] -- [B, 6]
        (NOT the original SfMLearner: tx, ty, tz, rx, ry, rz -- [B, 6])
    Returns:
        A transformation matrix -- [B, 4, 4]
Converts 6DoF parameters to transformation matrix
    Args:
        vec: 6DoF parameters in the order of [rz, ry, rx, tx, ty, tz] -- [B, 6]
        (NOT the original SfMLearner: tx, ty, tz, rx, ry, rz -- [B, 6])
    Returns:
        A transformation matrix -- [B, 4, 4]
Converts 6DoF parameters to transformation matrix Args : vec : 6DoF parameters in the order of [ rz ry rx tx ty tz ] -- [ B 6 ] ( NOT the original SfMLearner : tx ty tz rx ry rz -- [ B 6 ] ) Returns : A transformation matrix -- [ B 4 4 ]
def pose_vec2mat(vec):
    """Converts 6DoF parameters to transformation matrix
    Args:
        vec: 6DoF parameters in the order of [rz, ry, rx, tx, ty, tz] -- [B, 6]
        (NOT the original SfMLearner: tx, ty, tz, rx, ry, rz -- [B, 6])
    Returns:
        A transformation matrix -- [B, 4, 4]
    """
    batch_size, _ = vec.get_shape().as_list()
    rot_mat, translation = pose_vec2rt(vec)
    filler = tf.constant([0.0, 0.0, 0.0, 1.0], shape=[1, 1, 4])
    filler = tf.tile(filler, [batch_size, 1, 1])
    transform_mat = tf.concat([rot_mat, translation], axis=2)
    transform_mat = tf.concat([transform_mat, filler], axis=1)
    return transform_mat
def pose_vec2mat ( vec ) : batch_size , _ = vec . get_shape ( ) . as_list ( ) rot_mat , translation = pose_vec2rt ( vec ) filler = tf . constant ( [ 0.0 , 0.0 , 0.0 , 1.0 ] , shape = [ 1 , 1 , 4 ] ) filler = tf . tile ( filler , [ batch_size , 1 , 1 ] ) transform_mat = tf . concat ( [ rot_mat , translation ] , axis = 2 ) transform_mat = tf . concat ( [ transform_mat , filler ] , axis = 1 ) return transform_mat