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

在自动量化压缩的验证过程中,报错:KeyError: 'input_list' #8714

Open pcycccccc opened 11 months ago

pcycccccc commented 11 months ago

问题确认 Search before asking

请提出你的问题 Please ask your question

我将之前已完成训练的模型进行自动量化,在deploy/auto_compression/configs下配置好了量化的文件,运行deploy/auto_compression/下面的run.py文件,能够顺利量化训练,得到了量化的模型,想要通过eval.py文件来验证量化后的模型效果,却发现报错: image 我的配置文件的内容是: image 里边没有input_list的参数呀?我看了其他的配置文件也没有这个参数,所以这种问题该如何解决???

wapping commented 8 months ago

遇到同样的问题,不知道这个input_list是什么

wapping commented 8 months ago

input_list里面是模型的input names,在配置文件里加入一行就行:

Global: reader_config: ./deploy/auto_compression/configs/picodet_reader_mine.yml input_list: ['image', 'scale_factor'] # 在配置文件下加这行 include_nms: True Evaluation: True model_dir: ./output_inference/ model_filename: model.pdmodel params_filename: model.pdiparams

Distillation: alpha: 1.0 loss: l2

QuantAware: use_pact: true activation_quantize_type: 'moving_average_abs_max' weight_bits: 8 activation_bits: 8 quantize_op_types:

TrainConfig: train_iter: 1000 eval_iter: 1000 learning_rate:
type: CosineAnnealingDecay learning_rate: 0.00001 T_max: 1000 optimizer_builder: optimizer: type: SGD weight_decay: 4.0e-05

LokeZhou commented 8 months ago

可以参考这里:https://github.com/PaddlePaddle/PaddleDetection/blob/2d3517aa0b8adeec2752db2411c61ee56ec5a0af/deploy/auto_compression/configs/ppyoloe_crn_l_80e_sliced_visdrone_640_025_qat.yml#L4