You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.1 KiB
74 lines
2.1 KiB
#ifndef USE_REID_H
|
|
#define USE_REID_H
|
|
|
|
#include <cmath>
|
|
#include <chrono>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include <opencv2/opencv.hpp>
|
|
#include "Net.h"
|
|
#include "AIT_GlobalStruct.h"
|
|
#include "guidePlat.h"
|
|
#include "gd_alg_type.h"
|
|
|
|
namespace GUD{
|
|
namespace ALG{
|
|
class NNIE_REID{
|
|
public:
|
|
explicit NNIE_REID(const gud_reid_config_t reidConf);
|
|
|
|
void Extract_REID_Featrue(GuideImage *pSrcImg, gud_rect_t tag, gud_reid_data_t *reidData);
|
|
|
|
void Init_Gallery_Featrue_Pools(GuideImage *pSrcImg, gud_rect_t tag);
|
|
|
|
void Clear_Gallery_Featrue_Pools();
|
|
|
|
void Clear_Gallery_SetIndx_Featrue_Pools(int setIdx);
|
|
|
|
void Compare_QueryToGallery(GuideImage *pSrcImg, gud_rect_t tag, gud_reid_result_t *reidRes);
|
|
|
|
float GetMold(float *vec, int feat_len);
|
|
|
|
float FloatFeatCompare(float *feat0, float *feat1);
|
|
|
|
void Dev_Malloc_ReidData(gud_reid_data_t *reid_obj);
|
|
|
|
void Dev_Free_ReidData(gud_reid_data_t *reid_obj);
|
|
|
|
void cvImageToTensor(const unsigned char* img_data, unsigned char* tensor,
|
|
int channels, int height, int width);
|
|
|
|
void showTensor(float *TensorIn, int len, int diff);
|
|
|
|
~NNIE_REID();
|
|
|
|
public:
|
|
int gallery_status_;
|
|
int gallery_num_;
|
|
GuideImage subImg;
|
|
GuideBuf tmpbuf_;
|
|
|
|
private:
|
|
nnie::Net reid_net_;
|
|
NpuTensor reid_output_;
|
|
NpuTensor outTnsr[2];
|
|
gud_reid_data_t query_obj_;
|
|
gud_reid_data_t *galleryPools_;
|
|
|
|
//cv::Mat xCrop_;
|
|
//GuideImage *fullImg;
|
|
//gud_reid_config_t conf_;
|
|
protected:
|
|
int setGalleyNum_;
|
|
int feat_len_;
|
|
int input_w_;
|
|
int input_h_;
|
|
int input_c_;
|
|
int input_size_;
|
|
float sim_thd_;
|
|
};
|
|
};
|
|
};
|
|
|
|
#endif //MAIN_APP_HI3559ANEW_USE_REID_H
|