Use -dont_show -show_imgs for Training - saves augmented images without showing

This commit is contained in:
AlexeyAB 2019-04-06 15:13:47 +03:00
parent 97679224ba
commit 71d20264d1
2 changed files with 9 additions and 4 deletions

View File

@ -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();
}

View File

@ -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