Minor fixes

This commit is contained in:
AlexeyAB
2018-09-25 02:39:30 +03:00
parent 129417ae7f
commit e203ab9046
2 changed files with 11 additions and 4 deletions

View File

@ -3,9 +3,9 @@ rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install cPi
rem C:\Users\Alex\AppData\Local\Programs\Python\Python36\Scripts\pip install _pickle
rem darknet.exe detector valid data/voc.data tiny-yolo-voc.cfg tiny-yolo-voc.weights
rem darknet.exe detector valid data/voc.data cfg/yolov2-tiny-voc.cfg yolov2-tiny-voc.weights
darknet.exe detector valid data/voc.data yolo-voc.cfg yolo-voc.weights
darknet.exe detector valid data/voc.data cfg/yolov2-voc.cfg yolo-voc.weights
reval_voc_py3.py --year 2007 --classes data\voc.names --image_set test --voc_dir E:\VOC2007_2012\VOCtrainval_11-May-2012\VOCdevkit results

View File

@ -645,9 +645,16 @@ void validate_detector_map(char *datacfg, char *cfgfile, char *weightfile, float
network_predict(net, X);
int nboxes = 0;
int letterbox = (args.type == LETTERBOX_DATA);
float hier_thresh = 0;
detection *dets = get_network_boxes(&net, 1, 1, thresh, hier_thresh, 0, 0, &nboxes, letterbox);
detection *dets;
if (args.type == LETTERBOX_DATA) {
int letterbox = 1;
dets = get_network_boxes(&net, val[t].w, val[t].h, thresh, hier_thresh, 0, 1, &nboxes, letterbox);
}
else {
int letterbox = 0;
dets = get_network_boxes(&net, 1, 1, thresh, hier_thresh, 0, 0, &nboxes, letterbox);
}
//detection *dets = get_network_boxes(&net, val[t].w, val[t].h, thresh, hier_thresh, 0, 1, &nboxes, letterbox); // for letterbox=1
if (nms) do_nms_sort(dets, nboxes, l.classes, nms);