From 84cdbaa1f14b4f2ca73b370c6db6a4dc9571fd07 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Sun, 29 Oct 2017 15:34:55 +0000
Subject: [PATCH] Fixed for Linux: detection for batch > 1 and 0x0d at command line
---
src/detector.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/detector.c b/src/detector.c
index 44f715d..dcb0dd2 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -461,7 +461,7 @@
char **names = get_labels(name_list);
image **alphabet = load_alphabet();
- network net = parse_network_cfg(cfgfile);
+ network net = parse_network_cfg_custom(cfgfile, 1);
if(weightfile){
load_weights(&net, weightfile);
}
@@ -475,6 +475,7 @@
while(1){
if(filename){
strncpy(input, filename, 256);
+ if (input[strlen(input) - 1] == 0x0d) input[strlen(input) - 1] = 0;
} else {
printf("Enter Image Path: ");
fflush(stdout);
@@ -561,6 +562,7 @@
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;
demo(cfg, weights, thresh, cam_index, filename, names, classes, frame_skip, prefix, out_filename);
}
}
--
Gitblit v1.10.0