From cdd1cb0e8c4fda3671714bb5ad6ba1825cff16d1 Mon Sep 17 00:00:00 2001
From: Puneet Kohli <punkohl@gmail.com>
Date: Sun, 06 May 2018 21:45:26 +0000
Subject: [PATCH] Change matplotlib backend to 'agg' when 'show_plot' is false. This allows the script to be run from command line without any errors (for ex, on a remote machine)

---
 src/yolo_v2_class.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/yolo_v2_class.cpp b/src/yolo_v2_class.cpp
index be1b4ee..03d581a 100644
--- a/src/yolo_v2_class.cpp
+++ b/src/yolo_v2_class.cpp
@@ -69,6 +69,7 @@
 	}
 	set_batch_network(&net, 1);
 	net.gpu_index = cur_gpu_id;
+	fuse_conv_batchnorm(net);
 
 	layer l = net.layers[net.n - 1];
 	int j;
@@ -221,7 +222,7 @@
 	int letterbox = 0;
 	float hier_thresh = 0.5;
 	detection *dets = get_network_boxes(&net, im.w, im.h, thresh, hier_thresh, 0, 1, &nboxes, letterbox);
-	if (nms) do_nms_sort_v3(dets, nboxes, l.classes, nms);
+	if (nms) do_nms_sort(dets, nboxes, l.classes, nms);
 
 	std::vector<bbox_t> bbox_vec;
 

--
Gitblit v1.10.0