diff --git a/src/coco.c b/src/coco.c index c95e30d6..b8fc3464 100644 --- a/src/coco.c +++ b/src/coco.c @@ -285,6 +285,7 @@ void validate_coco_recall(char *cfgfile, char *weightfile) 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); diff --git a/src/data.c b/src/data.c index 4bb1b0f9..8da12341 100644 --- a/src/data.c +++ b/src/data.c @@ -218,6 +218,7 @@ void fill_truth_swag(char *path, float *truth, int classes, int flip, float dx, 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 @@ void fill_truth_region(char *path, float *truth, int classes, int num_boxes, int 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 @@ void fill_truth_detection(char *path, int num_boxes, float *truth, int classes, 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); diff --git a/src/detector.c b/src/detector.c index bed7467b..5ccb6c53 100644 --- a/src/detector.c +++ b/src/detector.c @@ -479,6 +479,7 @@ void validate_detector_recall(char *datacfg, char *cfgfile, char *weightfile) 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 @@ void validate_detector_map(char *datacfg, char *cfgfile, char *weightfile, float 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 @@ void calc_anchors(char *datacfg, int num_of_clusters, int width, int height, int 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); diff --git a/src/yolo.c b/src/yolo.c index 238454e6..44811658 100644 --- a/src/yolo.c +++ b/src/yolo.c @@ -256,6 +256,7 @@ void validate_yolo_recall(char *cfgfile, char *weightfile) 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);