diff --git a/src/PicAnalysis.cpp b/src/PicAnalysis.cpp index 33d2649..eedd84f 100644 --- a/src/PicAnalysis.cpp +++ b/src/PicAnalysis.cpp @@ -17,43 +17,43 @@ int PicAnalysis::init(int dev_id) { int ret = SY_FAILED; - // ret = m_vehicle_analysis.init(dev_id, 16); - // if(0 != ret){ - // return -1; - // } - - // head_tail_param ht_param; - // ht_param.devId = dev_id; - // ht_param.max_batch = 16; - // ret = m_head_tail_algorithm.init(ht_param); - // if(0 != ret){ - // return -1; - // } - - // ret = m_clothes_algorithm.init(dev_id); - // if(0 != ret){ - // return -1; - // } - - // ret = m_human_algorithm.init(dev_id); - // if(0 != ret){ - // return -1; - // } - - // ret = m_human_car_algorithm.init(dev_id); - // if(0 != ret){ - // return -1; - // } - - // ret = m_motor_rainshed_algorithm.init(dev_id); - // if(0 != ret){ - // return -1; - // } - - // ret = m_motor_phone_algorithm.init(dev_id); - // if(0 != ret){ - // return -1; - // } + ret = m_vehicle_analysis.init(dev_id, 16); + if(0 != ret){ + return -1; + } + + head_tail_param ht_param; + ht_param.devId = dev_id; + ht_param.max_batch = 16; + ret = m_head_tail_algorithm.init(ht_param); + if(0 != ret){ + return -1; + } + + ret = m_clothes_algorithm.init(dev_id); + if(0 != ret){ + return -1; + } + + ret = m_human_algorithm.init(dev_id); + if(0 != ret){ + return -1; + } + + ret = m_human_car_algorithm.init(dev_id); + if(0 != ret){ + return -1; + } + + ret = m_motor_rainshed_algorithm.init(dev_id); + if(0 != ret){ + return -1; + } + + ret = m_motor_phone_algorithm.init(dev_id); + if(0 != ret){ + return -1; + } ret = m_road_seg_algorithm.init(dev_id); if(0 != ret){ @@ -105,24 +105,24 @@ int PicAnalysis::analysis_sync(vector vec_file_path){ vec_img.push_back(img); } - // m_vehicle_analysis.detect(vec_img); + m_vehicle_analysis.detect(vec_img); - // vector head_tail_result; - // ret = m_head_tail_algorithm.detect(vec_img, head_tail_result); - // if (0 != ret) { - // LOG_ERROR("m_head_tail_algorithm failed!"); - // head_tail_result.clear(); - // } + vector head_tail_result; + ret = m_head_tail_algorithm.detect(vec_img, head_tail_result); + if (0 != ret) { + LOG_ERROR("m_head_tail_algorithm failed!"); + head_tail_result.clear(); + } - // m_clothes_algorithm.detect(vec_img); + m_clothes_algorithm.detect(vec_img); - // m_human_algorithm.detect(vec_img); + m_human_algorithm.detect(vec_img); - // m_human_car_algorithm.detect(vec_img); + m_human_car_algorithm.detect(vec_img); - // m_motor_rainshed_algorithm.detect(vec_img); + m_motor_rainshed_algorithm.detect(vec_img); - // m_motor_phone_algorithm.detect(vec_img); + m_motor_phone_algorithm.detect(vec_img); m_road_seg_algorithm.detect(vec_img); diff --git a/src/ai_engine_module/RoadSegAnalysis.cpp b/src/ai_engine_module/RoadSegAnalysis.cpp index 1eed41b..a199f10 100644 --- a/src/ai_engine_module/RoadSegAnalysis.cpp +++ b/src/ai_engine_module/RoadSegAnalysis.cpp @@ -31,7 +31,7 @@ int RoadSegAnalysis::init(int devId){ int RoadSegAnalysis::detect(vector vec_img){ - ACL_CALL(aclrtSetCurrentContext(ctx), SY_SUCCESS, SY_FAILED); + ACL_CALL(aclrtSetCurrentContext(ctx), SY_SUCCESS, SY_FAILED); const int batchsize = vec_img.size(); rs_result results[batchsize]; diff --git a/src/main.cpp b/src/main.cpp index 3aa6c5b..8d77bea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,7 @@ int main() { pic_analysis.analysis_sync(vec_path); - while (getchar() != 'q'); + // while (getchar() != 'q'); return 0; } \ No newline at end of file