INNER CODE UNIT · Python

y2

TimoBolkart/voca · edit_sequences.py:143

    x2, y2 = [num_frames/2, num_frames], pc_range[::-1]

    xsteps1 = np.arange(0, num_frames/2)
    xsteps2 = np.arange(num_frames/2, num_frames)

    model_parms[:, pc_idx] = np.hstack((np.interp(xsteps1, x1, y1), np.interp(xsteps2, x2, y2)))

    predicted_vertices = np.zeros((num_frames, model.v_template.shape[0], model.v_template.shape[1]))

    for frame_idx in range(num_frames):
        model.v_template[:] = Mesh(filename=sequence_fnames[frame_idx]).v
        model.betas[:300] = model_parms[frame_idx]
        predicted_vertices[frame_idx] = model.r

    output_sequence_meshes(predicted_vertices, Mesh(model.v_template, model.f), out_path, uv_template_fname=uv_template_fname, texture_img_fname=texture_img_fname)

def alter_sequence_head_pose(source_path, out_path, flame_model_fname, pose_idx=3, rot_angle=np.pi/6, uv_template_fname='', texture_img_fname=''):
    '''

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…