diff --git a/configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml b/configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml new file mode 100644 index 0000000000000000000000000000000000000000..bf4fb1cac9dfce2b6477a5a0da7f3bd13738c505 --- /dev/null +++ b/configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml @@ -0,0 +1,26 @@ +_BASE_: [ + '../../../datasets/coco_detection.yml', + '../../../runtime.yml', + '../_base_/picodet_esnet.yml', + '../_base_/optimizer_300e.yml', + '../_base_/picodet_416_reader.yml', +] + +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/LCNet_x1_0_pretrained.pdparams +weights: output/picodet_lcnet_1_5x_416_coco/model_final +find_unused_parameters: True +use_ema: true +cycle_epoch: 40 +snapshot_epoch: 10 + +PicoDet: + backbone: LCNet + neck: CSPPAN + head: PicoHead + +LCNet: + scale: 1.0 + feature_maps: [3, 4, 5] + +TrainReader: + batch_size: 90 \ No newline at end of file diff --git a/configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml b/configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml new file mode 100644 index 0000000000000000000000000000000000000000..6708cba3e88f07a5abd9493e829c2802a2cce3f0 --- /dev/null +++ b/configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml @@ -0,0 +1,26 @@ +_BASE_: [ + '../../../datasets/coco_detection.yml', + '../../../runtime.yml', + '../_base_/picodet_esnet.yml', + '../_base_/optimizer_300e.yml', + '../_base_/picodet_416_reader.yml', +] + +pretrain_weights: https://paddledet.bj.bcebos.com/models/pretrained/LCNet_x2_5_ssld_pretrained.pdparams +weights: output/picodet_lcnet_1_5x_416_coco/model_final +find_unused_parameters: True +use_ema: true +cycle_epoch: 40 +snapshot_epoch: 10 + +PicoDet: + backbone: LCNet + neck: CSPPAN + head: PicoHead + +LCNet: + scale: 2.5 + feature_maps: [3, 4, 5] + +TrainReader: + batch_size: 48 \ No newline at end of file diff --git a/ppdet/modeling/heads/simota_head.py b/ppdet/modeling/heads/simota_head.py index e74f017570e09e95d921b206c532e3cf4435194f..037c395c68d0cf4a6b639d12032ca4f8d65780dc 100644 --- a/ppdet/modeling/heads/simota_head.py +++ b/ppdet/modeling/heads/simota_head.py @@ -179,7 +179,7 @@ class OTAHead(GFLHead): num_level_anchors) num_total_pos = sum(pos_num_l) try: - paddle.distributed.all_reduce(num_total_pos) + paddle.distributed.all_reduce(paddle.to_tensor(num_total_pos)) num_total_pos = paddle.clip( num_total_pos / paddle.distributed.get_world_size(), min=1.) except: @@ -256,7 +256,7 @@ class OTAHead(GFLHead): avg_factor = sum(avg_factor) try: - paddle.distributed.all_reduce(avg_factor) + paddle.distributed.all_reduce(paddle.to_tensor(avg_factor)) avg_factor = paddle.clip( avg_factor / paddle.distributed.get_world_size(), min=1) except: @@ -397,7 +397,7 @@ class OTAVFLHead(OTAHead): num_level_anchors) num_total_pos = sum(pos_num_l) try: - paddle.distributed.all_reduce(num_total_pos) + paddle.distributed.all_reduce(paddle.to_tensor(num_total_pos)) num_total_pos = paddle.clip( num_total_pos / paddle.distributed.get_world_size(), min=1.) except: @@ -477,7 +477,7 @@ class OTAVFLHead(OTAHead): avg_factor = sum(avg_factor) try: - paddle.distributed.all_reduce(avg_factor) + paddle.distributed.all_reduce(paddle.to_tensor(avg_factor)) avg_factor = paddle.clip( avg_factor / paddle.distributed.get_world_size(), min=1) except: diff --git a/test_tipc/configs/dino/dino_r50_4scale_1x_coco_train_infer_python.txt b/test_tipc/configs/dino/dino_r50_4scale_1x_coco_train_infer_python.txt index ee694fdd7aba7b0363ff54ddd5dc883d9d19c249..475397867e93cd4fb0c6800fc64e77458acf47e2 100644 --- a/test_tipc/configs/dino/dino_r50_4scale_1x_coco_train_infer_python.txt +++ b/test_tipc/configs/dino/dino_r50_4scale_1x_coco_train_infer_python.txt @@ -13,7 +13,7 @@ train_infer_img_dir:./dataset/coco/test2017/ filename:null ## trainer:norm_train -norm_train:tools/train.py -c configs/dino/dino_r50_4scale_1x_coco.yml -o +norm_train:tools/train.py -c configs/dino/dino_r50_4scale_1x_coco.yml -o worker_num=32 pact_train:tools/train.py -c configs/dino/dino_r50_4scale_1x_coco.yml --slim_config _template_pact -o fpgm_train:tools/train.py -c configs/dino/dino_r50_4scale_1x_coco.yml --slim_config _template_fpgm -o distill_train:null diff --git a/test_tipc/configs/picodet/picodet_lcnet_1_0x_416_coco_train_infer_python.txt b/test_tipc/configs/picodet/picodet_lcnet_1_0x_416_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..f79e641526e1973653cbde1a366060fa3f0e2886 --- /dev/null +++ b/test_tipc/configs/picodet/picodet_lcnet_1_0x_416_coco_train_infer_python.txt @@ -0,0 +1,60 @@ +===========================train_params=========================== +model_name:picodet_lcnet_1_0x_416_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=80 +pretrain_weights:null +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/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml -o +pact_train:tools/train.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:null +norm_export:tools/export_model.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml -o +pact_export:tools/export_model.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_1_0x_416_coco.yml --slim_config configs/slim/post_quant/yolov3_darknet53_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 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/coco/test2017/ +--save_log_path:null +--run_benchmark:False +null:null +===========================train_benchmark_params========================== +batch_size:90 +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:3x416x416_2.npy \ No newline at end of file diff --git a/test_tipc/configs/picodet/picodet_lcnet_2_5x_416_coco_train_infer_python.txt b/test_tipc/configs/picodet/picodet_lcnet_2_5x_416_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..eeb2cf25f64e5ea6278297ab023aa96333abf6c7 --- /dev/null +++ b/test_tipc/configs/picodet/picodet_lcnet_2_5x_416_coco_train_infer_python.txt @@ -0,0 +1,60 @@ +===========================train_params=========================== +model_name:picodet_lcnet_2_5x_416_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=80 +pretrain_weights:null +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/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml -o +pact_train:tools/train.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml --slim_config _template_fpgm -o +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:null +norm_export:tools/export_model.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml -o +pact_export:tools/export_model.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml --slim_config _template_fpgm -o +distill_export:null +export1:null +export2:null +kl_quant_export:tools/post_quant.py -c configs/picodet/legacy_model/more_config/picodet_lcnet_2_5x_416_coco.yml --slim_config configs/slim/post_quant/yolov3_darknet53_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 +--use_tensorrt:null +--run_mode:paddle +--model_dir: +--image_dir:./dataset/coco/test2017/ +--save_log_path:null +--run_benchmark:False +null:null +===========================train_benchmark_params========================== +batch_size:48 +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:3x416x416_2.npy \ No newline at end of file diff --git a/test_tipc/configs/picodet/picodet_s_320_coco_train_infer_python.txt b/test_tipc/configs/picodet/picodet_s_320_coco_train_infer_python.txt index 0317fcf6f649073dadb6fa6f8cc8aea288e64c25..01aa4644ca5269d59456f30d3dad656b30000a00 100644 --- a/test_tipc/configs/picodet/picodet_s_320_coco_train_infer_python.txt +++ b/test_tipc/configs/picodet/picodet_s_320_coco_train_infer_python.txt @@ -13,7 +13,7 @@ train_infer_img_dir:./dataset/coco/test2017/ filename:null ## trainer:norm_train -norm_train:tools/train.py -c configs/picodet/legacy_model/picodet_s_320_coco.yml -o +norm_train:tools/train.py -c configs/picodet/legacy_model/picodet_s_320_coco.yml -o worker_num=16 pact_train:tools/train.py -c configs/picodet/legacy_model/picodet_s_320_coco.yml --slim_config _template_pact -o fpgm_train:tools/train.py -c configs/picodet/legacy_model/picodet_s_320_coco.yml --slim_config _template_fpgm -o distill_train:null diff --git a/test_tipc/configs/ppyoloe/ppyoloe+/ppyoloe_plus_crn_l_80e_coco_train_infer_python.txt b/test_tipc/configs/ppyoloe/ppyoloe+/ppyoloe_plus_crn_l_80e_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f8c4558b8f81bb158a81397e935ab5282c07cdb --- /dev/null +++ b/test_tipc/configs/ppyoloe/ppyoloe+/ppyoloe_plus_crn_l_80e_coco_train_infer_python.txt @@ -0,0 +1,62 @@ +===========================train_params=========================== +model_name:ppyoloe_plus_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_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/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml -o +pact_train:tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml --slim_config _template_pact -o +fpgm_train:tools/train.py -c configs/ppyoloe/ppyoloe_plus_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/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://paddledet.bj.bcebos.com/models/ppyoloe_plus_crn_l_80e_coco.pdparams +norm_export:tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml -o +pact_export:tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml --slim_config _template_pact -o +fpgm_export:tools/export_model.py -c configs/ppyoloe/ppyoloe_plus_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/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:16 +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_2.npy +===========================to_static_train_benchmark_params=========================== +to_static_train:--to_static diff --git a/test_tipc/configs/rtdetr/rtdetr_hgnetv2_l_6x_coco_train_infer_python.txt b/test_tipc/configs/rtdetr/rtdetr_hgnetv2_l_6x_coco_train_infer_python.txt new file mode 100644 index 0000000000000000000000000000000000000000..db9dafd716e385ef48332f8fddb2ef1d18327816 --- /dev/null +++ b/test_tipc/configs/rtdetr/rtdetr_hgnetv2_l_6x_coco_train_infer_python.txt @@ -0,0 +1,58 @@ +===========================train_params=========================== +model_name:rtdetr_hgnetv2_l_6x_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=50 +save_dir:null +TrainReader.batch_size:lite_train_lite_infer=1|lite_train_whole_infer=4|whole_train_whole_infer=4 +pretrain_weights:https://bj.bcebos.com/v1/paddledet/models/rtdetr_hgnetv2_l_6x_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/rtdetr/rtdetr_hgnetv2_l_6x_coco.yml -o worker_num=16 +pact_train:null +fpgm_train:null +distill_train:null +null:null +null:null +## +===========================eval_params=========================== +eval:tools/eval.py -c configs/rtdetr/rtdetr_hgnetv2_l_6x_coco.yml -o +null:null +## +===========================infer_params=========================== +--output_dir:./output_inference +weights:https://bj.bcebos.com/v1/paddledet/models/rtdetr_hgnetv2_l_6x_coco.pdparams +norm_export:tools/export_model.py -c configs/rtdetr/rtdetr_hgnetv2_l_6x_coco.yml -o +pact_export:null +fpgm_export:null +distill_export:null +export1:null +export2:null +kl_quant_export:null +## +infer_mode:norm +infer_quant:False +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:16 +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 \ No newline at end of file