派生自 Algorithm/baseDetector

sunty
2022-03-21 d0a24896f95b4e060011852f80048ebfb0bf5f55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// 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