Пример #1
0
def multi_labels(label_values,ilp, files, gt, dense_gt, loops=3, weights="", repeats=1, outpath= "",
         t_cache = "", p_cache = ""):
    hostname = socket.gethostname()
    test_folder_path = assign_path(hostname)[5]
    if t_cache == "":
        t_cache = test_folder_path + "/t_cache"

    if p_cache == "":
        filesplit = files.split(".")[-2]
        filename = filesplit.split("/")[-1]
        p_cache = test_folder_path + "/p_cache/" + filename
        if not os.path.exists(p_cache):
            os.mkdir(p_cache)

    if outpath == "":
        outpath = test_folder_path + "/q_data"

    for n in label_values:
        ilp = reduce_labels_in_ilp(ilp, n)
        test(ilp, files, gt, dense_gt, n, loops, weights, repeats, outpath, t_cache, p_cache)
Пример #2
0
def multi_loops(nol, ilp, files, gt, dense_gt, labels="", weights="", repeats=1, outpath= "",
         t_cache = "", p_cache = ""):
    hostname = socket.gethostname()
    if labels != "":
        print
        print "reducing labels to " + str(labels)
        ilp = reduce_labels_in_ilp(ilp, labels)
    test_folder_path = assign_path(hostname)[5]
    if t_cache == "":
        t_cache = test_folder_path + "/t_cache"

    if p_cache == "":
        filesplit = files.split(".")[-2]
        filename = filesplit.split("/")[-1]
        p_cache = test_folder_path + "/p_cache/" + filename
        if not os.path.exists(p_cache):
            os.mkdir(p_cache)

    if outpath == "":
        outpath = test_folder_path + "/q_data"

    for n in range(1,nol+1):
        test(ilp, files, gt, dense_gt, labels, n, weights, repeats, outpath, t_cache, p_cache)