HumanParsing.h 1.73 KB
#ifndef __AI_ENGINE_MODULE_HUMAN_PARSING__
#define __AI_ENGINE_MODULE_HUMAN_PARSING__

#include <vector>
#include "acl/acl.h"
#include "acl/ops/acl_dvpp.h"

#include "human_parsing.h"

#include "ai_engine_header.h"

using namespace std;

//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[] = { "行走", "奔跑", "蹲坐", "推车", "其他" };


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};
};

#endif