From 8fbdf1cb6bedd8a884d2f3d0482b4ef39a36f142 Mon Sep 17 00:00:00 2001 From: Wenyu Date: Thu, 18 Aug 2022 18:32:10 +0800 Subject: [PATCH] add ppyoloe plus cfgs (#6686) --- .../configs/ppyoloe_plus_l_qat_dis.yaml | 33 +++++++++++++++++++ .../configs/ppyoloe_plus_m_qat_dis.yaml | 33 +++++++++++++++++++ .../configs/ppyoloe_plus_reader.yml | 28 ++++++++++++++++ .../configs/ppyoloe_plus_s_qat_dis.yaml | 33 +++++++++++++++++++ .../configs/ppyoloe_plus_x_qat_dis.yaml | 33 +++++++++++++++++++ 5 files changed, 160 insertions(+) create mode 100644 deploy/auto_compression/configs/ppyoloe_plus_l_qat_dis.yaml create mode 100644 deploy/auto_compression/configs/ppyoloe_plus_m_qat_dis.yaml create mode 100644 deploy/auto_compression/configs/ppyoloe_plus_reader.yml create mode 100644 deploy/auto_compression/configs/ppyoloe_plus_s_qat_dis.yaml create mode 100644 deploy/auto_compression/configs/ppyoloe_plus_x_qat_dis.yaml diff --git a/deploy/auto_compression/configs/ppyoloe_plus_l_qat_dis.yaml b/deploy/auto_compression/configs/ppyoloe_plus_l_qat_dis.yaml new file mode 100644 index 000000000..3e1b0ffc9 --- /dev/null +++ b/deploy/auto_compression/configs/ppyoloe_plus_l_qat_dis.yaml @@ -0,0 +1,33 @@ + +Global: + reader_config: configs/ppyoloe_plus_reader.yml + input_list: ['image', 'scale_factor'] + arch: YOLO + Evaluation: True + model_dir: ./ppyoloe_plus_crn_l_80e_coco + model_filename: model.pdmodel + params_filename: model.pdiparams + +Distillation: + alpha: 1.0 + loss: soft_label + +Quantization: + use_pact: true + activation_quantize_type: 'moving_average_abs_max' + quantize_op_types: + - conv2d + - depthwise_conv2d + +TrainConfig: + train_iter: 5000 + eval_iter: 1000 + learning_rate: + type: CosineAnnealingDecay + learning_rate: 0.00003 + T_max: 6000 + optimizer_builder: + optimizer: + type: SGD + weight_decay: 4.0e-05 + diff --git a/deploy/auto_compression/configs/ppyoloe_plus_m_qat_dis.yaml b/deploy/auto_compression/configs/ppyoloe_plus_m_qat_dis.yaml new file mode 100644 index 000000000..65c1b9240 --- /dev/null +++ b/deploy/auto_compression/configs/ppyoloe_plus_m_qat_dis.yaml @@ -0,0 +1,33 @@ + +Global: + reader_config: configs/ppyoloe_plus_reader.yml + input_list: ['image', 'scale_factor'] + arch: YOLO + Evaluation: True + model_dir: ./ppyoloe_plus_crn_m_80e_coco + model_filename: model.pdmodel + params_filename: model.pdiparams + +Distillation: + alpha: 1.0 + loss: soft_label + +Quantization: + use_pact: true + activation_quantize_type: 'moving_average_abs_max' + quantize_op_types: + - conv2d + - depthwise_conv2d + +TrainConfig: + train_iter: 5000 + eval_iter: 1000 + learning_rate: + type: CosineAnnealingDecay + learning_rate: 0.00003 + T_max: 6000 + optimizer_builder: + optimizer: + type: SGD + weight_decay: 4.0e-05 + diff --git a/deploy/auto_compression/configs/ppyoloe_plus_reader.yml b/deploy/auto_compression/configs/ppyoloe_plus_reader.yml new file mode 100644 index 000000000..632dd87c7 --- /dev/null +++ b/deploy/auto_compression/configs/ppyoloe_plus_reader.yml @@ -0,0 +1,28 @@ + + +metric: COCO +num_classes: 80 + +# Datset configuration +TrainDataset: + !COCODataSet + image_dir: train2017 + anno_path: annotations/instances_train2017.json + dataset_dir: dataset/coco/ + +EvalDataset: + !COCODataSet + image_dir: val2017 + anno_path: annotations/instances_val2017.json + dataset_dir: dataset/coco/ + +worker_num: 0 + +# preprocess reader in test +EvalReader: + sample_transforms: + - Decode: {} + - Resize: {target_size: [640, 640], keep_ratio: False, interp: 2} + - NormalizeImage: {mean: [0., 0., 0.], std: [1., 1., 1.], is_scale: True} + - Permute: {} + batch_size: 4 diff --git a/deploy/auto_compression/configs/ppyoloe_plus_s_qat_dis.yaml b/deploy/auto_compression/configs/ppyoloe_plus_s_qat_dis.yaml new file mode 100644 index 000000000..c94350553 --- /dev/null +++ b/deploy/auto_compression/configs/ppyoloe_plus_s_qat_dis.yaml @@ -0,0 +1,33 @@ + +Global: + reader_config: configs/ppyoloe_plus_reader.yml + input_list: ['image', 'scale_factor'] + arch: YOLO + Evaluation: True + model_dir: ./ppyoloe_plus_crn_s_80e_coco + model_filename: model.pdmodel + params_filename: model.pdiparams + +Distillation: + alpha: 1.0 + loss: soft_label + +Quantization: + use_pact: true + activation_quantize_type: 'moving_average_abs_max' + quantize_op_types: + - conv2d + - depthwise_conv2d + +TrainConfig: + train_iter: 5000 + eval_iter: 1000 + learning_rate: + type: CosineAnnealingDecay + learning_rate: 0.00003 + T_max: 6000 + optimizer_builder: + optimizer: + type: SGD + weight_decay: 4.0e-05 + diff --git a/deploy/auto_compression/configs/ppyoloe_plus_x_qat_dis.yaml b/deploy/auto_compression/configs/ppyoloe_plus_x_qat_dis.yaml new file mode 100644 index 000000000..5e6ba5850 --- /dev/null +++ b/deploy/auto_compression/configs/ppyoloe_plus_x_qat_dis.yaml @@ -0,0 +1,33 @@ + +Global: + reader_config: configs/ppyoloe_plus_reader.yml + input_list: ['image', 'scale_factor'] + arch: YOLO + Evaluation: True + model_dir: ./ppyoloe_plus_crn_x_80e_coco + model_filename: model.pdmodel + params_filename: model.pdiparams + +Distillation: + alpha: 1.0 + loss: soft_label + +Quantization: + use_pact: true + activation_quantize_type: 'moving_average_abs_max' + quantize_op_types: + - conv2d + - depthwise_conv2d + +TrainConfig: + train_iter: 5000 + eval_iter: 1000 + learning_rate: + type: CosineAnnealingDecay + learning_rate: 0.00003 + T_max: 6000 + optimizer_builder: + optimizer: + type: SGD + weight_decay: 4.0e-05 + -- GitLab