Changed class to class_id

This commit is contained in:
AlexeyAB
2018-03-01 15:14:58 +03:00
parent 17b22d7ce7
commit 35a66b73a2
9 changed files with 86 additions and 86 deletions

View File

@ -245,8 +245,8 @@ void print_imagenet_detections(FILE *fp, int id, box *boxes, float **probs, int
if (ymax > h) ymax = h;
for(j = 0; j < classes; ++j){
int class = j;
if (probs[i][class]) fprintf(fp, "%d %d %f %f %f %f %f\n", id, j+1, probs[i][class],
int class_id = j;
if (probs[i][class_id]) fprintf(fp, "%d %d %f %f %f %f %f\n", id, j+1, probs[i][class_id],
xmin, ymin, xmax, ymax);
}
}
@ -777,7 +777,7 @@ void validate_detector_map(char *datacfg, char *cfgfile, char *weightfile)
avg_precision += cur_precision;
}
avg_precision = avg_precision / 11;
printf("class = %d, name = %s, \t ap = %2.2f %% \n", i, names[i], avg_precision*100);
printf("class_id = %d, name = %s, \t ap = %2.2f %% \n", i, names[i], avg_precision*100);
mean_average_precision += avg_precision;
}