From 497868ee45e6a27b7a3b2902e0349fa72782049b Mon Sep 17 00:00:00 2001 From: cmhu <2657262686@qq.com> Date: Tue, 7 Nov 2023 14:49:45 +0800 Subject: [PATCH] 修正调结果问题: tracker应该要用引用 --- vehicle_structure_platform.git0708-3080-trt-face/src/VPT/MutliSourceVideoProcess.cpp | 5 ----- vehicle_structure_platform.git0708-3080-trt-face/src/VPT/VPTProcess.cpp | 56 +++++++++++++++++++++----------------------------------- vehicle_structure_platform.git0708-3080-trt-face/src/VPT/snapshot_analysis/snapshot_helper.cpp | 14 +++++++------- 3 files changed, 28 insertions(+), 47 deletions(-) diff --git a/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/MutliSourceVideoProcess.cpp b/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/MutliSourceVideoProcess.cpp index 9a03dc0..46177e6 100644 --- a/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/MutliSourceVideoProcess.cpp +++ b/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/MutliSourceVideoProcess.cpp @@ -998,11 +998,6 @@ void CMutliSourceVideoProcess::algorthim_process() cudaFree(tasks[task_id].task_algorithm_data.frame); tasks[task_id].task_algorithm_data.frame = nullptr; } - - - for (int i = 0; i < deleteObjectID.size(); i++) - vector().swap(deleteObjectID[i]); - vector>().swap(deleteObjectID); m_snaphot_helper.object_attri_analysis(); cudaError_t cudaStatus = cudaGetLastError(); diff --git a/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/VPTProcess.cpp b/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/VPTProcess.cpp index 0b1e50d..3b071c1 100644 --- a/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/VPTProcess.cpp +++ b/vehicle_structure_platform.git0708-3080-trt-face/src/VPT/VPTProcess.cpp @@ -93,12 +93,11 @@ void VPTProcess::config_fpn_param(ctools_init_params& param, int batch_size) { void VPTProcess::config_yolo_param(ctools_init_params& param, int batch_size) { - param.model_type_ = MODEL_YOLOV5; // debug by zsh - + param.model_type_ = MODEL_YOLOV5; param.weight_file_ = NULL; param.net_file_ = NULL; - param.data_process_str_ = + param.data_process_str_ = //"CopyData_CPU2GPU_U8;" "TypeConvert_U8_F32;" "ResizeMaxMidPad_F32_F32,test_size,640,test_max_size,640,max_height,640,max_width,640," @@ -107,7 +106,7 @@ void VPTProcess::config_yolo_param(ctools_init_params& param, int batch_size) { "BGR2RGB_F32_F32;" "NHWC2NCHW_F32" ; - param.need_im_info_ = 0; + param.need_im_info_ = 0; if (param.engine_type_ == ENGINE_MCAFFE2) { @@ -135,10 +134,9 @@ void VPTProcess::config_yolo_param(ctools_init_params& param, int batch_size) { "output_names output", batch_size, g_data_mode.c_str(), g_is_create_calibrator, g_is_onnx_model); - param.tensorrt_calibrator_array_len_ = ga_trt_yolo_vpt_calibrator_len;// - param.tensorrt_calibrator_array_ = (unsigned char*)ga_trt_yolo_vpt_calibrator;// debug by zsh + param.tensorrt_calibrator_array_len_ = ga_trt_yolo_vpt_calibrator_len; + param.tensorrt_calibrator_array_ = (unsigned char*)ga_trt_yolo_vpt_calibrator; - // param.tensorrt_plugin_factory_ptr_ = &(tensorrt_plugin_factory); } } @@ -254,7 +252,7 @@ int VPTProcess::process(sy_img * batch_img, int batchsize, vector= 4 && snapShotInfo[newObj].index.index <= 6)) { @@ -2240,10 +2240,10 @@ CropInfo snapshot_helper::cacheSnapShotInfo(OBJ_KEY newObj, VPT_ObjInfo obj, Tas else if (1 == snapShotInfo[newObj].index.index || 2 == snapShotInfo[newObj].index.index) { // if(5 == newObj.videoID) - { - LOG_DEBUG("else , task_id:{} obj_id:{} index = {}", newObj.videoID, newObj.objID, snapShotInfo[newObj].index.index); - } - if (snapShotInfo[newObj].snapShotLittle.width != HCP_WIDTH || snapShotInfo[newObj].snapShotLittle.height != HCP_HEIGHT) + // { + // LOG_DEBUG("else , task_id:{} obj_id:{} index = {}", newObj.videoID, newObj.objID, snapShotInfo[newObj].index.index); + // } + // if (snapShotInfo[newObj].snapShotLittle.width != HCP_WIDTH || snapShotInfo[newObj].snapShotLittle.height != HCP_HEIGHT) { cudaFree(snapShotInfo[newObj].snapShotLittle.frame); //释放显存 cudaMalloc((void**)&snapShotInfo[newObj].snapShotLittle.frame, 3 * HCP_WIDTH * HCP_HEIGHT * sizeof(unsigned char)); -- libgit2 0.21.4