mirror of https://github.com/AlexeyAB/darknet.git
Avg-loss will be saved to the 2 images: chart.png & chart_your_cfg_name.png
This commit is contained in:
parent
719180e7f1
commit
81c5bcea92
|
@ -148,7 +148,7 @@ void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, i
|
||||||
int number_of_lines = 100;
|
int number_of_lines = 100;
|
||||||
int img_size = 1000;
|
int img_size = 1000;
|
||||||
char windows_name[100];
|
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);
|
img = draw_train_chart(windows_name, max_img_loss, net.max_batches, number_of_lines, img_size, dont_show);
|
||||||
#endif //OPENCV
|
#endif //OPENCV
|
||||||
if (net.track) {
|
if (net.track) {
|
||||||
|
|
|
@ -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)) {
|
if (k == 's' || current_batch == (max_batches - 1) || (current_batch / 100 > old_batch / 100)) {
|
||||||
old_batch = current_batch;
|
old_batch = current_batch;
|
||||||
save_mat_png(img, "chart.png");
|
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);
|
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
|
else
|
||||||
|
|
Loading…
Reference in New Issue