Exemplo n.º 1
0
def main():
    if len(sys.argv) < 2:
        print ("Usage: " + sys.argv[0] + " mesh_list")
        exit()

    if not os.path.exists(sys.argv[1]):
        print ("Usage: " + sys.argv[0] + " mesh_list")
        exit()

    fig_filename = os.path.splitext(sys.argv[1])[0]
    print (fig_filename)
    output_path = output_path_root

    latex_filename = output_path + "/" + fig_filename + ".tex"
    file = librr.open_latex_table(latex_filename, attr_names, attr_types)

    instances = []
    with open(sys.argv[1], "r") as csv_file:
        datareader = csv.reader(csv_file, delimiter=",")

        is_first_row = True
        for row in datareader:
            input_path_dir = row[0]
            mesh_list = []
            mesh_list.append(row[1])

            input_path = input_path_root + "/" + input_path_dir + "/" + input_path_postfix
            instances = instances + load_instances(input_path, output_path, mesh_list, -1)

    librr.write_latex_table(file, instances, attr_names, attr_types)
    librr.close_latex_table(file)
Exemplo n.º 2
0
def main():
    if len(sys.argv) < 2:
        print("Usage: " + sys.argv[0] + " mesh_list")
        exit()

    if not os.path.exists(sys.argv[1]):
        print("Usage: " + sys.argv[0] + " mesh_list")
        exit()

    fig_filename = os.path.splitext(sys.argv[1])[0]
    print(fig_filename)
    output_path = output_path_root

    latex_filename = output_path + '/' + fig_filename + '.tex'
    file = librr.open_latex_table(latex_filename, attr_names, attr_types)

    instances = []
    with open(sys.argv[1], 'r') as csv_file:
        datareader = csv.reader(csv_file, delimiter=',')

        is_first_row = True
        for row in datareader:
            input_path_dir = row[0]
            mesh_list = []
            mesh_list.append(row[1])

            input_path = input_path_root + '/' + input_path_dir + '/' + input_path_postfix
            instances = instances + load_instances(input_path, output_path,
                                                   mesh_list, -1)

    librr.write_latex_table(file, instances, attr_names, attr_types)
    librr.close_latex_table(file)
Exemplo n.º 3
0
def main():
    input_path, output_path, dataset_name, symmetry_part_names = librr.parse_arguments(
            input_path_postfix, output_path_root, output_dir_prefix)

    instances = load_instances(input_path, output_path, -1)
    html_filename = output_path + '/output.tex'
    librr.write_latex_table(instances, attr_names, attr_types, dataset_name + ' (All)', html_filename)

    # For each part
    '''
Exemplo n.º 4
0
            float(eval["median_aligned_position_error"])

        instance = OutputInstance(prefix, trajectory_image_filepath,
                                  num_views, num_estimated_views,
                                  mean_rotation_error, median_rotation_error,
                                  mean_aligned_rotation_error,
                                  median_aligned_rotation_error,
                                  mean_aligned_position_error,
                                  median_aligned_position_error)
        instances.append(instance)

    return instances


if __name__ == '__main__':
    FLAGS(sys.argv)

    dataset_name = os.path.splitext(os.path.basename(FLAGS.out_file))[0]
    dataset_name = dataset_name.replace('_', '\_')

    out_dir = os.path.dirname(FLAGS.out_file)
    if not os.path.exists(out_dir):
        os.makedirs(out_dir)

    instances = load_instances()

    file = librr.open_latex_table(
        FLAGS.out_file, dataset_name, attr_names, attr_types)
    librr.write_latex_table(file, instances, attr_names, attr_types)
    librr.close_latex_table(file)