From 15139eb6abd3c6c05a4046b5ac917de42c678827 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Tue, 24 Apr 2018 19:26:55 +0000
Subject: [PATCH] Fixed TP/FP/FN, IoU calculation for specified threshold

---
 src/image.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/image.c b/src/image.c
index 4821eff..61f760a 100644
--- a/src/image.c
+++ b/src/image.c
@@ -572,7 +572,7 @@
 	cvPutText(img, char_buff, pt1, &font, CV_RGB(0, 0, 0));
 	cvShowImage("average loss", img);
 	int k = cvWaitKey(20);
-	if (k == 's') cvSaveImage("chart.jpg", img, 0);
+	if (k == 's' || current_batch == (max_batches-1)) cvSaveImage("chart.jpg", img, 0);
 }
 #endif	// OPENCV
 

--
Gitblit v1.10.0