派生自 Algorithm/baseDetector

Scheaven
2021-06-03 168af40fe9a3cc81c6ee16b3e81f154780c36bdb
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
47
48
49
50
51
52
53
54
55
56
57
//
// Created by Scheaven on 2020/3/24.
//
 
#ifndef INC_01_CPP_SORT_CONFIG_H
#define INC_01_CPP_SORT_CONFIG_H
 
#include <opencv2/opencv.hpp>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <map>
#include <string>
#include <list>
#include <algorithm>
#include <fstream>
#include <stdint.h>
#include <vector>
#include <thread>
#include <json/json.h>
#include "time.h"
#include "stdio.h"
#include "stdlib.h"
#include <iostream>
#include <sys/time.h>
 
 
//#define TRACHER_MODEL "../model_dump/tracker.pb"  // 追踪模型
//#define COCO_FILE "../cfg/coco.names"
//#define YOLO3_CFG "../cfg/yolov4.cfg"
//#define YOLO3_WEIGHTS "../model_dump/yolov4.weights"
//#define DETECT_GPU_ID 0  //检测模型的GPU
//#define TRACHER_GPU_ID "/gpu:0" //追踪模型的GPU
typedef unsigned char BYTE;
 
typedef int (*fn)(void* args, const char* sender_chan, const int sender_len, const char *recver, const int recver_len, const char *data, const int len);
 
const int nn_budget=100;
const float max_cosine_distance=0.2;
 
#define NN_BUDGET 100  // 保存特征的长度,,如果发生遮挡,会进入旧的特征进行匹配
#define MAX_COSINE_DISTANCE 0.2 //相似的最大COS距离
#define MAX_IOU_DISTANCE 0.7 // 匹配的最大IOU重合度
#define MAX_AGE 150  // 遮挡等待帧数
#define MAX_OUT_TIME 20.0  // 遮挡等待时间
#define N_INIT 0
 
#define MODEL_PATH "../model_dump/reid_model.pt"
#define OUTPUT_DIR "./logs"
#define GPU_ID 0                            //gpu id 0代表第一块可见gpu
#define REID_DISTANCE_THRESHOLD 95000000 //特征库
#define HUMAN_CONFIG_THRESHOLD 0.8
#define REID_MATCH_TIME_THRESHOLD 10000  // 重识别轨迹重复的强制匹配时长
#define GLOBALTRACKING false
 
 
 
#endif //INC_01_CPP_SORT_CONFIG_H