From 02bb33c64514ef36d48388e2265b034c49bb31c4 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 14 Mar 2016 06:47:23 +0000
Subject: [PATCH] stuff
---
src/coco.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/coco.c b/src/coco.c
index 17d0654..947bef2 100644
--- a/src/coco.c
+++ b/src/coco.c
@@ -20,7 +20,8 @@
void train_coco(char *cfgfile, char *weightfile)
{
//char *train_images = "/home/pjreddie/data/voc/test/train.txt";
- char *train_images = "/home/pjreddie/data/coco/train.txt";
+ //char *train_images = "/home/pjreddie/data/coco/train.txt";
+ char *train_images = "data/coco.trainval.txt";
char *backup_directory = "/home/pjreddie/backup/";
srand(time(0));
data_seed = time(0);
@@ -385,11 +386,15 @@
}
}
-#ifdef OPENCV
-#ifdef GPU
-void demo_coco(char *cfgfile, char *weightfile, float thresh, int cam_index);
-#endif
-#endif
+void demo_coco(char *cfgfile, char *weightfile, float thresh, int cam_index, char *filename);
+static void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, char* filename)
+{
+ #if defined(OPENCV)
+ demo_coco(cfgfile, weightfile, thresh, cam_index, filename);
+ #else
+ fprintf(stderr, "Need to compile with OpenCV for demo.\n");
+ #endif
+}
void run_coco(int argc, char **argv)
{
@@ -401,6 +406,7 @@
}
float thresh = find_float_arg(argc, argv, "-thresh", .2);
int cam_index = find_int_arg(argc, argv, "-c", 0);
+ char *file = find_char_arg(argc, argv, "-file", 0);
if(argc < 4){
fprintf(stderr, "usage: %s %s [train/test/valid] [cfg] [weights (optional)]\n", argv[0], argv[1]);
@@ -414,9 +420,5 @@
else if(0==strcmp(argv[2], "train")) train_coco(cfg, weights);
else if(0==strcmp(argv[2], "valid")) validate_coco(cfg, weights);
else if(0==strcmp(argv[2], "recall")) validate_coco_recall(cfg, weights);
-#ifdef OPENCV
-#ifdef GPU
- else if(0==strcmp(argv[2], "demo")) demo_coco(cfg, weights, thresh, cam_index);
-#endif
-#endif
+ else if(0==strcmp(argv[2], "demo")) demo(cfg, weights, thresh, cam_index, file);
}
--
Gitblit v1.10.0