From 68213b835b9f15cb449ad2037a8b51c17a3de07b Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 14 Mar 2016 22:10:14 +0000
Subject: [PATCH] Makefile

---
 src/yolo.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/yolo.c b/src/yolo.c
index 6bd4e6b..02c4fba 100644
--- a/src/yolo.c
+++ b/src/yolo.c
@@ -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