From a2f3644e87c11c222f86aa2aeb0e31d858ebb024 Mon Sep 17 00:00:00 2001
From: Alexey <AlexeyAB@users.noreply.github.com>
Date: Sat, 21 Apr 2018 20:56:46 +0000
Subject: [PATCH] Merge pull request #675 from IlyaOvodov/Flip_Fix
---
src/yolo_console_dll.cpp | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/yolo_console_dll.cpp b/src/yolo_console_dll.cpp
index 3a49794..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,12 +457,18 @@
}
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);
- result_vec = detector.tracking_id(result_vec); // comment it - if track_id is not required
+ 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);
- cv::waitKey(3); // 3 or 16ms
show_console_result(result_vec, obj_names);
+ cv::waitKey(0);
}
#else
//std::vector<bbox_t> result_vec = detector.detect(filename);
--
Gitblit v1.10.0