|
|
|
@ -380,7 +380,7 @@ int fill_truth_detection(const char *path, int num_boxes, float *truth, int clas |
|
|
|
|
// if truth (box for object) is smaller than 1x1 pix
|
|
|
|
|
char buff[256]; |
|
|
|
|
if (id >= classes) { |
|
|
|
|
printf("\n Wrong annotation: class_id = %d. But class_id should be [from 0 to %d] \n", id, (classes-1)); |
|
|
|
|
printf("\n Wrong annotation: class_id = %d. But class_id should be [from 0 to %d], file: %s \n", id, (classes-1), labelpath); |
|
|
|
|
sprintf(buff, "echo %s \"Wrong annotation: class_id = %d. But class_id should be [from 0 to %d]\" >> bad_label.list", labelpath, id, (classes-1)); |
|
|
|
|
system(buff); |
|
|
|
|
getchar(); |
|
|
|
@ -394,7 +394,7 @@ int fill_truth_detection(const char *path, int num_boxes, float *truth, int clas |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (x == 999999 || y == 999999) { |
|
|
|
|
printf("\n Wrong annotation: x = 0, y = 0, < 0 or > 1 \n"); |
|
|
|
|
printf("\n Wrong annotation: x = 0, y = 0, < 0 or > 1, file: %s \n", labelpath); |
|
|
|
|
sprintf(buff, "echo %s \"Wrong annotation: x = 0 or y = 0\" >> bad_label.list", labelpath); |
|
|
|
|
system(buff); |
|
|
|
|
++sub; |
|
|
|
@ -402,7 +402,7 @@ int fill_truth_detection(const char *path, int num_boxes, float *truth, int clas |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (x <= 0 || x > 1 || y <= 0 || y > 1) { |
|
|
|
|
printf("\n Wrong annotation: x = %f, y = %f \n", x, y); |
|
|
|
|
printf("\n Wrong annotation: x = %f, y = %f, file: %s \n", x, y, labelpath); |
|
|
|
|
sprintf(buff, "echo %s \"Wrong annotation: x = %f, y = %f\" >> bad_label.list", labelpath, x, y); |
|
|
|
|
system(buff); |
|
|
|
|
++sub; |
|
|
|
@ -410,14 +410,14 @@ int fill_truth_detection(const char *path, int num_boxes, float *truth, int clas |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
if (w > 1) { |
|
|
|
|
printf("\n Wrong annotation: w = %f \n", w); |
|
|
|
|
printf("\n Wrong annotation: w = %f, file: %s \n", w, labelpath); |
|
|
|
|
sprintf(buff, "echo %s \"Wrong annotation: w = %f\" >> bad_label.list", labelpath, w); |
|
|
|
|
system(buff); |
|
|
|
|
w = 1; |
|
|
|
|
if (check_mistakes) getchar(); |
|
|
|
|
} |
|
|
|
|
if (h > 1) { |
|
|
|
|
printf("\n Wrong annotation: h = %f \n", h); |
|
|
|
|
printf("\n Wrong annotation: h = %f, file: %s \n", h, labelpath); |
|
|
|
|
sprintf(buff, "echo %s \"Wrong annotation: h = %f\" >> bad_label.list", labelpath, h); |
|
|
|
|
system(buff); |
|
|
|
|
h = 1; |
|
|
|
|