diff --git a/src/data.c b/src/data.c index 29c65d72..6d885b10 100644 --- a/src/data.c +++ b/src/data.c @@ -856,8 +856,10 @@ data load_data_detection(int n, char **paths, int m, int w, int h, int c, int bo } save_image(ai, buff); - show_image(ai, buff); - wait_until_press_key_cv(); + if (show_imgs == 1) { + show_image(ai, buff); + wait_until_press_key_cv(); + } printf("\nYou use flag -show_imgs, so will be saved aug_...jpg images. Click on window and press ESC button \n"); } @@ -951,8 +953,10 @@ data load_data_detection(int n, char **paths, int m, int w, int h, int c, int bo } show_image(sized, buff); - save_image(sized, buff); - wait_until_press_key_cv(); + if (show_imgs == 1) { + save_image(sized, buff); + wait_until_press_key_cv(); + } printf("\nYou use flag -show_imgs, so will be saved aug_...jpg images. Press Enter: \n"); getchar(); } diff --git a/src/detector.c b/src/detector.c index 3f980add..a1995ab3 100644 --- a/src/detector.c +++ b/src/detector.c @@ -127,6 +127,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i args.exposure = net.exposure; args.saturation = net.saturation; args.hue = net.hue; + if (dont_show && show_imgs) show_imgs = 2; args.show_imgs = show_imgs; #ifdef OPENCV