PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.77k stars 2.88k forks source link

【目标跟踪系统PP-Tracking】pptracking\python\mot_jde_infer.py windows环境下 TensorRT无法使用 #7952

Closed qiulongquan closed 6 months ago

qiulongquan commented 1 year ago

问题确认 Search before asking

请提出你的问题 Please ask your question

目标跟踪系统PP-Tracking 在windows10 环境下 已经正确安装TensorRT 8.2(已经验证trt没有运行问题)

nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Sun_Mar_21_19:24:09_Pacific_Daylight_Time_2021 Cuda compilation tools, release 11.3, V11.3.58 Build cuda_11.3.r11.3/compiler.29745058_0

CUDA Version: 11.4 TensorRT 8.2

运行下面命令 python deploy/python/mot_jde_infer.py --model_dir=output_inference/fairmot_hrnetv2_w18_dlafpn_30e_576x320 --video_file='input/entrance_count_demo.mp4' --device=GPU --run_mode=trt_int8 --use_gpu=True --trt_calib_mode='True'

运行log Warning: Unable to use numba in PP-Tracking, please install numba, for example(python3.7): pip install numba==0.56.4 Warning: Unable to use numba in PP-Tracking, please install numba, for example(python3.7): pip install numba==0.56.4 Warning: Unable to use motmetrics in MTMCT in PP-Tracking, please install motmetrics, for example: pip install motmetrics, see https://github.com/longcw/py-motmetrics ----------- Running Arguments ----------- batch_size: 1 camera_id: -1 cpu_threads: 1 device: GPU do_break_in_counting: False do_entrance_counting: True draw_center_traj: False enable_mkldnn: False image_dir: None image_file: None model_dir: C:/Users/QLQ/Desktop/person_tracking/PaddleDetection/output_inference/fairmot_hrnetv2_w18_dlafpn_30e_576x320 mtmct_cfg: None mtmct_dir: None output_dir: C:/Users/QLQ/Desktop/person_tracking/PaddleDetection/deploy/pptracking/python/output region_polygon: [] region_type: horizontal reid_batch_size: 50 reid_model_dir: None run_benchmark: False run_mode: trt_int8 save_images: False save_mot_txt_per_img: False save_mot_txts: False scaled: False secs_interval: 2 skip_frame_num: -1 threshold: 0.5 tracker_config: None trt_calib_mode: True trt_max_shape: 1280 trt_min_shape: 1 trt_opt_shape: 640 use_dark: True use_gpu: True video_file: C:/Users/QLQ/Desktop/person_tracking/input/entrance_count_demo.mp4

----------- Model Configuration ----------- Model Arch: FairMOT Transform Order: --transform op: LetterBoxResize --transform op: NormalizeImage --transform op: Permute

W0315 20:04:37.106637 18304 analysis_predictor.cc:1391] The one-time configuration of analysis predictor failed, which may be due to native predictor called first and its configurations taken effect. I0315 20:04:37.333277 18304 analysis_predictor.cc:1099] TensorRT subgraph engine is enabled
e[1me[35m--- Running analysis [ir_graph_build_pass]e[0m e[1me[35m--- Running analysis [ir_graph_clean_pass]e[0m e[1me[35m--- Running analysis [ir_analysis_pass]e[0m e[32m--- Running IR pass [adaptive_pool2d_convert_global_pass]e[0m e[32m--- Running IR pass [shuffle_channel_detect_pass]e[0m e[32m--- Running IR pass [quant_conv2d_dequant_fuse_pass]e[0m e[32m--- Running IR pass [delete_fill_constant_op_pass]e[0m e[32m--- Running IR pass [delete_quant_dequant_op_pass]e[0m e[32m--- Running IR pass [delete_quant_dequant_filter_op_pass]e[0m e[32m--- Running IR pass [delete_weight_dequant_linear_op_pass]e[0m e[32m--- Running IR pass [delete_quant_dequant_linear_op_pass]e[0m e[32m--- Running IR pass [identity_scale_op_clean_pass]e[0m e[32m--- Running IR pass [add_support_int8_pass]e[0m I0315 20:04:50.536864 18304 fuse_pass_base.cc:59] --- detected 1259 subgraphs e[32m--- Running IR pass [simplify_with_basic_ops_pass]e[0m e[32m--- Running IR pass [trt_embedding_eltwise_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [preln_embedding_eltwise_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [delete_c_identity_op_pass]e[0m e[32m--- Running IR pass [trt_multihead_matmul_fuse_pass_v2]e[0m e[32m--- Running IR pass [trt_multihead_matmul_fuse_pass_v3]e[0m e[32m--- Running IR pass [vit_attention_fuse_pass]e[0m e[32m--- Running IR pass [trt_skip_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [preln_skip_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [preln_residual_bias_fuse_pass]e[0m e[32m--- Running IR pass [layernorm_shift_partition_fuse_pass]e[0m e[32m--- Running IR pass [unsqueeze2_eltwise_fuse_pass]e[0m e[32m--- Running IR pass [trt_squeeze2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [trt_flatten2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [trt_map_matmul_v2_to_mul_pass]e[0m e[32m--- Running IR pass [trt_map_matmul_v2_to_matmul_pass]e[0m e[32m--- Running IR pass [trt_map_matmul_to_mul_pass]e[0m e[32m--- Running IR pass [fc_fuse_pass]e[0m e[32m--- Running IR pass [conv_elementwise_add_fuse_pass]e[0m I0315 20:04:51.396709 18304 fuse_pass_base.cc:59] --- detected 8 subgraphs e[32m--- Running IR pass [remove_padding_recover_padding_pass]e[0m e[32m--- Running IR pass [delete_remove_padding_recover_padding_pass]e[0m e[32m--- Running IR pass [dense_fc_to_sparse_pass]e[0m e[32m--- Running IR pass [dense_multihead_matmul_to_sparse_pass]e[0m e[32m--- Running IR pass [constant_folding_pass]e[0m e[32m--- Running IR pass [tensorrt_subgraph_pass]e[0m I0315 20:04:54.621466 18304 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 1127 nodes I0315 20:04:55.037123 18304 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 33 nodes I0315 20:04:55.054240 18304 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 8 nodes I0315 20:04:55.062245 18304 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 8 nodes e[32m--- Running IR pass [conv_elementwise_add_act_fuse_pass]e[0m e[32m--- Running IR pass [conv_elementwise_add2_act_fuse_pass]e[0m e[32m--- Running IR pass [transpose_flatten_concat_fuse_pass]e[0m e[1me[35m--- Running analysis [ir_params_sync_among_devices_pass]e[0m I0315 20:04:55.216755 18304 ir_params_sync_among_devices_pass.cc:89] Sync params from CPU to GPU e[1me[35m--- Running analysis [adjust_cudnn_workspace_size_pass]e[0m e[1me[35m--- Running analysis [inference_op_replace_pass]e[0m e[1me[35m--- Running analysis [memory_optimize_pass]e[0m I0315 20:04:55.360163 18304 memory_optimize_pass.cc:219] Cluster name : unsqueeze2_0.tmp_0 size: 2000 I0315 20:04:55.362115 18304 memory_optimize_pass.cc:219] Cluster name : elementwise_div_1 size: 5898240 I0315 20:04:55.362115 18304 memory_optimize_pass.cc:219] Cluster name : scale_factor size: 8 I0315 20:04:55.363116 18304 memory_optimize_pass.cc:219] Cluster name : transpose_2.tmp_0 size: 5898240 I0315 20:04:55.363116 18304 memory_optimize_pass.cc:219] Cluster name : gather_0.tmp_0 size: 4000 I0315 20:04:55.363116 18304 memory_optimize_pass.cc:219] Cluster name : top_k_v2_1.tmp_1 size: 4000 I0315 20:04:55.364117 18304 memory_optimize_pass.cc:219] Cluster name : top_k_v2_0.tmp_1 size: 4000 I0315 20:04:55.364117 18304 memory_optimize_pass.cc:219] Cluster name : tmp_28 size: 2000
I0315 20:04:55.364117 18304 memory_optimize_pass.cc:219] Cluster name : cast_1.tmp_0 size: 2000 I0315 20:04:55.365113 18304 memory_optimize_pass.cc:219] Cluster name : im_shape size: 8
I0315 20:04:55.365113 18304 memory_optimize_pass.cc:219] Cluster name : tmp_21 size: 4
e[1me[35m--- Running analysis [ir_graph_to_program_pass]e[0m I0315 20:04:56.699422 18304 analysis_predictor.cc:1314] ======= optimize end ======= I0315 20:04:56.708664 18304 naive_executor.cc:110] --- skip [feed], feed -> scale_factor I0315 20:04:56.708664 18304 naive_executor.cc:110] --- skip [feed], feed -> image I0315 20:04:56.708664 18304 naive_executor.cc:110] --- skip [feed], feed -> im_shape I0315 20:04:56.722734 18304 naive_executor.cc:110] --- skip [concat_2.tmp_0], fetch -> fetch I0315 20:04:56.723734 18304 naive_executor.cc:110] --- skip [gather_5.tmp_0], fetch -> fetch fps: 30, frame_count: 149 Tracking frame: 0 W0315 20:04:56.819736 18304 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 11.4, Runtime API Version: 11.2 W0315 20:04:56.833734 18304 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2. I0315 20:04:56.835762 18304 tensorrt_engine_op.h:421] This process is generating calibration table for Paddle TRT int8...

没有任何报错,就直接停止了 _opt_cache 文件夹中没有生成 trt_int8 校准文件

请帮我分析一下 这个问题是由于什么原因导致的 如何处理 谢谢!!

nemonameless commented 1 year ago

请先按--device=GPU --run_mode=trt_int8 --use_gpu=True --trt_calib_mode='True'去测下纯检测模型这样是否可行,比如ppyoloe和centernet

nemonameless commented 1 year ago

CUDA_VISIBLE_DEVICES=0 python deploy/python/infer.py --model_dir=output_inference/centernet_dla34_140e_coco --image_file=demo/000000014439_640x640.jpg --device=GPU --run_mode=trt_int8 --use_gpu=True --trt_calib_mode='True

qiulongquan commented 1 year ago

CUDA_VISIBLE_DEVICES=0 python deploy/python/infer.py --model_dir=output_inference/centernet_dla34_140e_coco --image_file=demo/000000014439_640x640.jpg --device=GPU --run_mode=trt_int8 --use_gpu=True --trt_calib_mode='True

我执行了你提供的模型,并预测了demo/000000570688.jpg图片,和我上次结果一样,没有任何结果输出,没有任何错误显示,在This process is generating calibration table for Paddle TRT int8... 时候就自动停止了 下面是我的命令和生成的log (注:--use_gpu=True 这个参数在infer.py里面不能使用 只需要device=GPU就可以。centernet_dla34_140e_coco模型在CPU下正常输出结果没有问题,在--device=GPU --run_mode=paddle模式下也可以正常预测)

(fastdeploy) PS C:\Users\QLQ\Desktop\person_tracking\PaddleDetection> python deploy/python/infer.py --model_dir inference_model/centernet_dla34_140e_coco/ --device GPU --run_mode=trt_int8 --trt_calib_mode=True --output_dir output/ --image_file demo/000000570688.jpg ----------- Running Arguments ----------- action_file: None batch_size: 1 camera_id: -1 combine_method: nms cpu_threads: 1 device: GPU enable_mkldnn: False enable_mkldnn_bfloat16: False image_dir: None image_file: demo/000000570688.jpg match_metric: ios match_threshold: 0.6 model_dir: inference_model/centernet_dla34_140e_coco/ output_dir: output/ overlap_ratio: [0.25, 0.25] random_pad: False reid_batch_size: 50 reid_model_dir: None run_benchmark: False run_mode: trt_int8 save_images: True save_mot_txt_per_img: False save_mot_txts: False save_results: False scaled: False slice_infer: False slice_size: [640, 640] threshold: 0.5 tracker_config: None trt_calib_mode: True trt_max_shape: 1280 trt_min_shape: 1 trt_opt_shape: 640 use_coco_category: False use_dark: True use_gpu: False video_file: None window_size: 50

----------- Model Configuration ----------- Model Arch: CenterNet Transform Order: --transform op: WarpAffine --transform op: NormalizeImage --transform op: Permute

W0318 15:03:03.935951 15820 analysis_predictor.cc:1391] The one-time configuration of analysis predictor failed, which may be due to native predictor called first and its configurations taken effect. I0318 15:03:03.974990 15820 analysis_predictor.cc:1099] TensorRT subgraph engine is enabled e[1me[35m--- Running analysis [ir_graph_build_pass]e[0m e[1me[35m--- Running analysis [ir_graph_clean_pass]e[0m e[1me[35m--- Running analysis [ir_analysis_pass]e[0m e[32m--- Running IR pass [adaptive_pool2d_convert_global_pass]e[0m e[32m--- Running IR pass [shuffle_channel_detect_pass]e[0m e[32m--- Running IR pass [quant_conv2d_dequant_fuse_pass]e[0m e[32m--- Running IR pass [delete_fill_constant_op_pass]e[0m e[32m--- Running IR pass [delete_quant_dequant_op_pass]e[0m e[32m--- Running IR pass [delete_quant_dequant_filter_op_pass]e[0m e[32m--- Running IR pass [delete_weight_dequant_linear_op_pass]e[0m
e[32m--- Running IR pass [delete_quant_dequant_linear_op_pass]e[0m e[32m--- Running IR pass [identity_scale_op_clean_pass]e[0m e[32m--- Running IR pass [add_support_int8_pass]e[0m I0318 15:03:04.440726 15820 fuse_pass_base.cc:59] --- detected 398 subgraphs e[32m--- Running IR pass [simplify_with_basic_ops_pass]e[0m e[32m--- Running IR pass [trt_embedding_eltwise_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [preln_embedding_eltwise_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [delete_c_identity_op_pass]e[0m e[32m--- Running IR pass [trt_multihead_matmul_fuse_pass_v2]e[0m
e[32m--- Running IR pass [trt_multihead_matmul_fuse_pass_v3]e[0m e[32m--- Running IR pass [vit_attention_fuse_pass]e[0m e[32m--- Running IR pass [trt_skip_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [preln_skip_layernorm_fuse_pass]e[0m e[32m--- Running IR pass [preln_residual_bias_fuse_pass]e[0m e[32m--- Running IR pass [layernorm_shift_partition_fuse_pass]e[0m e[32m--- Running IR pass [unsqueeze2_eltwise_fuse_pass]e[0m e[32m--- Running IR pass [trt_squeeze2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [trt_flatten2_matmul_fuse_pass]e[0m e[32m--- Running IR pass [trt_map_matmul_v2_to_mul_pass]e[0m e[32m--- Running IR pass [trt_map_matmul_v2_to_matmul_pass]e[0m e[32m--- Running IR pass [trt_map_matmul_to_mul_pass]e[0m e[32m--- Running IR pass [fc_fuse_pass]e[0m e[32m--- Running IR pass [conv_elementwise_add_fuse_pass]e[0m I0318 15:03:04.660303 15820 fuse_pass_base.cc:59] --- detected 22 subgraphs e[32m--- Running IR pass [remove_padding_recover_padding_pass]e[0m e[32m--- Running IR pass [delete_remove_padding_recover_padding_pass]e[0m e[32m--- Running IR pass [dense_fc_to_sparse_pass]e[0m e[32m--- Running IR pass [dense_multihead_matmul_to_sparse_pass]e[0m
e[32m--- Running IR pass [constant_folding_pass]e[0m e[32m--- Running IR pass [tensorrt_subgraph_pass]e[0m I0318 15:03:04.885278 15820 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 227 nodes I0318 15:03:04.910732 15820 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 10 nodes I0318 15:03:04.913781 15820 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 46 nodes I0318 15:03:04.921743 15820 tensorrt_subgraph_pass.cc:244] --- detect a sub-graph with 10 nodes e[32m--- Running IR pass [conv_elementwise_add_act_fuse_pass]e[0m
e[32m--- Running IR pass [conv_elementwise_add2_act_fuse_pass]e[0m
e[32m--- Running IR pass [transpose_flatten_concat_fuse_pass]e[0m
e[1me[35m--- Running analysis [ir_params_sync_among_devices_pass]e[0m I0318 15:03:04.948736 15820 ir_params_sync_among_devices_pass.cc:89] Sync params from CPU to GPU e[1me[35m--- Running analysis [adjust_cudnn_workspace_size_pass]e[0m e[1me[35m--- Running analysis [inference_op_replace_pass]e[0m e[1me[35m--- Running analysis [memory_optimize_pass]e[0m I0318 15:03:05.025728 15820 memory_optimize_pass.cc:219] Cluster name : cast_0.tmp_0 size: 5242880 I0318 15:03:05.026731 15820 memory_optimize_pass.cc:219] Cluster name : tmp_1 size: 5242880 I0318 15:03:05.026731 15820 memory_optimize_pass.cc:219] Cluster name : gather_2.tmp_0 size: 800 I0318 15:03:05.026731 15820 memory_optimize_pass.cc:219] Cluster name : tmp_3 size: 800 I0318 15:03:05.026731 15820 memory_optimize_pass.cc:219] Cluster name : top_k_v2_1.tmp_1 size: 800 I0318 15:03:05.026731 15820 memory_optimize_pass.cc:219] Cluster name : tmp_31 size: 400 I0318 15:03:05.027729 15820 memory_optimize_pass.cc:219] Cluster name : unsqueeze2_1.tmp_0 size: 400 I0318 15:03:05.027729 15820 memory_optimize_pass.cc:219] Cluster name : scale_factor size: 8 I0318 15:03:05.027729 15820 memory_optimize_pass.cc:219] Cluster name : im_shape size: 8 I0318 15:03:05.027729 15820 memory_optimize_pass.cc:219] Cluster name : reshape2_2.tmp_0 size: 8 I0318 15:03:05.028728 15820 memory_optimize_pass.cc:219] Cluster name : tmp_20 size: 4 e[1me[35m--- Running analysis [ir_graph_to_program_pass]e[0m I0318 15:03:05.122763 15820 analysis_predictor.cc:1314] ======= optimize end ======= I0318 15:03:05.124728 15820 naive_executor.cc:110] --- skip [feed], feed -> scale_factor I0318 15:03:05.124728 15820 naive_executor.cc:110] --- skip [feed], feed -> image I0318 15:03:05.124728 15820 naive_executor.cc:110] --- skip [feed], feed -> im_shape I0318 15:03:05.126729 15820 naive_executor.cc:110] --- skip [concat_8.tmp_0], fetch -> fetch I0318 15:03:05.127732 15820 naive_executor.cc:110] --- skip [shape_5.tmp_0_slice_0], fetch -> fetch W0318 15:03:05.159763 15820 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 11.4, Runtime API Version: 11.2 W0318 15:03:05.174768 15820 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2. I0318 15:03:05.177757 15820 tensorrt_engine_op.h:421] This process is generating calibration table for Paddle TRT int8...

qiulongquan commented 1 year ago

请问 这个问题有更好的解决方法吗 我们着急等待解决方法呢 先谢谢各位大神了

qiulongquan commented 1 year ago

在ubuntu系统下可以正常使用tensorRT,采用trt_int8预测图片没有问题。暂时先用ubuntu吧,不清楚问什么windows有问题。谢谢各位了 Linux rnd-gs-1 4.15.0-206-generic #217-Ubuntu SMP Fri Feb 3 19:10:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Python 3.8.16 | packaged by conda-forge | (default, Feb 1 2023, 16:01:55) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import tensorrt print(tensorrt.version) 8.4.0.6 assert tensorrt.Builder(tensorrt.Logger())

(fastdeploy) ~/PaddleDetection$ cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2

define CUDNN_MAJOR 8

define CUDNN_MINOR 2

define CUDNN_PATCHLEVEL 1

--

define CUDNN_VERSION (CUDNN_MAJOR 1000 + CUDNN_MINOR 100 + CUDNN_PATCHLEVEL)

endif / CUDNN_VERSION_H /

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Fri_Dec_17_18:16:03_PST_2021 Cuda compilation tools, release 11.6, V11.6.55 Build cuda_11.6.r11.6/compiler.30794723_0

下面是执行log ----------- Running Arguments ----------- action_file: None batch_size: 1 camera_id: -1 combine_method: nms cpu_threads: 1 device: GPU enable_mkldnn: False enable_mkldnn_bfloat16: False image_dir: demo image_file: None match_metric: ios match_threshold: 0.6 model_dir: output_inference/ppyoloe_crn_s_300e_coco output_dir: output overlap_ratio: [0.25, 0.25] random_pad: False reid_batch_size: 50 reid_model_dir: None run_benchmark: False run_mode: trt_int8 save_images: True save_mot_txt_per_img: False save_mot_txts: False save_results: False scaled: False slice_infer: False slice_size: [640, 640] threshold: 0.5 tracker_config: None trt_calib_mode: True trt_max_shape: 1280 trt_min_shape: 1 trt_opt_shape: 640 use_coco_category: False use_dark: True use_gpu: True video_file: None window_size: 50

----------- Model Configuration ----------- Model Arch: YOLO Transform Order: --transform op: Resize --transform op: NormalizeImage --transform op: Permute

Found 12 inference images in total.

------------------ Inference Time Info ---------------------- total_time(ms): 855.9, img_num: 12 average latency time(ms): 71.33, QPS: 14.020329 preprocess_time(ms): 41.70, inference_time(ms): 29.60, postprocess_time(ms): 0.00

qiulongquan commented 1 year ago

在ubuntu 运行pp-tracking 后出现下面错误 运行环境: tensorrt 8.4.0.6 cuDNN Version: 8.2 nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Fri_Dec_17_18:16:03_PST_2021 Cuda compilation tools, release 11.6, V11.6.55 Build cuda_11.6.r11.6/compiler.30794723_0 tensorRT运行已经验证没有问题,现在运行pp-tracking 出现下面的错误。采用entrance_count_demo.mp4视频进行跟踪测试。 根据日志好像是维度转换错误,请问各位大神 这个是什么问题 ,应该如何解决 谢谢

$ python mot_jde_infer.py /home/seikoist-qiu/anaconda3/envs/fastdeploy/lib/python3.8/site-packages/pkg_resources/init.py:121: DeprecationWarning: pkg_resources is deprecated as an API warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning) /home/seikoist-qiu/anaconda3/envs/fastdeploy/lib/python3.8/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /home/seikoist-qiu/anaconda3/envs/fastdeploy/lib/python3.8/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) Warning: Unable to use JDE/FairMOT/ByteTrack, please install lap, for example: pip install lap, see https://github.com/gatagat/lap Warning: Unable to use OC-SORT, please install filterpy, for example: pip install filterpy, see https://github.com/rlabbe/filterpy Warning: Unable to use motmetrics in MTMCT in PP-Tracking, please install motmetrics, for example: pip install motmetrics, see https://github.com/longcw/py-motmetrics Warning: Unable to use MTMCT in PP-Tracking, please install sklearn, for example: pip install sklearn Warning: Unable to use MTMCT in PP-Tracking, please install sklearn, for example: pip install sklearn ----------- Running Arguments ----------- batch_size: 1 camera_id: -1 cpu_threads: 1 device: GPU do_break_in_counting: True do_entrance_counting: False draw_center_traj: True enable_mkldnn: False image_dir: None image_file: None model_dir: /home/seikoist-qiu/PaddleDetection/output_inference/fairmot_hrnetv2_w18_dlafpn_30e_576x320 mtmct_cfg: None mtmct_dir: None output_dir: /home/seikoist-qiu/PaddleDetection/output region_polygon: [780, 330, 1150, 330, 1150, 570, 780, 570] region_type: custom reid_batch_size: 50 reid_model_dir: None run_benchmark: False run_mode: trt_int8 save_images: False save_mot_txt_per_img: False save_mot_txts: False scaled: False secs_interval: 10 skip_frame_num: -1 threshold: 0.5 tracker_config: None trt_calib_mode: True trt_max_shape: 1280 trt_min_shape: 1 trt_opt_shape: 640 use_dark: True use_gpu: True video_file: /home/seikoist-qiu/PaddleDetection/input/entrance_count_demo.mp4

----------- Model Configuration ----------- Model Arch: FairMOT Transform Order: --transform op: LetterBoxResize --transform op: NormalizeImage --transform op: Permute

W0325 14:53:32.254097 68847 analysis_predictor.cc:1118] The one-time configuration of analysis predictor failed, which may be due to native predictor called first and its configurations taken effect. I0325 14:53:32.412621 68847 analysis_predictor.cc:881] TensorRT subgraph engine is enabled --- Running analysis [ir_graph_build_pass] --- Running analysis [ir_graph_clean_pass] --- Running analysis [ir_analysis_pass] --- Running IR pass [adaptive_pool2d_convert_global_pass] --- Running IR pass [shuffle_channel_detect_pass] --- Running IR pass [quant_conv2d_dequant_fuse_pass] --- Running IR pass [delete_quant_dequant_op_pass] --- Running IR pass [delete_quant_dequant_filter_op_pass] --- Running IR pass [delete_weight_dequant_linear_op_pass] --- Running IR pass [delete_quant_dequant_linear_op_pass] --- Running IR pass [add_support_int8_pass] I0325 14:53:46.017089 68847 fuse_pass_base.cc:57] --- detected 1263 subgraphs --- Running IR pass [simplify_with_basic_ops_pass] --- Running IR pass [embedding_eltwise_layernorm_fuse_pass] --- Running IR pass [preln_embedding_eltwise_layernorm_fuse_pass] --- Running IR pass [multihead_matmul_fuse_pass_v2] --- Running IR pass [multihead_matmul_fuse_pass_v3] --- Running IR pass [skip_layernorm_fuse_pass] --- Running IR pass [preln_skip_layernorm_fuse_pass] --- Running IR pass [unsqueeze2_eltwise_fuse_pass] --- Running IR pass [trt_squeeze2_matmul_fuse_pass] --- Running IR pass [trt_reshape2_matmul_fuse_pass] --- Running IR pass [trt_flatten2_matmul_fuse_pass] --- Running IR pass [trt_map_matmul_v2_to_mul_pass] --- Running IR pass [trt_map_matmul_v2_to_matmul_pass] --- Running IR pass [trt_map_matmul_to_mul_pass] --- Running IR pass [fc_fuse_pass] --- Running IR pass [conv_elementwise_add_fuse_pass] I0325 14:53:46.408970 68847 fuse_pass_base.cc:57] --- detected 8 subgraphs --- Running IR pass [tensorrt_subgraph_pass] I0325 14:53:47.562645 68847 tensorrt_subgraph_pass.cc:145] --- detect a sub-graph with 1127 nodes W0325 14:53:47.755862 68847 tensorrt_subgraph_pass.cc:374] The Paddle Inference library is compiled with 8 version TensorRT, but the runtime TensorRT you are using is 8.4 version. This might cause serious compatibility issues. We strongly recommend using the same TRT version at runtime. I0325 14:53:47.845490 68847 tensorrt_subgraph_pass.cc:145] --- detect a sub-graph with 32 nodes I0325 14:53:47.855068 68847 tensorrt_subgraph_pass.cc:145] --- detect a sub-graph with 25 nodes --- Running IR pass [conv_elementwise_add_act_fuse_pass] --- Running IR pass [conv_elementwise_add2_act_fuse_pass] --- Running IR pass [transpose_flatten_concat_fuse_pass] --- Running analysis [ir_params_sync_among_devices_pass] I0325 14:53:47.921360 68847 ir_params_sync_among_devices_pass.cc:100] Sync params from CPU to GPU --- Running analysis [adjust_cudnn_workspace_size_pass] --- Running analysis [inference_op_replace_pass] --- Running analysis [memory_optimize_pass] I0325 14:53:48.026532 68847 memory_optimize_pass.cc:216] Cluster name : fill_constant_3.tmp_0 size: 8 I0325 14:53:48.026553 68847 memory_optimize_pass.cc:216] Cluster name : im_shape size: 8 I0325 14:53:48.026556 68847 memory_optimize_pass.cc:216] Cluster name : tmp_5 size: 4000 I0325 14:53:48.026559 68847 memory_optimize_pass.cc:216] Cluster name : top_k_v2_1.tmp_1 size: 4000 I0325 14:53:48.026563 68847 memory_optimize_pass.cc:216] Cluster name : reshape2_5.tmp_1 size: 0 I0325 14:53:48.026566 68847 memory_optimize_pass.cc:216] Cluster name : scale_factor size: 8 I0325 14:53:48.026569 68847 memory_optimize_pass.cc:216] Cluster name : gather_0.tmp_0 size: 4000 I0325 14:53:48.026572 68847 memory_optimize_pass.cc:216] Cluster name : elementwise_div_1 size: 5898240 I0325 14:53:48.026576 68847 memory_optimize_pass.cc:216] Cluster name : transpose_2.tmp_0 size: 5898240 --- Running analysis [ir_graph_to_program_pass] I0325 14:53:48.749737 68847 analysis_predictor.cc:1035] ======= optimize end ======= I0325 14:53:48.794737 68847 naive_executor.cc:102] --- skip [feed], feed -> scale_factor I0325 14:53:48.794764 68847 naive_executor.cc:102] --- skip [feed], feed -> image I0325 14:53:48.794770 68847 naive_executor.cc:102] --- skip [feed], feed -> im_shape I0325 14:53:48.802505 68847 naive_executor.cc:102] --- skip [concat_2.tmp_0], fetch -> fetch I0325 14:53:48.802528 68847 naive_executor.cc:102] --- skip [gather_5.tmp_0], fetch -> fetch fps: 30, frame_count: 149 Tracking frame: 0 W0325 14:53:48.862004 68847 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.6, Runtime API Version: 11.2 W0325 14:53:48.864483 68847 gpu_resources.cc:91] device: 0, cuDNN Version: 8.2. I0325 14:53:48.869413 68847 tensorrt_engine_op.h:422] This process is generating calibration table for Paddle TRT int8... I0325 14:53:48.869959 69085 tensorrt_engine_op.h:294] Prepare TRT engine (Optimize model structure, Select OP kernel etc). This process may cost a lot of time. W0325 14:53:52.768520 69085 helper.h:107] TensorRT was linked against cuDNN 8.3.2 but loaded cuDNN 8.2.1 W0325 14:53:57.451269 69085 helper.h:107] TensorRT was linked against cuDNN 8.3.2 but loaded cuDNN 8.2.1 W0325 14:53:57.460517 69085 helper.h:107] TensorRT was linked against cuDNN 8.3.2 but loaded cuDNN 8.2.1 I0325 14:53:57.684039 69107 tensorrt_engine_op.h:294] Prepare TRT engine (Optimize model structure, Select OP kernel etc). This process may cost a lot of time. E0325 14:53:57.740598 69107 helper.h:111] 3: batchnorm_add_scale (Output: batch_norm_318.tmp_25158):shift weights has count 18 but 1 was expected E0325 14:53:57.740620 69107 helper.h:111] 3: batchnorm_add_scale (Output: batch_norm_318.tmp_25158):shift weights has count 18 but 1 was expected E0325 14:53:57.797207 69107 helper.h:111] 4: [graphShapeAnalyzer.cpp::analyzeShapes::1300] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer 14) [Shuffle]: reshape changes volume. Reshaping [18,18,80,144] to [1,1,1].) E0325 14:53:57.852206 69107 helper.h:111] 4: [graphShapeAnalyzer.cpp::analyzeShapes::1300] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer 14) [Shuffle]: reshape changes volume. Reshaping [18,18,80,144] to [1,1,1].) E0325 14:53:57.908993 69107 helper.h:111] 4: [graphShapeAnalyzer.cpp::analyzeShapes::1300] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer 14) [Shuffle]: reshape changes volume. Reshaping [18,18,80,144] to [1,1,1].) E0325 14:53:57.963779 69107 helper.h:111] 4: [graphShapeAnalyzer.cpp::analyzeShapes::1300] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer 14) [Shuffle]: reshape changes volume. Reshaping [18,18,80,144] to [1,1,1].) E0325 14:53:58.018690 69107 helper.h:111] 4: [graphShapeAnalyzer.cpp::analyzeShapes::1300] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer 14) [Shuffle]: reshape changes volume. Reshaping [18,18,80,144] to [1,1,1].) W0325 14:53:58.021021 69107 helper.h:107] Unused Input: relu_279.tmp_0_clone_0 E0325 14:53:58.075899 69107 helper.h:111] 4: [graphShapeAnalyzer.cpp::analyzeShapes::1300] Error Code 4: Miscellaneous (IShuffleLayer (Unnamed Layer 14) [Shuffle]: reshape changes volume. Reshaping [18,18,80,144] to [1,1,1].) E0325 14:53:58.098047 69107 helper.h:111] 4: [network.cpp::validate::2927] Error Code 4: Internal Error (Could not compute dimensions for conv2d_648.tmp_05163, because the network is not valid.) E0325 14:53:58.108924 69107 helper.h:111] 2: [builder.cpp::buildSerializedNetwork::619] Error Code 2: Internal Error (Assertion engine != nullptr failed. )

C++ Traceback (most recent call last):

0 std::thread::_State_impl<std::thread::_Invoker<std::tuple<paddle::operators::TensorRTEngineOp::RunCalibration(paddle::framework::Scope const&, phi::Place const&, paddle::inference::tensorrt::TensorRTEngine) const::{lambda()#1}> > >::_M_run() 1 paddle::operators::TensorRTEngineOp::PrepareTRTEngine(paddle::framework::Scope const&, paddle::inference::tensorrt::TensorRTEngine) const 2 paddle::inference::tensorrt::OpConverter::ConvertBlockToTRTEngine(paddle::framework::BlockDesc, paddle::framework::Scope const&, std::vector<std::string, std::allocator > const&, std::unordered_set<std::string, std::hash, std::equal_to, std::allocator > const&, std::vector<std::string, std::allocator > const&, paddle::inference::tensorrt::TensorRTEngine) 3 paddle::inference::tensorrt::TensorRTEngine::FreezeNetwork()

Error Message Summary:

FatalError: Segmentation fault is detected by the operating system. [TimeInfo: Aborted at 1679756038 (unix time) try "date -d @1679756038" if you are using GNU date ] [SignalInfo: SIGSEGV (@0x8) received by PID 68847 (TID 0x7fe475cb2700) from PID 8 ]

Segmentation fault (core dumped)

nemonameless commented 1 year ago

8003

nemonameless commented 1 year ago

建议换跟踪器的方案。bytetrack ocsort botsort之类的跟踪方案,只需要调整检测器的权重即可,默认检测器都是ppyoloe+

paddle-bot[bot] commented 6 months ago

Since this issue has not been updated for more than three months, it will be closed, if it is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。