派生自 Algorithm/baseDetector

bug
Scheaven
2021-06-17 0126e953b3f293b111179e4777103c64f778870c
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
//
// Created by Scheaven on 2019/11/19.
//
#ifndef DETECTER_MANAGER_H
#define DETECTER_MANAGER_H
#include "../config.h"
#include "../detecter_tools/yolo_v2_class.hpp"    // imported functions from DLL
#include "../utils/draw_util.h"
#include "../utils/config_util.h"
#include "../utils/time_util.h"
#include "../utils/result_util.h"
 
using namespace std;
 
class DetecterManager {
private:
    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);
    void init_target(Target *t);
 
public:
    static DetecterManager* instance;
    static DetecterManager* getInstance();
 
public:
    DetecterManager();
    ~DetecterManager();
    void release();
    void detecter_main(cv::Mat &mat_image, TResult &t_result);
    void ex_features(string in_path);
 
public:
    void encoder_features(std::vector<bbox_t> boxes, TResult &t_result);
 
};
 
 
#endif //INC_04_S_MUTICAM_TRACKING_DETECTER_MANAGER_H