AlexeyAB
2017-04-25 97ed11ca1503953199495e9b4386974ceba44687
Fixed valid param in .data-file for - valid recall
1 files modified
10 ■■■■■ changed files
src/detector.c 10 ●●●●● patch | view | raw | blame | history
src/detector.c
@@ -358,7 +358,7 @@
    fprintf(stderr, "Total Detection Time: %f Seconds\n", (double)(time(0) - start));
}
void validate_detector_recall(char *cfgfile, char *weightfile)
void validate_detector_recall(char *datacfg, char *cfgfile, char *weightfile)
{
    network net = parse_network_cfg(cfgfile);
    if(weightfile){
@@ -368,7 +368,9 @@
    fprintf(stderr, "Learning Rate: %g, Momentum: %g, Decay: %g\n", net.learning_rate, net.momentum, net.decay);
    srand(time(0));
    list *plist = get_paths("data/voc.2007.test");
    list *options = read_data_cfg(datacfg);
    char *valid_images = option_find_str(options, "valid", "data/train.txt");
    list *plist = get_paths(valid_images);
    char **paths = (char **)list_to_array(plist);
    layer l = net.layers[net.n-1];
@@ -382,7 +384,7 @@
    int m = plist->size;
    int i=0;
    float thresh = .001;
    float thresh = .2;// .001;
    float iou_thresh = .5;
    float nms = .4;
@@ -536,7 +538,7 @@
    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);
    else if(0==strcmp(argv[2], "valid")) validate_detector(datacfg, cfg, weights);
    else if(0==strcmp(argv[2], "recall")) validate_detector_recall(cfg, weights);
    else if(0==strcmp(argv[2], "recall")) validate_detector_recall(datacfg, cfg, weights);
    else if(0==strcmp(argv[2], "demo")) {
        list *options = read_data_cfg(datacfg);
        int classes = option_find_int(options, "classes", 20);