forked from linghu8812/tensorrt_inference
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mmpose.h
31 lines (25 loc) · 878 Bytes
/
mmpose.h
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
#ifndef MMPOSE_TRT_MMPOSE_H
#define MMPOSE_TRT_MMPOSE_H
#include "model.h"
class mmpose : public Model
{
struct KeyPoint{
int x;
int y;
int number;
float prob;
};
public:
mmpose(const std::string &config_file);
~mmpose();
bool InferenceFolder(const std::string &folder_name) override;
private:
void EngineInference(const std::vector<std::string> &image_list, const int &outSize,void **buffers,
const std::vector<int64_t> &bufferSize, cudaStream_t stream) override;
std::vector<float> prepareImage(std::vector<cv::Mat> & vec_img) override;
std::vector<std::vector<KeyPoint>> postProcess(const std::vector<cv::Mat> &vec_Mat, float *output, const int &outSize);
int num_key_points;
std::vector<std::vector<int>> skeleton;
float point_thresh;
};
#endif //MMPOSE_TRT_MMPOSE_H