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_console_dll.cpp | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/yolo_console_dll.cpp b/src/yolo_console_dll.cpp
index 2e26a50..ea4330e 100644
--- a/src/yolo_console_dll.cpp
+++ b/src/yolo_console_dll.cpp
@@ -226,9 +226,9 @@
int main(int argc, char *argv[])
{
- std::string names_file = "data/voc.names";
- std::string cfg_file = "cfg/yolo-voc.cfg";
- std::string weights_file = "yolo-voc.weights";
+ std::string names_file = "data/coco.names";
+ std::string cfg_file = "cfg/yolov3.cfg";
+ std::string weights_file = "yolov3.weights";
std::string filename;
if (argc > 4) { //voc.names yolo-voc.cfg yolo-voc.weights test.mp4
@@ -457,7 +457,13 @@
}
else { // image file
cv::Mat mat_img = cv::imread(filename);
+
+ auto start = std::chrono::steady_clock::now();
std::vector<bbox_t> result_vec = detector.detect(mat_img);
+ auto end = std::chrono::steady_clock::now();
+ std::chrono::duration<double> spent = end - start;
+ std::cout << " Time: " << spent.count() << " sec \n";
+
//result_vec = detector.tracking_id(result_vec); // comment it - if track_id is not required
draw_boxes(mat_img, result_vec, obj_names);
cv::imshow("window name", mat_img);
--
Gitblit v1.10.0