From a392bbd0c957a00e3782c96e7ced84a29ff9dd88 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Tue, 15 Mar 2016 05:33:02 +0000
Subject: [PATCH] Play along w/ alphago
---
src/yolo.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/yolo.c b/src/yolo.c
index a6c1e78..02c4fba 100644
--- a/src/yolo.c
+++ b/src/yolo.c
@@ -14,7 +14,7 @@
void train_yolo(char *cfgfile, char *weightfile)
{
- char *train_images = "data/voc.0712.trainval";
+ char *train_images = "/data/voc/train.txt";
char *backup_directory = "/home/pjreddie/backup/";
srand(time(0));
data_seed = time(0);
@@ -343,8 +343,10 @@
printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time));
convert_yolo_detections(predictions, l.classes, l.n, l.sqrt, l.side, 1, 1, thresh, probs, boxes, 0);
if (nms) do_nms_sort(boxes, probs, l.side*l.side*l.n, l.classes, nms);
- draw_detections(im, l.side*l.side*l.n, thresh, boxes, probs, voc_names, voc_labels, 20);
+ //draw_detections(im, l.side*l.side*l.n, thresh, boxes, probs, voc_names, voc_labels, 20);
+ draw_detections(im, l.side*l.side*l.n, thresh, boxes, probs, voc_names, 0, 20);
show_image(im, "predictions");
+ save_image(im, "predictions");
show_image(sized, "resized");
free_image(im);
@@ -393,13 +395,7 @@
#endif
*/
-void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index);
-#ifndef GPU
-void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index)
-{
- fprintf(stderr, "Darknet must be compiled with CUDA for YOLO demo.\n");
-}
-#endif
+void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index, char *filename);
void run_yolo(int argc, char **argv)
{
@@ -424,5 +420,5 @@
else if(0==strcmp(argv[2], "train")) train_yolo(cfg, weights);
else if(0==strcmp(argv[2], "valid")) validate_yolo(cfg, weights);
else if(0==strcmp(argv[2], "recall")) validate_yolo_recall(cfg, weights);
- else if(0==strcmp(argv[2], "demo")) demo_yolo(cfg, weights, thresh, cam_index);
+ else if(0==strcmp(argv[2], "demo")) demo_yolo(cfg, weights, thresh, cam_index, filename);
}
--
Gitblit v1.10.0