Blame view

src/ai_engine_module/HumanParsing.h 1.73 KB
d5345ee9   Hu Chunming   代码优化
1
2
3
  #ifndef __AI_ENGINE_MODULE_HUMAN_PARSING__
  #define __AI_ENGINE_MODULE_HUMAN_PARSING__
  
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
4
5
6
7
8
9
10
11
12
13
  #include <vector>
  #include "acl/acl.h"
  #include "acl/ops/acl_dvpp.h"
  
  #include "human_parsing.h"
  
  #include "ai_engine_header.h"
  
  using namespace std;
  
502f9d10   Hu Chunming   添加行人特征数据表
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  //static std::string hair[] = { "长发", "短发", "其他" };
  //static std::string hair_color[] = { "黑", "白", "其他" };
  //static std::string eye_glass[] = { "未戴眼镜", "戴眼镜" };
  //static std::string mouth[] = { "未戴口罩", "戴口罩" };
  //static std::string up[] = { "T恤/背心", "衬衫",  "毛衣", "外套", "连衣裙", "其他" };
  //static std::string up_color[] = { "黑", "白", "灰", "红", "蓝", "黄", "绿", "多色", "其他" };
  //static std::string clothing_text[] = { "纯色", "碎花", "条纹/格子", "其他" };
  //static std::string down[] = { "长裤", "短裤", "长裙", "短裙", "连衣裙", "其他" };
  //static std::string down_color[] = { "黑", "白", "灰", "红", "蓝", "黄", "绿", "多色", "其他" };
  //static std::string bao[] = { "无包", "有包" };
  //static std::string sex[] = { "男", "女", "不明" };
  //static std::string age[] = { "小孩", "成人", "不明" };
  //static std::string viewpoint[] = { "正面","背面", "侧面" };
  //static std::string dasan[] = { "未打伞", "打伞" };
  //static std::string child[] = { "未抱小孩", "抱小孩" };
  //static std::string personstate[] = { "行走", "奔跑", "蹲坐", "推车", "其他" };
  
  
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  class HumanParsing
  {
  public:
      HumanParsing(/* args */);
      ~HumanParsing();
  
      int init(int dev_id, string model_dir);
  
      vector<hp_analysis_res> process(vector<DeviceMemory*> );
  
      void release();
  
  private:
      int m_devId; 
      aclrtContext m_algorthim_ctx;
      void* m_handle{nullptr};
d5345ee9   Hu Chunming   代码优化
48
49
50
  };
  
  #endif