INNER CODE UNIT · Python

x1

TimoBolkart/voca · edit_sequences.py:97

        x1 = (i+1)*frequency-blink_duration//2
        x2 = x1+3*step
        if x1 >= 0 and x2 < weights.shape[0]:
            weights[x1:x2] = blink_weights

    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:] = weights[frame_idx]*blink_exp_betas
        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_shape(source_path, out_path, flame_model_fname, pc_idx=0, pc_range=(0,3), uv_template_fname='', texture_img_fname=''):
    '''
    Load existing animation sequence in "zero pose" and change the identity dependent shape over time.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…