//
|
// Created by Scheaven on 2019/11/19.
|
//
|
#ifndef DETECTER_MANAGER_H
|
#define DETECTER_MANAGER_H
|
#include "../config.h"
|
#include "../tracker_tools/model.h"
|
#include "../utils/draw_util.h"
|
// #include "../utils/config_util.h"
|
#include "../utils/time_util.h"
|
#include "../std_target.h"
|
#include "class_detector.h"
|
|
using namespace std;
|
|
class DetecterManager {
|
private:
|
std::vector<cv::Rect> boxes;
|
std::shared_ptr<Detector> detector;
|
|
struct timeval sys_t1, sys_t2, diff1;
|
// Detector detector("../cfg/yolov3.cfg", "../model_dump/yolov3.weights");
|
// bool sort_score(bbox_t box1, bbox_t box2);
|
// float box_iou(bbox_t box1, bbox_t box2);
|
|
|
public:
|
static DetecterManager* instance;
|
static DetecterManager* getInstance();
|
long img_time;
|
|
public:
|
DetecterManager();
|
~DetecterManager();
|
void release();
|
void detecter_main(cv::Mat &mat_image, DETECTIONS& detection);
|
void ex_features(string in_path);
|
|
public:
|
void encoder_features(std::vector<BatchResult> boxes, DETECTIONS& detection);
|
void set_imgTime(long img_time);
|
|
};
|
|
|
#endif //INC_04_S_MUTICAM_TRACKING_DETECTER_MANAGER_H
|