diff --git a/src/detector.c b/src/detector.c index aa9652d8..6e425df6 100644 --- a/src/detector.c +++ b/src/detector.c @@ -148,7 +148,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i int number_of_lines = 100; int img_size = 1000; char windows_name[100]; - sprintf(windows_name, "average loss (id:%d)", random_gen()); + sprintf(windows_name, "chart_%s.png", base); img = draw_train_chart(windows_name, max_img_loss, net.max_batches, number_of_lines, img_size, dont_show); #endif //OPENCV if (net.track) { diff --git a/src/image_opencv.cpp b/src/image_opencv.cpp index 2bda6934..afcd86ce 100644 --- a/src/image_opencv.cpp +++ b/src/image_opencv.cpp @@ -1120,6 +1120,7 @@ extern "C" void draw_train_loss(char *windows_name, mat_cv* img_src, int img_siz if (k == 's' || current_batch == (max_batches - 1) || (current_batch / 100 > old_batch / 100)) { old_batch = current_batch; save_mat_png(img, "chart.png"); + save_mat_png(img, windows_name); cv::putText(img, "- Saved", cv::Point(260, img_size - 10), cv::FONT_HERSHEY_COMPLEX_SMALL, 0.7, CV_RGB(255, 0, 0), 1, CV_AA); } else