Alexey
2018-05-26 65e430588d76adbcf435db6b2e3aec791de651d0
Merge pull request #909 from jing-vision/master

classifier.c - set batch=1 in "predict", "demo" and "try" mode.
1 files modified
12 ■■■■ changed files
src/classifier.c 12 ●●●● patch | view | raw | blame | history
src/classifier.c
@@ -598,7 +598,7 @@
void try_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int layer_num)
{
    network net = parse_network_cfg(cfgfile);
    network net = parse_network_cfg_custom(cfgfile, 1);
    if(weightfile){
        load_weights(&net, weightfile);
    }
@@ -679,7 +679,7 @@
void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int top)
{
    network net = parse_network_cfg(cfgfile);
    network net = parse_network_cfg_custom(cfgfile, 1);
    if(weightfile){
        load_weights(&net, weightfile);
    }
@@ -868,7 +868,7 @@
    }
    else {
        //cap = cvCaptureFromCAM(cam_index);
        cap = get_capture_webcam(filename);
        cap = get_capture_webcam(cam_index);
    }
    int top = option_find_int(options, "top", 1);
@@ -1004,7 +1004,7 @@
    }
    else {
        //cap = cvCaptureFromCAM(cam_index);
        cap = get_capture_webcam(filename);
        cap = get_capture_webcam(cam_index);
    }
    int top = option_find_int(options, "top", 1);
@@ -1069,7 +1069,7 @@
{
#ifdef OPENCV
    printf("Classifier Demo\n");
    network net = parse_network_cfg(cfgfile);
    network net = parse_network_cfg_custom(cfgfile, 1);
    if(weightfile){
        load_weights(&net, weightfile);
    }
@@ -1084,7 +1084,7 @@
        cap = get_capture_video_stream(filename);
    }else{
        //cap = cvCaptureFromCAM(cam_index);
        cap = get_capture_webcam(filename);
        cap = get_capture_webcam(cam_index);
    }
    int top = option_find_int(options, "top", 1);