Support of .ppm files is realised

pull/844/head
AlexeyAB 7 years ago
parent e29fcb703f
commit fb9fcfb3ba
  1. 1
      src/coco.c
  2. 3
      src/data.c
  3. 3
      src/detector.c
  4. 1
      src/yolo.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);

@ -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);

@ -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);

@ -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);

Loading…
Cancel
Save