From 9ac78d8b84f6a059d2cefe22a10aa60de5b3feaf Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 04 Jan 2018 21:58:52 +0000
Subject: [PATCH] Fine tuning, use stopbackward=1 in the cfg-file in that layer where Backward should be stopped.
---
src/detector.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/detector.c b/src/detector.c
index ac75524..5f2cec8 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -399,7 +399,7 @@
int m = plist->size;
int i=0;
- float thresh = .2;// .001;
+ float thresh = .001;// .001; // .2;
float iou_thresh = .5;
float nms = .4;
@@ -552,7 +552,8 @@
char *datacfg = argv[3];
char *cfg = argv[4];
char *weights = (argc > 5) ? argv[5] : 0;
- if (weights[strlen(weights) - 1] == 0x0d) weights[strlen(weights) - 1] = 0;
+ if(weights)
+ if (weights[strlen(weights) - 1] == 0x0d) weights[strlen(weights) - 1] = 0;
char *filename = (argc > 6) ? argv[6]: 0;
if(0==strcmp(argv[2], "test")) test_detector(datacfg, cfg, weights, filename, thresh);
else if(0==strcmp(argv[2], "train")) train_detector(datacfg, cfg, weights, gpus, ngpus, clear);
@@ -563,7 +564,8 @@
int classes = option_find_int(options, "classes", 20);
char *name_list = option_find_str(options, "names", "data/names.list");
char **names = get_labels(name_list);
- if (filename[strlen(filename) - 1] == 0x0d) filename[strlen(filename) - 1] = 0;
+ if(filename)
+ if (filename[strlen(filename) - 1] == 0x0d) filename[strlen(filename) - 1] = 0;
demo(cfg, weights, thresh, cam_index, filename, names, classes, frame_skip, prefix, out_filename);
}
}
--
Gitblit v1.10.0