| | |
| | | int random_val = rand() % 12; |
| | | int dim_w = (random_val + (init_w / 32 - 5)) * 32; // +-160 |
| | | int dim_h = (random_val + (init_h / 32 - 5)) * 32; // +-160 |
| | | if (dim_w < 32) dim_w = 32; |
| | | if (dim_h < 32) dim_h = 32; |
| | | |
| | | printf("%d x %d \n", dim_w, dim_h); |
| | | args.w = dim_w; |
| | |
| | | fprintf(fp, "\n]\n"); |
| | | fclose(fp); |
| | | } |
| | | fprintf(stderr, "Total Detection Time: %f Seconds\n", time(0) - start); |
| | | fprintf(stderr, "Total Detection Time: %f Seconds\n", (double)time(0) - start); |
| | | } |
| | | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | 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); |