diff --git a/src/ai_engine_module/truck_manned_process.cpp b/src/ai_engine_module/truck_manned_process.cpp index 2062482..aee56b1 100644 --- a/src/ai_engine_module/truck_manned_process.cpp +++ b/src/ai_engine_module/truck_manned_process.cpp @@ -420,9 +420,21 @@ namespace ai_engine_module if (m_total_obj_info[trace_obj_key].center_points.size() > stop_check_frames) { float res_max_dist = 0; float total_dist = diff_car_pos(m_total_obj_info[trace_obj_key].center_points, stop_check_frames, res_max_dist); - if (res_max_dist < stop_min_move) continue; // 停车 + if (res_max_dist < stop_min_move) { // 停车 + VPCUtil::vpc_img_release(flattened_vpc_imgs[n]); //flattened_imgs[n].data_ + flattened_imgs[n].data_ = nullptr; + VPCUtil::vpc_img_release(flattened_vpc_vpose_imgs[n]); + flattened_vpose_imgs[n].data_ = nullptr; + continue; + } + } + else { + VPCUtil::vpc_img_release(flattened_vpc_imgs[n]); //flattened_imgs[n].data_ + flattened_imgs[n].data_ = nullptr; + VPCUtil::vpc_img_release(flattened_vpc_vpose_imgs[n]); + flattened_vpose_imgs[n].data_ = nullptr; + continue; } - else continue; } //vpose=========================================================== diff --git a/src/ai_platform/MultiSourceProcess.cpp b/src/ai_platform/MultiSourceProcess.cpp index f4f3651..7b81e89 100755 --- a/src/ai_platform/MultiSourceProcess.cpp +++ b/src/ai_platform/MultiSourceProcess.cpp @@ -1029,7 +1029,7 @@ int CMultiSourceProcess::algorthim_vpt(vector vec_gpuMem){ algorithm_traffic_light_process(vpt_interest_task_id, vec_vptMem, vptResult); // 与道路分割相关的算法 algorithm_roadseg_correlation_process(vpt_interest_task_id, vec_vptMem, vptResult); - village_snapshot(vpt_interest_task_id, vec_vptMem, deleteObjectID); + village_snapshot(vpt_interest_task_id, vec_vptMem, deleteObjectID); #endif vptResult.clear(); @@ -1763,7 +1763,7 @@ void CMultiSourceProcess::village_snapshot(vector& vpt_interest_task_id, auto json_str = helpers::gen_json::gen_manned_json(obj_key.video_id, obj_key.obj_id, result->box, motorhs_algor.at(idx)); save_snapshot_process(obj_key, motorhs_algor.at(idx), src_img, roi_img, 0, json_str); } else { - VPCUtil::vpc_img_release(src_img); VPCUtil::vpc_img_release(roi_img); + VPCUtil::vpc_img_release(src_img); VPCUtil::vpc_img_release(roi_img); } } @@ -1811,8 +1811,8 @@ void CMultiSourceProcess::village_snapshot(vector& vpt_interest_task_id, if (save_single_algor_pic) { auto json_str = helpers::gen_json::gen_manned_json(obj_key.video_id, obj_key.obj_id, result->box, algorithm_type_t::NONMOTOR_VEHICLE_REFIT); save_snapshot_process(obj_key, algorithm_type_t::NONMOTOR_VEHICLE_REFIT, src_img, roi_img, 0, json_str); - } else { - VPCUtil::vpc_img_release(src_img); VPCUtil::vpc_img_release(roi_img); + } else { + VPCUtil::vpc_img_release(src_img); VPCUtil::vpc_img_release(roi_img); } } diff --git a/src/demo/demo.cpp b/src/demo/demo.cpp index ccb52f0..8ee9f53 100755 --- a/src/demo/demo.cpp +++ b/src/demo/demo.cpp @@ -1038,7 +1038,10 @@ void test_gpu(int gpuID){ std::vector algor_vec2 = {algorithm_type_t::NONMOTOR_VEHICLE_NOHELMET, algorithm_type_t::NONMOTOR_VEHICLE_OVERMAN, algorithm_type_t::TRICYCLE_MANNED, algorithm_type_t::TRUCK_MANNED, algorithm_type_t::NONMOTOR_VEHICLE_USEPHONE, algorithm_type_t::NONMOTOR_VEHICLE_REFIT, algorithm_type_t::PERSON_RUNNING_REDLIGHTS, algorithm_type_t::NONMOTOR_RUNNING_REDLIGHTS, algorithm_type_t::PERSON_IN_VEHICLELANE, algorithm_type_t::NONMOTOR_IN_VEHICLELANE, algorithm_type_t::NONMOTOR_CEOSSPARKLINE, algorithm_type_t::PERSON_CROSS, algorithm_type_t::NONMOTOR_WRONGDIRECTION, algorithm_type_t::VEHICLE_WRONGDIRECTION, algorithm_type_t::VEHICLE_NOTGIVEWAY}; - std::vector algor_vec3 = {algorithm_type_t::PERSON_RUNNING_REDLIGHTS, algorithm_type_t::NONMOTOR_RUNNING_REDLIGHTS}; + std::vector algor_vec3 = {algorithm_type_t::NONMOTOR_VEHICLE_NOHELMET, algorithm_type_t::NONMOTOR_VEHICLE_OVERMAN, algorithm_type_t::TRICYCLE_MANNED, algorithm_type_t::TRUCK_MANNED, algorithm_type_t::NONMOTOR_VEHICLE_USEPHONE, + algorithm_type_t::NONMOTOR_VEHICLE_REFIT, algorithm_type_t::PERSON_RUNNING_REDLIGHTS, algorithm_type_t::NONMOTOR_RUNNING_REDLIGHTS}; + // std::vector algor_vec3 = {algorithm_type_t::NONMOTOR_VEHICLE_NOHELMET, algorithm_type_t::NONMOTOR_VEHICLE_OVERMAN, algorithm_type_t::TRICYCLE_MANNED, algorithm_type_t::NONMOTOR_VEHICLE_USEPHONE, + // algorithm_type_t::NONMOTOR_VEHICLE_REFIT}; /* int repeat_num = 1000; @@ -1060,7 +1063,7 @@ void test_gpu(int gpuID){ // createTask(handle, algor_vec, 1); // createTask(handle, algor_vec, 2); // createTask(handle, algor_vec, 3); - createTask(handle, algor_vec2, 4); + // createTask(handle, algor_vec3, 4); createTask(handle, algor_vec2, 5); createTask(handle, algor_vec2, 6); createTask(handle, algor_vec2, 7); @@ -1072,10 +1075,10 @@ void test_gpu(int gpuID){ createTask(handle, algor_vec2, 13); createTask(handle, algor_vec2, 14); createTask(handle, algor_vec2, 15); - createTask(handle, algor_vec2, 16); - createTask(handle, algor_vec2, 17); - createTask(handle, algor_vec2, 18); - createTask(handle, algor_vec2, 19); + // createTask(handle, algor_vec2, 16); + // createTask(handle, algor_vec2, 17); + // createTask(handle, algor_vec2, 18); + // createTask(handle, algor_vec2, 19); // createTask(handle, algor_vec2, 20); // createTask(handle, algor_vec2, 21); // createTask(handle, algor_vec2, 22);