mirror of https://github.com/AlexeyAB/darknet.git
Fixed for web-cam
This commit is contained in:
parent
a4e1dc9078
commit
12c1d55942
|
@ -552,6 +552,7 @@ void run_detector(int argc, char **argv)
|
|||
char *datacfg = argv[3];
|
||||
char *cfg = argv[4];
|
||||
char *weights = (argc > 5) ? argv[5] : 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);
|
||||
|
@ -563,6 +564,7 @@ void run_detector(int argc, char **argv)
|
|||
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)
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue