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.hpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/yolo_v2_class.hpp b/src/yolo_v2_class.hpp
index 68482e6..00c2a5b 100644
--- a/src/yolo_v2_class.hpp
+++ b/src/yolo_v2_class.hpp
@@ -446,7 +446,7 @@
 
 #ifdef OPENCV
 
-cv::Scalar obj_id_to_color(int obj_id) {
+static cv::Scalar obj_id_to_color(int obj_id) {
 	int const colors[6][3] = { { 1,0,1 },{ 0,0,1 },{ 0,1,1 },{ 0,1,0 },{ 1,1,0 },{ 1,0,0 } };
 	int const offset = obj_id * 123457 % 6;
 	int const color_scale = 150 + (obj_id * 123457) % 100;

--
Gitblit v1.10.0