mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Support of .ppm files is realised
This commit is contained in:
@ -285,6 +285,7 @@ void validate_coco_recall(char *cfgfile, char *weightfile)
|
|||||||
find_replace(labelpath, "JPEGImages", "labels", labelpath);
|
find_replace(labelpath, "JPEGImages", "labels", labelpath);
|
||||||
find_replace(labelpath, ".jpg", ".txt", labelpath);
|
find_replace(labelpath, ".jpg", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
|
|
||||||
int num_labels = 0;
|
int num_labels = 0;
|
||||||
box_label *truth = read_boxes(labelpath, &num_labels);
|
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, ".JPG", ".txt", labelpath);
|
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
box_label *boxes = read_boxes(labelpath, &count);
|
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, ".png", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
box_label *boxes = read_boxes(labelpath, &count);
|
box_label *boxes = read_boxes(labelpath, &count);
|
||||||
randomize_boxes(boxes, 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, ".bmp", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int i;
|
int i;
|
||||||
box_label *boxes = read_boxes(labelpath, &count);
|
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, ".bmp", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
|
|
||||||
int num_labels = 0;
|
int num_labels = 0;
|
||||||
box_label *truth = read_boxes(labelpath, &num_labels);
|
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, ".bmp", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
int num_labels = 0;
|
int num_labels = 0;
|
||||||
box_label *truth = read_boxes(labelpath, &num_labels);
|
box_label *truth = read_boxes(labelpath, &num_labels);
|
||||||
int i, j;
|
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, ".bmp", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
find_replace(labelpath, ".JPG", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
int num_labels = 0;
|
int num_labels = 0;
|
||||||
box_label *truth = read_boxes(labelpath, &num_labels);
|
box_label *truth = read_boxes(labelpath, &num_labels);
|
||||||
//printf(" new path: %s \n", labelpath);
|
//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, "JPEGImages", "labels", labelpath);
|
||||||
find_replace(labelpath, ".jpg", ".txt", labelpath);
|
find_replace(labelpath, ".jpg", ".txt", labelpath);
|
||||||
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
find_replace(labelpath, ".JPEG", ".txt", labelpath);
|
||||||
|
find_replace(labelpath, ".ppm", ".txt", labelpath);
|
||||||
|
|
||||||
int num_labels = 0;
|
int num_labels = 0;
|
||||||
box_label *truth = read_boxes(labelpath, &num_labels);
|
box_label *truth = read_boxes(labelpath, &num_labels);
|
||||||
|
Reference in New Issue
Block a user