AlexeyAB
2018-05-20 4403e71b330b42d3cda1e0721fb645cf41bac14f
src/yolo_console_dll.cpp
@@ -28,7 +28,7 @@
#include "opencv2/core/version.hpp"
#ifndef CV_VERSION_EPOCH
#include "opencv2/videoio/videoio.hpp"
#define OPENCV_VERSION CVAUX_STR(CV_VERSION_MAJOR)""CVAUX_STR(CV_VERSION_MINOR)""CVAUX_STR(CV_VERSION_REVISION)
#define OPENCV_VERSION CVAUX_STR(CV_VERSION_MAJOR)"" CVAUX_STR(CV_VERSION_MINOR)"" CVAUX_STR(CV_VERSION_REVISION)
#pragma comment(lib, "opencv_world" OPENCV_VERSION ".lib")
#ifdef TRACK_OPTFLOW
#pragma comment(lib, "opencv_cudaoptflow" OPENCV_VERSION ".lib")
@@ -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);