AlexeyAB
2018-05-17 fb9fcfb3ba0057b1196d1b95fd53cdb0b874b1c3
Support of .ppm files is realised
4 files modified
8 ■■■■■ changed files
src/coco.c 1 ●●●● patch | view | raw | blame | history
src/data.c 3 ●●●●● patch | view | raw | blame | history
src/detector.c 3 ●●●●● patch | view | raw | blame | history
src/yolo.c 1 ●●●● patch | view | raw | blame | history
src/coco.c
@@ -285,6 +285,7 @@
        find_replace(labelpath, "JPEGImages", "labels", labelpath);
        find_replace(labelpath, ".jpg", ".txt", labelpath);
        find_replace(labelpath, ".JPEG", ".txt", labelpath);
        find_replace(labelpath, ".ppm", ".txt", labelpath);
        int num_labels = 0;
        box_label *truth = read_boxes(labelpath, &num_labels);
src/data.c
@@ -218,6 +218,7 @@
    find_replace(labelpath, ".jpg", ".txt", labelpath);
    find_replace(labelpath, ".JPG", ".txt", labelpath);
    find_replace(labelpath, ".JPEG", ".txt", labelpath);
    find_replace(labelpath, ".ppm", ".txt", labelpath);
    int count = 0;
    box_label *boxes = read_boxes(labelpath, &count);
@@ -258,6 +259,7 @@
    find_replace(labelpath, ".png", ".txt", labelpath);
    find_replace(labelpath, ".JPG", ".txt", labelpath);
    find_replace(labelpath, ".JPEG", ".txt", labelpath);
    find_replace(labelpath, ".ppm", ".txt", labelpath);
    int count = 0;
    box_label *boxes = read_boxes(labelpath, &count);
    randomize_boxes(boxes, count);
@@ -309,6 +311,7 @@
    find_replace(labelpath, ".bmp", ".txt", labelpath);
    find_replace(labelpath, ".JPG", ".txt", labelpath);
    find_replace(labelpath, ".JPEG", ".txt", labelpath);
    find_replace(labelpath, ".ppm", ".txt", labelpath);
    int count = 0;
    int i;
    box_label *boxes = read_boxes(labelpath, &count);
src/detector.c
@@ -479,6 +479,7 @@
        find_replace(labelpath, ".bmp", ".txt", labelpath);
        find_replace(labelpath, ".JPG", ".txt", labelpath);
        find_replace(labelpath, ".JPEG", ".txt", labelpath);
        find_replace(labelpath, ".ppm", ".txt", labelpath);
        int num_labels = 0;
        box_label *truth = read_boxes(labelpath, &num_labels);
@@ -636,6 +637,7 @@
            find_replace(labelpath, ".bmp", ".txt", labelpath);
            find_replace(labelpath, ".JPG", ".txt", labelpath);
            find_replace(labelpath, ".JPEG", ".txt", labelpath);
            find_replace(labelpath, ".ppm", ".txt", labelpath);
            int num_labels = 0;
            box_label *truth = read_boxes(labelpath, &num_labels);
            int i, j;
@@ -899,6 +901,7 @@
        find_replace(labelpath, ".bmp", ".txt", labelpath);
        find_replace(labelpath, ".JPG", ".txt", labelpath);
        find_replace(labelpath, ".JPEG", ".txt", labelpath);
        find_replace(labelpath, ".ppm", ".txt", labelpath);
        int num_labels = 0;
        box_label *truth = read_boxes(labelpath, &num_labels);
        //printf(" new path: %s \n", labelpath);
src/yolo.c
@@ -256,6 +256,7 @@
        find_replace(labelpath, "JPEGImages", "labels", labelpath);
        find_replace(labelpath, ".jpg", ".txt", labelpath);
        find_replace(labelpath, ".JPEG", ".txt", labelpath);
        find_replace(labelpath, ".ppm", ".txt", labelpath);
        int num_labels = 0;
        box_label *truth = read_boxes(labelpath, &num_labels);