#include "VidClothes.h" VidClothes::VidClothes(/* args */) { } VidClothes::~VidClothes() { release(); } int VidClothes::init(int devId){ ACL_CALL(aclrtCreateContext(&ctx, devId), SY_SUCCESS, SY_FAILED); vidclothes_param param; param.modelNames = "./models/vid_clothes/vidClothes0325_310P.om"; param.thresld = 0.0; param.devId = devId; cout << "vidclothes_init start " << endl; int ret = vidclothes_init(&m_handle, param); if (ret != 0) { return -1; } cout << "vidclothes_init success " << endl; return SY_SUCCESS; } vector VidClothes::detect(vector vec_img){ vector vec_color; const int batchsize = vec_img.size(); vidclothes_result * results = new vidclothes_result[batchsize]; int ret = SY_FAILED; do { ret = aclrtSetCurrentContext(ctx); if (SY_SUCCESS != ret) { printf("aclrtSetCurrentContext failed!"); break; } ret = vidclothes_batch(m_handle, vec_img.data(), batchsize, results); if (SY_SUCCESS != ret) { printf("vidclothesClassification process failed!"); break; } for(int batchIdx = 0;batchIdx