reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-17 1bb4d137919cae4f57f95a2572ee612dcabb3b3d
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
#ifndef _sdk_reid_h_
#define _sdk_reid_h_
 
#include <torch/script.h>
 
class reid
{
private:
    bool is_gpu_;
    bool start_;
    torch::jit::script::Module module_;
public:
    explicit reid(const int gpu_index, const char *module_path);
    ~reid();
 
private: 
    int init(const int gpu_index, const char *module_path);
    void release();
public: 
    int extract(unsigned char *img, const int w, const int h, const int c, float *feature);
    float compare(const float *feat1, const float *feat2);
    int feat_size(){return 2048;}
};
 
 
#endif