From c021841a52a7b71224b755bfbf779b05012b59d5 Mon Sep 17 00:00:00 2001
From: Tino Hager <tino.hager@nager.at>
Date: Tue, 10 Jul 2018 19:46:14 +0000
Subject: [PATCH] Get gpu count and name
---
src/data.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/data.c b/src/data.c
index aae8667..ec7d36f 100644
--- a/src/data.c
+++ b/src/data.c
@@ -51,6 +51,7 @@
random_paths[i] = paths[index];
//if(i == 0) printf("%s\n", paths[index]);
//printf("grp: %s\n", paths[index]);
+ if (strlen(random_paths[i]) <= 4) printf(" Very small path to the image: %s \n", random_paths[i]);
} while (strlen(random_paths[i]) == 0);
}
pthread_mutex_unlock(&mutex);
@@ -140,8 +141,16 @@
box_label *boxes = calloc(1, sizeof(box_label));
FILE *file = fopen(filename, "r");
if (!file) {
- printf("Can't open label file. \n");
- file_error(filename);
+ printf("Can't open label file. (This can be normal only if you use MSCOCO) \n");
+ //file_error(filename);
+ FILE* fw = fopen("bad.list", "a");
+ fwrite(filename, sizeof(char), strlen(filename), fw);
+ char *new_line = "\n";
+ fwrite(new_line, sizeof(char), strlen(new_line), fw);
+ fclose(fw);
+
+ *n = 0;
+ return boxes;
}
float x, y, h, w;
int id;
@@ -341,7 +350,7 @@
system(buff);
continue;
}
- if (x < 0 || x > 1 || y < 0 || y > 1) {
+ if (x <= 0 || x > 1 || y <= 0 || y > 1) {
printf("\n Wrong annotation: x = %f, y = %f \n", x, y);
sprintf(buff, "echo %s \"Wrong annotation: x = %f, y = %f\" >> bad_label.list", labelpath, x, y);
system(buff);
--
Gitblit v1.10.0