From 196f2238886b1f0de98ba6cfed6287df5629f8f5 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Wed, 28 Mar 2018 00:09:28 +0000
Subject: [PATCH] Compile fix
---
src/yolo.c | 3 ++-
src/coco.c | 3 ++-
src/demo.c | 3 ++-
src/demo.h | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/coco.c b/src/coco.c
index 115a29e..814b34c 100644
--- a/src/coco.c
+++ b/src/coco.c
@@ -372,6 +372,7 @@
char *out_filename = find_char_arg(argc, argv, "-out_filename", 0);
char *prefix = find_char_arg(argc, argv, "-prefix", 0);
float thresh = find_float_arg(argc, argv, "-thresh", .2);
+ float hier_thresh = find_float_arg(argc, argv, "-hier", .5);
int cam_index = find_int_arg(argc, argv, "-c", 0);
int frame_skip = find_int_arg(argc, argv, "-s", 0);
@@ -387,6 +388,6 @@
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);
- else if(0==strcmp(argv[2], "demo")) demo(cfg, weights, thresh, cam_index, filename, coco_classes, 80, frame_skip,
+ else if(0==strcmp(argv[2], "demo")) demo(cfg, weights, thresh, hier_thresh, cam_index, filename, coco_classes, 80, frame_skip,
prefix, out_filename, http_stream_port, dont_show);
}
diff --git a/src/demo.c b/src/demo.c
index 3b4e92d..2337a0a 100644
--- a/src/demo.c
+++ b/src/demo.c
@@ -313,7 +313,8 @@
}
}
#else
-void demo(char *cfgfile, char *weightfile, float thresh, float hier_thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, char *out_filename, int http_stream_port, int dont_show)
+void demo(char *cfgfile, char *weightfile, float thresh, float hier_thresh, int cam_index, const char *filename, char **names, int classes,
+ int frame_skip, char *prefix, char *out_filename, int http_stream_port, int dont_show)
{
fprintf(stderr, "Demo needs OpenCV for webcam images.\n");
}
diff --git a/src/demo.h b/src/demo.h
index 1f142d4..5340db6 100644
--- a/src/demo.h
+++ b/src/demo.h
@@ -2,6 +2,6 @@
#define DEMO
#include "image.h"
-void demo(char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, char *out_filename, int http_stream_port, int dont_show);
+void demo(char *cfgfile, char *weightfile, float thresh, float hier_thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, char *out_filename, int http_stream_port, int dont_show);
#endif
diff --git a/src/yolo.c b/src/yolo.c
index 076439d..4bbdf44 100644
--- a/src/yolo.c
+++ b/src/yolo.c
@@ -345,6 +345,7 @@
char *out_filename = find_char_arg(argc, argv, "-out_filename", 0);
char *prefix = find_char_arg(argc, argv, "-prefix", 0);
float thresh = find_float_arg(argc, argv, "-thresh", .2);
+ float hier_thresh = find_float_arg(argc, argv, "-hier", .5);
int cam_index = find_int_arg(argc, argv, "-c", 0);
int frame_skip = find_int_arg(argc, argv, "-s", 0);
if(argc < 4){
@@ -359,6 +360,6 @@
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(cfg, weights, thresh, cam_index, filename, voc_names, 20, frame_skip,
+ else if(0==strcmp(argv[2], "demo")) demo(cfg, weights, thresh, hier_thresh, cam_index, filename, voc_names, 20, frame_skip,
prefix, out_filename, http_stream_port, dont_show);
}
--
Gitblit v1.10.0