list(i)
                    for i in zip(x[:southp, c], y[:southp, c], z[:southp, c])
                ]
                long = c
            else:
                pos_list = [
                    list(i) for i in zip(x[(southp - 1):,
                                           c], y[(southp - 1):,
                                                 c], z[(southp - 1):, c])
                ]
                pos_list = pos_list[::-1]
                long = c + circles - 1

            # Get the radians frames (dec, denorm) and the latent interpolants
            df_dec_interp, df_z_interp = interp_multi(pos_list, True, nsteps,
                                                      check_model, check_epoch,
                                                      method, feats_names)

            # Add 'time' column based on frequency fr
            end = df_dec_interp.shape[0] * fr + 0.02
            df_dec_interp['time'] = list(np.arange(0.02, end, fr))

            # Prepare the overview
            json_file = os.path.join(df_path, '-overview.json')

            with open(json_file, 'r') as fd:
                files_dict = json.load(fd)

            file_id = len(files_dict)

            files_dict[file_id] = {
Exemple #2
0
# Postures in radians
pos_list = []
id_anim_list = []

for frame in frames:
    if frame == 0:
        pos_list.append(standInit_norm)  # List of lists
        id_anim_list.append('standInit_0')
    else:
        pos, id_anim = sel_pos_frame(df, frame)
        pos_list.append(pos)  # List of lists
        id_anim_list.append(id_anim + '_f' + str(frame))

# Get the radians frames (dec, denorm) and the latent interpolants
df_dec_interp, df_z_interp = interp_multi(pos_list, latent, nsteps,
                                          check_model, check_epoch, method,
                                          joints_names)

# Add 'time' column based on frequency fr
end = df_dec_interp.shape[0] * fr + 0.02
df_dec_interp['time'] = list(np.arange(0.02, end, fr))

# Save path
df_path = os.path.join(ROOT_PATH, DATA_SAMP, 'interp_multi_pos')

# Prepare the overview
json_file = os.path.join(df_path, '-overview.json')

with open(json_file, 'r') as fd:
    files_dict = json.load(fd)