diff --git a/example/auto_compression/detection/configs/picodet_reader.yml b/example/auto_compression/detection/configs/picodet_reader.yml new file mode 100644 index 0000000000000000000000000000000000000000..389673367517322d0bec107886d4ed799083965a --- /dev/null +++ b/example/auto_compression/detection/configs/picodet_reader.yml @@ -0,0 +1,31 @@ +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/ + +eval_height: &eval_height 416 +eval_width: &eval_width 416 +eval_size: &eval_size [*eval_height, *eval_width] + +worker_num: 0 + +EvalReader: + inputs_def: + image_shape: [1, 3, *eval_height, *eval_width] + sample_transforms: + - Decode: {} + - Resize: {interp: 2, target_size: *eval_size, keep_ratio: False} + - NormalizeImage: {is_scale: true, mean: [0.485,0.456,0.406], std: [0.229, 0.224,0.225]} + - Permute: {} + batch_size: 32 diff --git a/example/auto_compression/detection/configs/picodet_s_qat_dis.yaml b/example/auto_compression/detection/configs/picodet_s_qat_dis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..563a6653f9d4a3f30f927425e071672a7e6669e1 --- /dev/null +++ b/example/auto_compression/detection/configs/picodet_s_qat_dis.yaml @@ -0,0 +1,43 @@ +Global: + reader_config: ./configs/picodet_reader.yml + input_list: ['image', 'scale_factor'] + Evaluation: True + model_dir: ./picodet_s_416_coco_lcnet/ + model_filename: model.pdmodel + params_filename: model.pdiparams + +Distillation: + alpha: 1.0 + loss: l2 + node: + - conv2d_138.tmp_1 + - tmp_2 + - conv2d_146.tmp_1 + - tmp_5 + - conv2d_162.tmp_1 + - tmp_11 + - conv2d_154.tmp_1 + - tmp_8 + +Quantization: + use_pact: true + activation_quantize_type: 'moving_average_abs_max' + weight_bits: 8 + activation_bits: 8 + quantize_op_types: + - conv2d + - depthwise_conv2d + +TrainConfig: + train_iter: 8000 + eval_iter: 1000 + learning_rate: + type: CosineAnnealingDecay + learning_rate: 0.00001 + T_max: 8000 + optimizer_builder: + optimizer: + type: SGD + weight_decay: 4.0e-05 + +