diff --git a/build/darknet/x64/partial.cmd b/build/darknet/x64/partial.cmd index a6ac2625..acbe3fa9 100644 --- a/build/darknet/x64/partial.cmd +++ b/build/darknet/x64/partial.cmd @@ -18,7 +18,7 @@ darknet.exe partial cfg/yolo-voc.cfg yolo-voc.weights yolo-voc.conv.23 23 darknet.exe partial cfg/yolov2.cfg yolov2.weights yolov2.conv.23 23 -darknet.exe partial cfg/yolov3.cfg yolov3.weights yolov3.conv.105 105 +darknet.exe partial cfg/yolov3.cfg yolov3.weights yolov3.conv.81 81 darknet.exe partial cfg/yolov3-tiny.cfg yolov3-tiny.weights yolov3-tiny.conv.15 15 diff --git a/src/region_layer.c b/src/region_layer.c index a2ca440c..4e1e03a5 100644 --- a/src/region_layer.c +++ b/src/region_layer.c @@ -297,7 +297,8 @@ void forward_region_layer(const region_layer l, network_state state) box truth = float_to_box(state.truth + t*5 + b*l.truths); int class_id = state.truth[t * 5 + b*l.truths + 4]; if (class_id >= l.classes) { - printf("Warning: in txt-labels class_id=%d >= classes=%d in cfg-file\n", class_id, l.classes); + printf(" Warning: in txt-labels class_id=%d >= classes=%d in cfg-file. In txt-labels class_id should be [from 0 to %d] \n", class_id, l.classes, l.classes-1); + getchar(); continue; // if label contains class_id more than number of classes in the cfg-file } diff --git a/src/utils.c b/src/utils.c index 7b25e9c3..f1cc21aa 100644 --- a/src/utils.c +++ b/src/utils.c @@ -212,6 +212,9 @@ void replace_image_to_label(char *input_path, char *output_path) { //find_replace(output_path, "JPEGImages", "labels", output_path); // PascalVOC find_replace(output_path, "VOC2007/JPEGImages", "VOC2007/labels", output_path); // PascalVOC find_replace(output_path, "VOC2012/JPEGImages", "VOC2012/labels", output_path); // PascalVOC + + //find_replace(output_path, "/raw/", "/labels/", output_path); + // replace only ext of files find_replace_extension(output_path, ".jpg", ".txt", output_path); find_replace_extension(output_path, ".JPG", ".txt", output_path); // error diff --git a/src/yolo_layer.c b/src/yolo_layer.c index c1309c8f..f79bc418 100644 --- a/src/yolo_layer.c +++ b/src/yolo_layer.c @@ -202,7 +202,8 @@ void forward_yolo_layer(const layer l, network_state state) box truth = float_to_box_stride(state.truth + t*(4 + 1) + b*l.truths, 1); int class_id = state.truth[t*(4 + 1) + b*l.truths + 4]; if (class_id >= l.classes) { - printf("Warning: in txt-labels class_id=%d >= classes=%d in cfg-file\n", class_id, l.classes); + printf(" Warning: in txt-labels class_id=%d >= classes=%d in cfg-file. In txt-labels class_id should be [from 0 to %d] \n", class_id, l.classes, l.classes - 1); + getchar(); continue; // if label contains class_id more than number of classes in the cfg-file } if(!truth.x) break;