//
|
// Created by Scheaven on 2020/4/10.
|
//
|
|
#ifndef INC_01_CPP_SORT_FEATUREENCODER_H
|
#define INC_01_CPP_SORT_FEATUREENCODER_H
|
|
#include "model.h"
|
#include "../config.h"
|
#include "../utils/config_util.h"
|
#include "../utils/nvidia_gpu_util.h"
|
|
#define FEATURE_DIM 128
|
typedef unsigned char uint8;
|
|
|
class FeatureEncoder
|
{
|
public:
|
static FeatureEncoder* getInstance();
|
bool getRectsFeature(const cv::Mat& img, DETECTIONS& detections);
|
~FeatureEncoder();
|
void release();
|
|
private:
|
tensorflow::Session* session;
|
static FeatureEncoder* instance;
|
|
FeatureEncoder();
|
|
void mats_buffer(const std::vector<cv::Mat> &imgs, uint8 *buf);
|
std::vector<tensorflow::Tensor> output_tensors;
|
public:
|
void test();
|
};
|
|
#endif //INC_01_CPP_SORT_FEATUREENCODER_H
|