From 580b2fb83c924b709f1562190d612e173087adcb Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Fri, 11 Jan 2019 00:52:19 +0300 Subject: [PATCH] Fixed ./darknet detect ... --- include/darknet.h | 1 + src/darknet.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/darknet.h b/include/darknet.h index 756a6830..626e5277 100644 --- a/include/darknet.h +++ b/include/darknet.h @@ -753,6 +753,7 @@ LIB_API void reset_rnn(network *net); LIB_API float *network_predict_image(network *net, image im); LIB_API float validate_detector_map(char *datacfg, char *cfgfile, char *weightfile, float thresh_calc_avg_iou, const float iou_thresh, network *existing_net); LIB_API void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, int ngpus, int clear, int dont_show, int calc_map); +LIB_API void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filename, float thresh, int ext_output); LIB_API int network_width(network *net); LIB_API int network_height(network *net); LIB_API void optimize_picture(network *net, image orig, int max_layer, float scale, float rate, float thresh, int norm); diff --git a/src/darknet.c b/src/darknet.c index 41878041..fc560559 100644 --- a/src/darknet.c +++ b/src/darknet.c @@ -2,6 +2,7 @@ #include #include +#include "darknet.h" #include "parser.h" #include "utils.h" #include "cuda.h" @@ -13,7 +14,6 @@ #endif extern void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int top); -extern void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filename, float thresh, int ext_output); extern void run_voxel(int argc, char **argv); extern void run_yolo(int argc, char **argv); extern void run_detector(int argc, char **argv); @@ -397,7 +397,7 @@ int main(int argc, char **argv) float thresh = find_float_arg(argc, argv, "-thresh", .24); int ext_output = find_arg(argc, argv, "-ext_output"); char *filename = (argc > 4) ? argv[4]: 0; - test_detector("cfg/coco.data", argv[2], argv[3], filename, thresh, ext_output); + test_detector("cfg/coco.data", argv[2], argv[3], filename, thresh, 0.5, 0, 1, 0, NULL); } else if (0 == strcmp(argv[1], "cifar")){ run_cifar(argc, argv); } else if (0 == strcmp(argv[1], "go")){