|
|
|
@ -358,7 +358,7 @@ void validate_detector(char *datacfg, char *cfgfile, char *weightfile) |
|
|
|
|
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 @@ void validate_detector_recall(char *cfgfile, char *weightfile) |
|
|
|
|
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 @@ void validate_detector_recall(char *cfgfile, char *weightfile) |
|
|
|
|
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 @@ void run_detector(int argc, char **argv) |
|
|
|
|
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); |
|
|
|
|