From 987448cad8c81fb145824632b5188a4c7e44a0a6 Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Sat, 28 Dec 2019 20:26:58 +0300 Subject: [PATCH] Minor fix --- src/classifier.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/classifier.c b/src/classifier.c index 5d8e6c70..a5f7e51e 100644 --- a/src/classifier.c +++ b/src/classifier.c @@ -1257,14 +1257,15 @@ void demo_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_ind printf("\033[2J"); printf("\033[1;1H"); #endif - printf("\rFPS: %.2f \t AVG_FPS = %.2f ", fps, avg_fps); + if (!benchmark) { - printf("\n"); + printf("\rFPS: %.2f (use -benchmark command line flag for correct measurement)\n", fps); for (i = 0; i < top; ++i) { int index = indexes[i]; printf("%.1f%%: %s\n", predictions[index] * 100, names[index]); } + printf("\n"); free_image(in_s); free_image(in); @@ -1272,6 +1273,9 @@ void demo_classifier(char *datacfg, char *cfgfile, char *weightfile, int cam_ind int c = wait_key_cv(10);// cvWaitKey(10); if (c == 27 || c == 1048603) break; } + else { + printf("\rFPS: %.2f \t AVG_FPS = %.2f ", fps, avg_fps); + } //gettimeofday(&tval_after, NULL); //timersub(&tval_after, &tval_before, &tval_result);