Example #1
0
        
        f_score = -1
        f_thres = -1
        index = 0
        for p,r,t in zip(P,R,thres.tolist()):
            if(p == 0 or r == 0):
                continue
            f1 = 2*p*r/(p + r)

            if(f1 > f_score ):
                f_score = f1
                f_thres = t
            index += 1
        print("max f score = " + str(f_score) + " at threshhold = " + str(f_thres/301))

        AP, MR, MP = evl.voc_ap(R,P)
        print(AP)

        plot_loss(loss_voc)



#BSDS500 DATASET
bsdspaths = {
"images_path" : "./BSDS500/train",
"targets_path" : "./BSDS500/groundTruth/train",
"train_names_path" : "./BSDS500/train.txt",
"model_save_path": "./models",
"BSDS500_test_path" : "./BSDS500/test"
}