Fixed darknet.py for Linux

This commit is contained in:
AlexeyAB
2018-04-13 17:32:10 +03:00
parent b9b0bf5131
commit 408bde78ff
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ if __name__ == "__main__":
#r = classify(net, meta, im) #r = classify(net, meta, im)
#print r[:10] #print r[:10]
net = load_net("cfg/yolov3.cfg", "yolov3.weights", 0) net = load_net("cfg/yolov3.cfg", "yolov3.weights", 0)
meta = load_meta("data/coco.data") meta = load_meta("cfg/coco.data")
r = detect(net, meta, "data/dog.jpg", 0.25) r = detect(net, meta, "data/dog.jpg", 0.25)
print r print r

View File

@ -483,7 +483,7 @@ void validate_detector_recall(char *datacfg, char *cfgfile, char *weightfile)
++correct; ++correct;
} }
} }
fprintf(stderr, " %s - %s - ", paths[i], labelpath);
fprintf(stderr, "%5d %5d %5d\tRPs/Img: %.2f\tIOU: %.2f%%\tRecall:%.2f%%\n", i, correct, total, (float)proposals / (i + 1), avg_iou * 100 / total, 100.*correct / total); fprintf(stderr, "%5d %5d %5d\tRPs/Img: %.2f\tIOU: %.2f%%\tRecall:%.2f%%\n", i, correct, total, (float)proposals / (i + 1), avg_iou * 100 / total, 100.*correct / total);
free(id); free(id);
free_image(orig); free_image(orig);