diff --git a/test_tipc/configs/mot/ocsort_ppyoloe_train_infer_python.txt b/test_tipc/configs/mot/ocsort_ppyoloe_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..1aaaaf5a0bae6d13d6fe105e324dec75b30a26bc --- /dev/null +++ b/test_tipc/configs/mot/ocsort_ppyoloe_train_infer_python.txt @@ -0,0 +1,60 @@ +===========================train_params=========================== +model_name:ocsort_ppyoloe +python:python3.7 +gpu_list:0|0,1 +use_gpu:True +auto_cast:null +epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=30 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=4 +pretrain_weights:null +trained_model_name:model_final.pdparams +train_infer_img_dir:./dataset/mot/test.mp4 +filename:null +## +trainer:norm_train +norm_train:tools/train.py -c configs/mot/ocsort/ocsort_ppyoloe.yml -o +pact_train:tools/train.py -c configs/mot/ocsort/ocsort_ppyoloe.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/mot/ocsort/ocsort_ppyoloe.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval_mot.py -c configs/mot/ocsort/ocsort_ppyoloe.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://bj.bcebos.com/v1/paddledet/models/mot/ppyoloe_crn_l_36e_640x640_mot17half.pdparams +norm_export:tools/export_model.py -c configs/mot/bytetrack/detector/ppyoloe_crn_l_36e_640x640_mot17half.yml -o +pact_export:tools/export_model.py -c configs/mot/bytetrack/detector/ppyoloe_crn_l_36e_640x640_mot17half.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/mot/bytetrack/detector/ppyoloe_crn_l_36e_640x640_mot17half.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c configs/mot/ocsort/ocsort_ppyoloe.yml --slim_config _template_kl_quant -o +## +infer_mode:norm +infer_quant:False +inference:./deploy/pptracking/python/mot_sde_infer.py --tracker_config deploy/pptracking/python/tracker_config.yml +--device:gpu +--enable_mkldnn:False +--cpu_threads:4 +--batch_size:1|2 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--video_file:./dataset/mot/test.mp4 +--save_log_path:null +--run_benchmark:False +--trt_max_shape:1600 +===========================train_benchmark_params========================== +batch_size:4|12 +fp_items:fp32|fp16 +epoch:1 +repeat:1 +--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile +flags:null +===========================infer_benchmark_params=========================== +numpy_infer_input:3x640x640.npy \ No newline at end of file diff --git a/test_tipc/configs/pipeline/pphuman_linux_gpu_normal_normal_pipeline_python_linux_gpu_cpu.txt b/test_tipc/configs/pipeline/pphuman_linux_gpu_normal_normal_pipeline_python_linux_gpu_cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..ea8ad6b77850c1647ad2965506b4ff95ccaef884 --- /dev/null +++ b/test_tipc/configs/pipeline/pphuman_linux_gpu_normal_normal_pipeline_python_linux_gpu_cpu.txt @@ -0,0 +1,13 @@ +===========================pipeline_infer_python_params=========================== +model_name:pphuman +python:python3.7 +filename:null +## +infer_mode:norm +input_list:image|video +use_gpu:True +inference:deploy/pipeline/pipeline.py --config=deploy/pipeline/config/infer_cfg_pphuman.yml +--device:cpu|gpu +--image_file:./demo/000000014439.jpg +--video_file:./dataset/mot/test.mp4 + diff --git a/test_tipc/configs/pipeline/ppvehicle_linux_gpu_normal_normal_pipeline_python_linux_gpu_cpu.txt b/test_tipc/configs/pipeline/ppvehicle_linux_gpu_normal_normal_pipeline_python_linux_gpu_cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..0914bb237bbdcb02d9d86494560c9f6f317c11cd --- /dev/null +++ b/test_tipc/configs/pipeline/ppvehicle_linux_gpu_normal_normal_pipeline_python_linux_gpu_cpu.txt @@ -0,0 +1,13 @@ +===========================pipeline_infer_python_params=========================== +model_name:ppvehicle +python:python3.7 +filename:null +## +infer_mode:norm +input_list:image|video +use_gpu:True +inference:deploy/pipeline/pipeline.py --config=deploy/pipeline/config/infer_cfg_ppvehicle.yml +--device:cpu|gpu +--image_file:./demo/000000014439.jpg +--video_file:./dataset/mot/test.mp4 + diff --git a/test_tipc/configs/ppyoloe/ppyoloe+/ppyoloe_plus_crn_s_80e_coco_train_infer_python.txt b/test_tipc/configs/ppyoloe/ppyoloe+/ppyoloe_plus_crn_s_80e_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..be02ebb97891624fd776ed3e43d657674485bd6f --- /dev/null +++ b/test_tipc/configs/ppyoloe/ppyoloe+/ppyoloe_plus_crn_s_80e_coco_train_infer_python.txt @@ -0,0 +1,60 @@ +===========================train_params=========================== +model_name:ppyoloe_plus_crn_s_80e_coco +python:python3.7 +gpu_list:0|0,1 +use_gpu:True +auto_cast:null +epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=300 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=2 +pretrain_weights:https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_80e_coco.pdparams +trained_model_name:model_final.pdparams +train_infer_img_dir:./dataset/coco/test2017/ +filename:null +## +trainer:norm_train +norm_train:tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml -o +pact_train:tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_s_80e_coco.pdparams +norm_export:tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml -o +pact_export:tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c configs/ppyoloe/ppyoloe_plus_crn_s_80e_coco.yml --slim_config configs/slim/post_quant/ppyoloe_crn_s_300e_coco_ptq.yml -o +## +infer_mode:norm|kl_quant +infer_quant:False|True +inference:./deploy/python/infer.py +--device:gpu|cpu +--enable_mkldnn:False +--cpu_threads:4 +--batch_size:1|2 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/coco/test2017/ +--save_log_path:null +--run_benchmark:False +--trt_max_shape:1600 +===========================train_benchmark_params========================== +batch_size:8 +fp_items:fp32|fp16 +epoch:1 +repeat:12 +--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile +flags:null +===========================infer_benchmark_params=========================== +numpy_infer_input:3x640x640.npy \ No newline at end of file diff --git a/test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml b/test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml new file mode 100644 index 0000000000000000000000000000000000000000..8935ce70926ef341823d4513c94c60fa4b3115fb --- /dev/null +++ b/test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml @@ -0,0 +1,9 @@ +_BASE_: [ + '../../../../configs/datasets/spine_coco.yml', + '../../../../configs/runtime.yml', + '../../../../configs/rotate/fcosr/_base_/optimizer_3x.yml', + '../../../../configs/rotate/fcosr/_base_/fcosr_reader.yml', + '../../../../configs/rotate/fcosr/_base_/fcosr_x50.yml' +] + +weights: output/fcosr_x50_3x_dota/model_final diff --git a/test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco_train_infer_python.txt b/test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..30e08fce21807b8881cb10b8355f78d03f33595b --- /dev/null +++ b/test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco_train_infer_python.txt @@ -0,0 +1,53 @@ +===========================train_params=========================== +model_name:fcosr_x50_3x_spine_coco +python:python3.7 +gpu_list:0|0,1 +use_gpu:True +auto_cast:null +epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=12 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=1 +pretrain_weights:https://paddledet.bj.bcebos.com/models/fcosr_x50_3x_dota.pdparams +trained_model_name:model_final.pdparams +train_infer_img_dir:./dataset/spine_coco/test/ +filename:null +## +trainer:norm_train +norm_train:tools/train.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml -o +pact_train:tools/train.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://paddledet.bj.bcebos.com/models/fcosr_x50_3x_dota.pdparams +norm_export:tools/export_model.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml -o +pact_export:tools/export_model.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c test_tipc/configs/rotate/fcosr/fcosr_x50_3x_spine_coco.yml --slim_config _template_kl_quant -o +## +infer_mode:norm +infer_quant:False +inference:./deploy/python/infer.py +--device:gpu|cpu +--enable_mkldnn:False +--cpu_threads:4 +--batch_size:1 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/spine_coco/test/ +--save_log_path:null +--run_benchmark:False +null:null +===========================infer_benchmark_params=========================== +numpy_infer_input:3x1024x1024.npy \ No newline at end of file diff --git a/test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml b/test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml new file mode 100644 index 0000000000000000000000000000000000000000..be0a74850f5c874290cf4f8114295cb9e10ab7b6 --- /dev/null +++ b/test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml @@ -0,0 +1,15 @@ +_BASE_: [ + '../../../../configs/datasets/spine_coco.yml', + '../../../../configs/runtime.yml', + '../../../../configs/rotate/ppyoloe_r/_base_/optimizer_3x.yml', + '../../../../configs/rotate/ppyoloe_r/_base_/ppyoloe_r_reader.yml', + '../../../../configs/rotate/ppyoloe_r/_base_/ppyoloe_r_crn.yml' +] + +log_iter: 50 +snapshot_epoch: 1 +weights: output/ppyoloe_r_crn_s_3x_dota/model_final + +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/CSPResNetb_s_pretrained.pdparams +depth_mult: 0.33 +width_mult: 0.50 diff --git a/test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco_train_infer_python.txt b/test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..e5442e883df146f84adcaf75a491657a9f200dc5 --- /dev/null +++ b/test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco_train_infer_python.txt @@ -0,0 +1,53 @@ +===========================train_params=========================== +model_name:ppyoloe_r_crn_s_3x_spine_coco +python:python3.7 +gpu_list:0|0,1 +use_gpu:True +auto_cast:null +epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=12 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=1 +pretrain_weights:https://paddledet.bj.bcebos.com/models/ppyoloe_r_crn_s_3x_dota.pdparams +trained_model_name:model_final.pdparams +train_infer_img_dir:./dataset/spine_coco/test/ +filename:null +## +trainer:norm_train +norm_train:tools/train.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml -o +pact_train:tools/train.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://paddledet.bj.bcebos.com/models/ppyoloe_r_crn_s_3x_dota.pdparams +norm_export:tools/export_model.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml -o +pact_export:tools/export_model.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c test_tipc/configs/rotate/ppyoloe_r/ppyoloe_r_crn_s_3x_spine_coco.yml --slim_config _template_kl_quant -o +## +infer_mode:norm +infer_quant:False +inference:./deploy/python/infer.py +--device:gpu|cpu +--enable_mkldnn:False +--cpu_threads:4 +--batch_size:1 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/spine_coco/test/ +--save_log_path:null +--run_benchmark:False +null:null +===========================infer_benchmark_params=========================== +numpy_infer_input:3x1024x1024.npy \ No newline at end of file diff --git a/test_tipc/configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco_train_infer_python.txt b/test_tipc/configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..d0ea33a3989b962a86fe1eb9118d14bc4a5d5697 --- /dev/null +++ b/test_tipc/configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco_train_infer_python.txt @@ -0,0 +1,60 @@ +===========================train_params=========================== +model_name:ppyoloe_plus_sod_crn_l_80e_coco +python:python3.7 +gpu_list:0|0,1 +use_gpu:True +auto_cast:null +epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=300 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=2 +pretrain_weights:https://paddledet.bj.bcebos.com/models/ppyoloe_plus_sod_crn_l_80e_coco.pdparams +trained_model_name:model_final.pdparams +train_infer_img_dir:./dataset/coco/test2017/ +filename:null +## +trainer:norm_train +norm_train:tools/train.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml -o +pact_train:tools/train.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://paddledet.bj.bcebos.com/models/ppyoloe_plus_sod_crn_l_80e_coco.pdparams +norm_export:tools/export_model.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml -o +pact_export:tools/export_model.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c configs/ppyoloe/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml --slim_config configs/slim/post_quant/ppyoloe_crn_s_300e_coco_ptq.yml -o +## +infer_mode:norm|kl_quant +infer_quant:False|True +inference:./deploy/python/infer.py +--device:gpu|cpu +--enable_mkldnn:False +--cpu_threads:4 +--batch_size:1|2 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/coco/test2017/ +--save_log_path:null +--run_benchmark:False +--trt_max_shape:1600 +===========================train_benchmark_params========================== +batch_size:8 +fp_items:fp32|fp16 +epoch:1 +repeat:12 +--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile +flags:null +===========================infer_benchmark_params=========================== +numpy_infer_input:3x640x640.npy \ No newline at end of file diff --git a/test_tipc/configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco_train_infer_python.txt b/test_tipc/configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..f671772de320b9eafb2e33a216c33db0ee75a3e7 --- /dev/null +++ b/test_tipc/configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco_train_infer_python.txt @@ -0,0 +1,60 @@ +===========================train_params=========================== +model_name:cascade_rcnn_vit_base_hrfpn_cae_1x_coco +python:python3.7 +gpu_list:0|0,1 +use_gpu:True +auto_cast:null +epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=300 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=2 +pretrain_weights:https://bj.bcebos.com/v1/paddledet/models/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.pdparams +trained_model_name:model_final.pdparams +train_infer_img_dir:./dataset/coco/test2017/ +filename:null +## +trainer:norm_train +norm_train:tools/train.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml -o +pact_train:tools/train.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://bj.bcebos.com/v1/paddledet/models/pretrained/vit_base_cae_pretrained.pdparams +norm_export:tools/export_model.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml -o +pact_export:tools/export_model.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c configs/vitdet/cascade_rcnn_vit_base_hrfpn_cae_1x_coco.yml --slim_config configs/slim/post_quant/ppyoloe_crn_s_300e_coco_ptq.yml -o +## +infer_mode:norm|kl_quant +infer_quant:False|True +inference:./deploy/python/infer.py +--device:gpu|cpu +--enable_mkldnn:False +--cpu_threads:4 +--batch_size:1|2 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/coco/test2017/ +--save_log_path:null +--run_benchmark:False +--trt_max_shape:1600 +===========================train_benchmark_params========================== +batch_size:8 +fp_items:fp32|fp16 +epoch:1 +repeat:12 +--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile +flags:null +===========================infer_benchmark_params=========================== +numpy_infer_input:3x640x640.npy \ No newline at end of file diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh index f006d984e08197e916288f8285940f96f4a07dfd..1a9c11de76b81107add1836b4bc61513444d8c74 100644 --- a/test_tipc/prepare.sh +++ b/test_tipc/prepare.sh @@ -158,6 +158,9 @@ else if [[ ${model_name} =~ "s2anet" ]]; then cd ./ppdet/ext_op && eval "${python} setup.py install" cd ../../ + elif [[ ${model_name} =~ "ppyoloe_r_crn_s_3x_spine_coco" ]]; then + cd ./ppdet/ext_op && eval "${python} setup.py install" + cd ../../ fi # download mot lite data wget -nc -P ./dataset/mot/ https://paddledet.bj.bcebos.com/data/tipc/mot_tipc.tar --no-check-certificate diff --git a/test_tipc/test_pipeline_infer_python.sh b/test_tipc/test_pipeline_infer_python.sh new file mode 100644 index 0000000000000000000000000000000000000000..2e6ef90f5e72d3bf92f56102a10382a8e3678ca1 --- /dev/null +++ b/test_tipc/test_pipeline_infer_python.sh @@ -0,0 +1,94 @@ +#!/bin/bash +source test_tipc/utils_func.sh + +FILENAME=$1 +MODE="pipeline_infer" + +# parser model_name +dataline=$(cat ${FILENAME}) +IFS=$'\n' +lines=(${dataline}) +model_name=$(func_parser_value "${lines[1]}") +echo "ppdet pipeline_python_infer: ${model_name}" +python=$(func_parser_value "${lines[2]}") +filename_key=$(func_parser_key "${lines[3]}") +filename_value=$(func_parser_value "${lines[3]}") + +# parser infer params +infer_mode_list=$(func_parser_value "${lines[5]}") +input_key=$(func_parser_key "${lines[6]}") +input_list=$(func_parser_value "${lines[6]}") +use_gpu=$(func_parser_value "${lines[7]}") +inference_py=$(func_parser_value "${lines[8]}") +use_device_key=$(func_parser_key "${lines[9]}") +use_device_list=$(func_parser_value "${lines[9]}") +image_dir_key=$(func_parser_key "${lines[10]}") +infer_img_dir=$(func_parser_value "${lines[10]}") +video_dir_key=$(func_parser_key "${lines[11]}") +infer_video_dir=$(func_parser_value "${lines[11]}") + + +LOG_PATH="./test_tipc/output/${model_name}/${MODE}" +mkdir -p ${LOG_PATH} +status_log="${LOG_PATH}/results_serving_python.log" + + +function func_pipeline_inference(){ + IFS='|' + _python=$1 + _log_path=$2 + _pipeline_script=$3 + _infer_dir=$4 + _input_type=$5 + _device_cmd=$6 + _device_type=$7 + # inference + + pipeline_log_path="${_log_path}/python_pipeline_${_input_type}_${_device_type}.log" + output_path="--output_dir=${LOG_PATH}/" + mot_flag="-o MOT.enable=True" + if [ ${_input_type} = "video" ]; then + pipeline_cmd="${_python} ${_pipeline_script} ${_infer_dir} ${_device_cmd} ${output_path} ${mot_flag} > ${pipeline_log_path} 2>&1 &" + else + pipeline_cmd="${_python} ${_pipeline_script} ${_infer_dir} ${_device_cmd} ${output_path} > ${pipeline_log_path} 2>&1 &" + fi + # run + eval $pipeline_cmd + last_status=${PIPESTATUS[0]} + eval "cat ${pipeline_log_path}" + status_check $last_status "${pipeline_cmd}" "${status_log}" "${model_name}" "${pipeline_log_path}" + +} + + +#run infer +Count=0 +IFS="|" + +for input in ${input_list[*]}; do + for device_type in ${use_device_list[*]};do + # set cuda device + if [ ${use_gpu} = "False" ] || [ ${device_type} = "cpu" ]; then + device_cmd=$(func_set_params "${use_device_key}" "${device_type}") + elif [ ${use_gpu} = "True" ] && [ ${device_type} = "gpu" ]; then + device_cmd=$(func_set_params "${use_device_key}" "${device_type}") + env="export CUDA_VISIBLE_DEVICES=0" + eval $env + else + echo "Does not support hardware other than CPU and GPU Currently!" + fi + if [ ${input} != "null" ]; then + case ${input} in + image) set_infer_file=$(func_set_params "${image_dir_key}" "${infer_img_dir}") ;; + video) set_infer_file=$(func_set_params "${video_dir_key}" "${infer_video_dir}") ;; + *) echo "Undefined input mode!"; exit 1; + esac + + fi + #run inference + func_pipeline_inference "${python}" "${LOG_PATH}" "${inference_py}" ${set_infer_file} ${input} ${device_cmd} ${device_type} + Count=$(($Count + 1)) + eval "unset CUDA_VISIBLE_DEVICES" + done +done +