From 92b25a72006a77073ee99dc69557ce0cde01cc3c Mon Sep 17 00:00:00 2001
From: iovodov <b@ovdv.ru>
Date: Thu, 03 May 2018 09:43:48 +0000
Subject: [PATCH] FIX #736: Detector does not draw rects for images with small resolutions
---
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