AlexeyAB
2018-06-01 ba70801e982ada241ced55bedad2a411da1896c4
Minor fixes
4 files modified
11 ■■■■ changed files
build/darknet/x64/partial.cmd 2 ●●● patch | view | raw | blame | history
src/region_layer.c 3 ●●●● patch | view | raw | blame | history
src/utils.c 3 ●●●●● patch | view | raw | blame | history
src/yolo_layer.c 3 ●●●● patch | view | raw | blame | history
build/darknet/x64/partial.cmd
@@ -18,7 +18,7 @@
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
src/region_layer.c
@@ -297,7 +297,8 @@
            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
            }
src/utils.c
@@ -212,6 +212,9 @@
    //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
src/yolo_layer.c
@@ -202,7 +202,8 @@
                        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;