mirror of https://github.com/AlexeyAB/darknet.git
minor fix
This commit is contained in:
parent
d88a9eb0d9
commit
3902712947
10
src/image.c
10
src/image.c
|
@ -331,7 +331,15 @@ void draw_detections_v3(image im, detection *dets, int num, float thresh, char *
|
|||
int j;
|
||||
for (j = 0; j < classes; ++j) {
|
||||
if (selected_detections[i].det.prob[j] > thresh && j != best_class) {
|
||||
printf("%s: %.0f%%\n", names[j], selected_detections[i].det.prob[j] * 100);
|
||||
printf("%s: %.0f%%", names[j], selected_detections[i].det.prob[j] * 100);
|
||||
|
||||
if (ext_output)
|
||||
printf("\t(left_x: %4.0f top_y: %4.0f width: %4.0f height: %4.0f)\n",
|
||||
round((selected_detections[i].det.bbox.x - selected_detections[i].det.bbox.w / 2)*im.w),
|
||||
round((selected_detections[i].det.bbox.y - selected_detections[i].det.bbox.h / 2)*im.h),
|
||||
round(selected_detections[i].det.bbox.w*im.w), round(selected_detections[i].det.bbox.h*im.h));
|
||||
else
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -884,12 +884,13 @@ extern "C" void draw_detections_cv_v3(mat_cv* mat, detection *dets, int num, flo
|
|||
char buff[10];
|
||||
sprintf(buff, " (%2.0f%%)", dets[i].prob[j] * 100);
|
||||
strcat(labelstr, buff);
|
||||
printf("%s: %.0f%% ", names[j], dets[i].prob[j] * 100);
|
||||
}
|
||||
else {
|
||||
strcat(labelstr, ", ");
|
||||
strcat(labelstr, names[j]);
|
||||
printf(", %s: %.0f%% ", names[j], dets[i].prob[j] * 100);
|
||||
}
|
||||
printf("%s: %.0f%% ", names[j], dets[i].prob[j] * 100);
|
||||
}
|
||||
}
|
||||
if (class_id >= 0) {
|
||||
|
|
Loading…
Reference in New Issue